easybill-ui 0.1.13 → 0.1.14

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.
@@ -85,14 +85,15 @@ export default defineComponent({
85
85
  // 先从schema中读取默认值
86
86
  const schemaValues = sFormSchema.value.formItem.reduce<Fields>((previousValue, currentValue) => {
87
87
  currentValue.eventObject ??= {}
88
- typeof currentValue.value == "undefined" ? false : currentValue.prop && (previousValue[currentValue.prop] = currentValue.value)
88
+ typeof currentValue.value == "undefined" ? false : currentValue.prop && (typeof formModel[currentValue.prop] == "undefined" || formModel[currentValue.prop] === "" || formModel[currentValue.prop] === null) && (previousValue[currentValue.prop] = currentValue.value)
89
89
  return previousValue
90
90
  }, {})
91
91
 
92
92
  Object.assign(formModel, schemaValues)
93
+ console.log("schemaValues", schemaValues)
93
94
  // 如果有默认值,则覆盖
94
95
  props.fields && Object.assign(formModel, props.fields)
95
- Object.assign(formModel, props.modelValue)
96
+ // Object.assign(formModel, props.modelValue)
96
97
  // props.modelValue && Object.assign(formModel, props.modelValue)
97
98
  // 异步设置默认数据
98
99
  sFormSchema.value.formItem.forEach(async (item) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easybill-ui",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": "A component library for easybill",
5
5
  "author": "tuchongyang <779311998@qq.com>",
6
6
  "private": false,
@@ -14,5 +14,5 @@
14
14
  "publishConfig": {
15
15
  "access": "public"
16
16
  },
17
- "gitHead": "226a17bb08a84762991632ed3f084f2ae2638501"
17
+ "gitHead": "8a9392f0d1915d38c8f9a58e6cd88a0fe1b63156"
18
18
  }