fix: 修复EmbeddingConfigForm组件watch无限循环 [AC-AISVC-50]
This commit is contained in:
parent
a4af74751f
commit
6c16132557
|
|
@ -173,8 +173,10 @@ const initFormData = () => {
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => props.modelValue,
|
() => props.modelValue,
|
||||||
() => {
|
(newVal) => {
|
||||||
initFormData()
|
if (JSON.stringify(newVal) !== JSON.stringify(formData.value)) {
|
||||||
|
initFormData()
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{ deep: true }
|
{ deep: true }
|
||||||
)
|
)
|
||||||
|
|
@ -190,7 +192,9 @@ watch(
|
||||||
watch(
|
watch(
|
||||||
formData,
|
formData,
|
||||||
(val) => {
|
(val) => {
|
||||||
emit('update:modelValue', val)
|
if (JSON.stringify(val) !== JSON.stringify(props.modelValue)) {
|
||||||
|
emit('update:modelValue', val)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{ deep: true }
|
{ deep: true }
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue