fix: bug#18724
This commit is contained in:
parent
b805c8b748
commit
fbbcf60c35
|
@ -47,7 +47,7 @@ const form: any = ref({
|
||||||
text: '',
|
text: '',
|
||||||
ordinal: 0
|
ordinal: 0
|
||||||
})
|
})
|
||||||
|
const lastValue = ref()
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const formRef = ref()
|
const formRef = ref()
|
||||||
/*
|
/*
|
||||||
|
@ -66,7 +66,7 @@ const validateInput = async (_rule: Rule, value: string) => {
|
||||||
* 校验value唯一
|
* 校验value唯一
|
||||||
*/
|
*/
|
||||||
const validateValue = async (_rule: Rule, value: string) => {
|
const validateValue = async (_rule: Rule, value: string) => {
|
||||||
if (value && props.type === 'add') {
|
if (value && lastValue.value !== value) {
|
||||||
const res:any = await verifyValue({
|
const res:any = await verifyValue({
|
||||||
terms: [
|
terms: [
|
||||||
{
|
{
|
||||||
|
@ -133,6 +133,7 @@ onMounted(() => {
|
||||||
form.value.ordinal = props.sort
|
form.value.ordinal = props.sort
|
||||||
} else {
|
} else {
|
||||||
form.value = props.data
|
form.value = props.data
|
||||||
|
lastValue.value = props.data.value
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue