af-mobile-client-vue3 1.2.29 → 1.2.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -209,7 +209,6 @@ function setupFormConfig(config: GroupFormItems) {
|
|
|
209
209
|
myServiceName.value = props.serviceName || ''
|
|
210
210
|
formGroupName.value = config.groupName || 'default'
|
|
211
211
|
form.value = props.formData || {}
|
|
212
|
-
|
|
213
212
|
// 清理并重新设置验证规则
|
|
214
213
|
setupValidationRules()
|
|
215
214
|
}
|
|
@@ -286,19 +285,15 @@ function resetForm() {
|
|
|
286
285
|
// 监听 formData 变化
|
|
287
286
|
watch(() => props.formData, (newVal) => {
|
|
288
287
|
if (newVal) {
|
|
289
|
-
form
|
|
288
|
+
Object.assign(form, newVal)
|
|
290
289
|
}
|
|
291
290
|
})
|
|
292
291
|
|
|
293
|
-
watch(
|
|
294
|
-
()
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
}
|
|
299
|
-
},
|
|
300
|
-
{ deep: true },
|
|
301
|
-
)
|
|
292
|
+
watch(form, (newVal) => {
|
|
293
|
+
if (typeof formDataChange === 'function') {
|
|
294
|
+
formDataChange(newVal)
|
|
295
|
+
}
|
|
296
|
+
}, { deep: true })
|
|
302
297
|
|
|
303
298
|
// 组件挂载时初始化
|
|
304
299
|
onBeforeMount(() => {
|