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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "af-mobile-client-vue3",
3
3
  "type": "module",
4
- "version": "1.2.29",
4
+ "version": "1.2.31",
5
5
  "packageManager": "pnpm@10.12.3",
6
6
  "description": "Vue + Vite component lib",
7
7
  "engines": {
@@ -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.value = newVal
288
+ Object.assign(form, newVal)
290
289
  }
291
290
  })
292
291
 
293
- watch(
294
- () => form.value,
295
- (val) => {
296
- if (typeof formDataChange === 'function') {
297
- formDataChange(val)
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(() => {