fix: 修复EmbeddingConfigForm组件watch无限循环 [AC-AISVC-50]

This commit is contained in:
MerCry 2026-02-26 12:20:49 +08:00
parent a4af74751f
commit 6c16132557
1 changed files with 7 additions and 3 deletions

View File

@ -173,8 +173,10 @@ const initFormData = () => {
watch(
() => props.modelValue,
() => {
(newVal) => {
if (JSON.stringify(newVal) !== JSON.stringify(formData.value)) {
initFormData()
}
},
{ deep: true }
)
@ -190,7 +192,9 @@ watch(
watch(
formData,
(val) => {
if (JSON.stringify(val) !== JSON.stringify(props.modelValue)) {
emit('update:modelValue', val)
}
},
{ deep: true }
)