From cc025d7da57650db6340d3ebd9504dd588a8db0d Mon Sep 17 00:00:00 2001 From: mzz2017 Date: Thu, 12 Aug 2021 12:30:28 +0800 Subject: [PATCH] fix(518e78c2860): uncorresponding value of select box --- gui/src/components/modalServer.vue | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/gui/src/components/modalServer.vue b/gui/src/components/modalServer.vue index 2a750410..967d94ee 100644 --- a/gui/src/components/modalServer.vue +++ b/gui/src/components/modalServer.vue @@ -672,15 +672,6 @@ export default { } }, mounted() { - if (this.readonly) { - this.$refs.section - .querySelectorAll("input, textarea") - .forEach(x => (x.readOnly = "readOnly")); - this.$refs.section.querySelectorAll("select").forEach(x => { - const text = x.querySelector(`option[value="${x.value}"]`).textContent; - x.outerHTML = ``; - }); - } if (localStorage["vlessValid"] === "true") { this.showVLess = true; this.vlessVersion = 1; @@ -737,6 +728,19 @@ export default { this.trojan = this.resolveURL(res.data.data.sharingAddress); this.tabChoice = 4; } + this.$nextTick(() => { + if (this.readonly) { + this.$refs.section + .querySelectorAll("input, textarea") + .forEach(x => (x.readOnly = "readOnly")); + this.$refs.section.querySelectorAll("select").forEach(x => { + const text = x.querySelector(`option[value="${x.value}"]`) + .textContent; + console.log(x.value, text); + x.outerHTML = ``; + }); + } + }); }); }); }