wui-components-v2 1.2.5 → 1.2.6

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.
@@ -539,7 +539,8 @@ function submit() {
539
539
  })
540
540
  }
541
541
  }
542
- resolve({ ...clearValueMap, ...data })
542
+ console.log('data', { ...data, ...clearValueMap }, clearValueMap, data)
543
+ resolve({ ...data, ...clearValueMap })
543
544
  } else {
544
545
  reject(valid)
545
546
  }
@@ -557,7 +558,9 @@ defineExpose({
557
558
  })
558
559
  const clearValueMap = fields.value.reduce(
559
560
  (acc, field) => {
560
- acc[field.id] = field.clearValueOnHidden ? '' : (field.defaultValue ?? null)
561
+ if (field.clearValueOnHidden == true) {
562
+ acc[field.id] = ''
563
+ }
561
564
  return acc
562
565
  },
563
566
  {} as Record<string, any>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wui-components-v2",
3
- "version": "1.2.5",
3
+ "version": "1.2.6",
4
4
  "description": "wui 组件库",
5
5
  "author": "wgxshh",
6
6
  "license": "MIT",