From 6623fd8362b846ddbb7a4a11e6fcb25ad0a88d1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Tue, 11 Jan 2022 15:26:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BA=A4=E4=BA=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/public/js/components/common/combo-box.js | 29 +++++++++-- .../@default/clusters/ip-addrs/index.html | 5 +- web/views/@default/servers/index.html | 49 ++++++++----------- 3 files changed, 48 insertions(+), 35 deletions(-) diff --git a/web/public/js/components/common/combo-box.js b/web/public/js/components/common/combo-box.js index 29d7d0f2..1f1db6a8 100644 --- a/web/public/js/components/common/combo-box.js +++ b/web/public/js/components/common/combo-box.js @@ -110,6 +110,29 @@ Vue.component("combo-box", { }, change: function () { this.$emit("change", this.selectedItem) + + let that = this + setTimeout(function () { + if (that.$refs.selectedLabel != null) { + that.$refs.selectedLabel.focus() + } + }) + }, + submitForm: function (event) { + if (event.target.tagName != "A") { + return + } + let parentBox = this.$refs.selectedLabel.parentNode + while (true) { + parentBox = parentBox.parentNode + if (parentBox == null || parentBox.tagName == "BODY") { + return + } + if (parentBox.tagName == "FORM") { + parentBox.submit() + break + } + } } }, template: `
@@ -121,9 +144,9 @@ Vue.component("combo-box", {
- {{title}}:{{selectedItem.name}} - - + {{title}}:{{selectedItem.name}} + +
diff --git a/web/views/@default/clusters/ip-addrs/index.html b/web/views/@default/clusters/ip-addrs/index.html index 93e41595..f6a6c26e 100644 --- a/web/views/@default/clusters/ip-addrs/index.html +++ b/web/views/@default/clusters/ip-addrs/index.html @@ -6,10 +6,7 @@
- 集群: -
-
- +
状态: diff --git a/web/views/@default/servers/index.html b/web/views/@default/servers/index.html index 202e9ac9..077715bf 100644 --- a/web/views/@default/servers/index.html +++ b/web/views/@default/servers/index.html @@ -27,35 +27,28 @@
-