fix: bug#18724

This commit is contained in:
leiqiaochu 2023-09-27 11:25:49 +08:00
parent b805c8b748
commit fbbcf60c35
1 changed files with 3 additions and 2 deletions

View File

@ -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
}
})
</script>