From fbbcf60c35a300c9411c04078fa946a96d9e2a96 Mon Sep 17 00:00:00 2001 From: leiqiaochu Date: Wed, 27 Sep 2023 11:25:49 +0800 Subject: [PATCH] fix: bug#18724 --- src/views/system/Dictionary/components/Right/Save/index.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/views/system/Dictionary/components/Right/Save/index.vue b/src/views/system/Dictionary/components/Right/Save/index.vue index 6053c118..a435c258 100644 --- a/src/views/system/Dictionary/components/Right/Save/index.vue +++ b/src/views/system/Dictionary/components/Right/Save/index.vue @@ -47,7 +47,7 @@ const form: any = ref({ text: '', ordinal: 0 }) - +const lastValue = ref() const loading = ref(false) const formRef = ref() /* @@ -66,7 +66,7 @@ const validateInput = async (_rule: Rule, value: string) => { * 校验value唯一 */ const validateValue = async (_rule: Rule, value: string) => { - if (value && props.type === 'add') { + if (value && lastValue.value !== value) { const res:any = await verifyValue({ terms: [ { @@ -133,6 +133,7 @@ onMounted(() => { form.value.ordinal = props.sort } else { form.value = props.data + lastValue.value = props.data.value } })