From ea11bc5aea6fc42b01adea72a8a8374f2377bdec Mon Sep 17 00:00:00 2001 From: cloudreflection <39823819+cloudreflection@users.noreply.github.com> Date: Sun, 2 Apr 2023 19:32:21 +0800 Subject: [PATCH] Update App.vue --- src/App.vue | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/App.vue b/src/App.vue index 1f9832f..ab7a62d 100644 --- a/src/App.vue +++ b/src/App.vue @@ -9,6 +9,9 @@ + + 支持版本 {{sversion}} 您的版本 {{conf.version}}
仍然使用可能造成不可预料的问题 +
将使用默认配置 @@ -103,7 +106,8 @@ try { } catch (e) { usedefault.value = true } - +const wrongversion = !(conf.value.version == defaults.version) +const sversion = ref(defaults.version) const model = ref({ "welcome": "", "blacklist": "", @@ -139,7 +143,12 @@ watch(model.value, (nv) => { console.log(i in conf.value) console.log(conf[i] !== model.value[i]) if (i in conf.value && conf.value[i] !== model.value[i]) { - newconf.value[i] = model.value[i] + if (model.value[i] == defaults[i]) { + newconf.value[i] = -1 + } else { + newconf.value[i] = model.value[i] + } + } if (i in conf.value === false && defaults[i] !== model.value[i]) { newconf.value[i] = model.value[i]