@fangzhongya/fang-ui 0.1.80 → 0.1.82

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.
Files changed (29) hide show
  1. package/dist/components/common/use.cjs +24 -11
  2. package/dist/components/common/use.js +24 -11
  3. package/dist/components/edit-data/src/data/bigint2.cjs +2 -2
  4. package/dist/components/edit-data/src/data/bigint2.js +3 -3
  5. package/dist/components/edit-data/src/data/boolean2.cjs +2 -2
  6. package/dist/components/edit-data/src/data/boolean2.js +3 -3
  7. package/dist/components/edit-data/src/data/date2.cjs +2 -2
  8. package/dist/components/edit-data/src/data/date2.js +3 -3
  9. package/dist/components/edit-data/src/data/not2.cjs +2 -2
  10. package/dist/components/edit-data/src/data/not2.js +3 -3
  11. package/dist/components/edit-data/src/data/number2.cjs +2 -2
  12. package/dist/components/edit-data/src/data/number2.js +3 -3
  13. package/dist/components/edit-data/src/data/string2.cjs +3 -3
  14. package/dist/components/edit-data/src/data/string2.js +4 -4
  15. package/dist/components/edit-data/src/data/symbol2.cjs +2 -2
  16. package/dist/components/edit-data/src/data/symbol2.js +3 -3
  17. package/dist/components/edit-data/src/data.cjs +7 -1
  18. package/dist/components/edit-data/src/data.d.ts +10 -2
  19. package/dist/components/edit-data/src/data.js +7 -1
  20. package/dist/components/edit-data/src/index2.cjs +6 -6
  21. package/dist/components/edit-data/src/index2.js +6 -6
  22. package/dist/components/edit-data-add/src/index2.cjs +10 -10
  23. package/dist/components/edit-data-add/src/index2.js +10 -10
  24. package/dist/icons/index.json +1 -1
  25. package/package.json +4 -4
  26. /package/dist/components/{edit-data → edit-data-add}/index.css +0 -0
  27. /package/dist/components/{collapse-item → option-group}/index.css +0 -0
  28. /package/dist/css/{edit-data.css → edit-data-add.css} +0 -0
  29. /package/dist/css/{collapse-item.css → option-group.css} +0 -0
@@ -43,9 +43,9 @@ function processFatherObject(obj, currentValue, row, is) {
43
43
  }
44
44
  function getFatherValue(obj, currentValue) {
45
45
  if (obj.pars) {
46
- return objValue.getObjValue(obj.prop, currentValue) ?? obj.default;
46
+ return objValue.getObjValue(obj.prop, currentValue) ?? getDefault(obj);
47
47
  }
48
- return (currentValue == null ? void 0 : currentValue[obj.prop]) ?? obj.default;
48
+ return (currentValue == null ? void 0 : currentValue[obj.prop]) ?? getDefault(obj);
49
49
  }
50
50
  function useVueValue(v, key) {
51
51
  if (key) {
@@ -103,6 +103,16 @@ function getFormRule(obj) {
103
103
  fps.push(prop);
104
104
  return fps.join(".");
105
105
  }
106
+ function getDefault(obj) {
107
+ if (obj.default) {
108
+ if (typeof obj.default == "function") {
109
+ return obj.default(obj);
110
+ } else {
111
+ return obj.default;
112
+ }
113
+ }
114
+ return void 0;
115
+ }
106
116
  function setComputed(obj, v) {
107
117
  if (!obj.computed) return;
108
118
  if (obj.default) {
@@ -112,7 +122,7 @@ function setComputed(obj, v) {
112
122
  }
113
123
  }
114
124
  function handleComputedWithDefault(obj, v) {
115
- const value = obj.default;
125
+ const value = getDefault(obj);
116
126
  if (Array.isArray(obj.computed)) {
117
127
  handleArrayComputedWithDefault(obj.computed, value, v);
118
128
  } else if (obj.computed.set) {
@@ -137,11 +147,14 @@ function handleComputedWithoutDefault(obj, v) {
137
147
  } else if (obj.computed.get) {
138
148
  v[obj.prop] = obj.computed.get(currentValue, v, obj);
139
149
  }
140
- obj.default = v[obj.prop];
150
+ const z = v[obj.prop];
151
+ obj.default = () => z;
141
152
  } else if (Array.isArray(obj.computed)) {
142
- obj.default = obj.computed.map((key) => v[key]);
153
+ const z = obj.computed.map((key) => v[key]);
154
+ obj.default = () => z;
143
155
  } else if (obj.computed.get) {
144
- obj.default = obj.computed.get(void 0, v, obj);
156
+ const z = obj.computed.get(void 0, v, obj);
157
+ obj.default = () => z;
145
158
  }
146
159
  }
147
160
  function setFormDefaultValue(obj, value) {
@@ -154,16 +167,16 @@ function setFormDefaultValue(obj, value) {
154
167
  if (prop) {
155
168
  if (v) {
156
169
  if (obj.pars) {
157
- objValue.setObjValue(v, prop, objValue.getObjValue(prop, v) ?? obj.default);
170
+ objValue.setObjValue(v, prop, objValue.getObjValue(prop, v) ?? getDefault(obj));
158
171
  } else {
159
- v[prop] = v[prop] ?? obj.default;
172
+ v[prop] = v[prop] ?? getDefault(obj);
160
173
  }
161
174
  } else {
162
175
  v = getFatherData(obj, value, true);
163
176
  if (obj.pars) {
164
- objValue.setObjValue(v, prop, objValue.getObjValue(prop, v) ?? obj.default);
177
+ objValue.setObjValue(v, prop, objValue.getObjValue(prop, v) ?? getDefault(obj));
165
178
  } else {
166
- v[prop] = v[prop] ?? obj.default;
179
+ v[prop] = v[prop] ?? getDefault(obj);
167
180
  }
168
181
  }
169
182
  }
@@ -207,7 +220,7 @@ function getValue(obj, data, index2) {
207
220
  if (obj.formatter) {
208
221
  return obj.formatter(data, obj, cellValue, index2, cdata);
209
222
  } else {
210
- return cellValue ?? obj.default;
223
+ return cellValue ?? getDefault(obj);
211
224
  }
212
225
  }
213
226
  function getListObjValue(value, obj, data, index2) {
@@ -41,9 +41,9 @@ function processFatherObject(obj, currentValue, row, is) {
41
41
  }
42
42
  function getFatherValue(obj, currentValue) {
43
43
  if (obj.pars) {
44
- return getObjValue(obj.prop, currentValue) ?? obj.default;
44
+ return getObjValue(obj.prop, currentValue) ?? getDefault(obj);
45
45
  }
46
- return (currentValue == null ? void 0 : currentValue[obj.prop]) ?? obj.default;
46
+ return (currentValue == null ? void 0 : currentValue[obj.prop]) ?? getDefault(obj);
47
47
  }
48
48
  function useVueValue(v, key) {
49
49
  if (key) {
@@ -101,6 +101,16 @@ function getFormRule(obj) {
101
101
  fps.push(prop);
102
102
  return fps.join(".");
103
103
  }
104
+ function getDefault(obj) {
105
+ if (obj.default) {
106
+ if (typeof obj.default == "function") {
107
+ return obj.default(obj);
108
+ } else {
109
+ return obj.default;
110
+ }
111
+ }
112
+ return void 0;
113
+ }
104
114
  function setComputed(obj, v) {
105
115
  if (!obj.computed) return;
106
116
  if (obj.default) {
@@ -110,7 +120,7 @@ function setComputed(obj, v) {
110
120
  }
111
121
  }
112
122
  function handleComputedWithDefault(obj, v) {
113
- const value = obj.default;
123
+ const value = getDefault(obj);
114
124
  if (Array.isArray(obj.computed)) {
115
125
  handleArrayComputedWithDefault(obj.computed, value, v);
116
126
  } else if (obj.computed.set) {
@@ -135,11 +145,14 @@ function handleComputedWithoutDefault(obj, v) {
135
145
  } else if (obj.computed.get) {
136
146
  v[obj.prop] = obj.computed.get(currentValue, v, obj);
137
147
  }
138
- obj.default = v[obj.prop];
148
+ const z = v[obj.prop];
149
+ obj.default = () => z;
139
150
  } else if (Array.isArray(obj.computed)) {
140
- obj.default = obj.computed.map((key) => v[key]);
151
+ const z = obj.computed.map((key) => v[key]);
152
+ obj.default = () => z;
141
153
  } else if (obj.computed.get) {
142
- obj.default = obj.computed.get(void 0, v, obj);
154
+ const z = obj.computed.get(void 0, v, obj);
155
+ obj.default = () => z;
143
156
  }
144
157
  }
145
158
  function setFormDefaultValue(obj, value) {
@@ -152,16 +165,16 @@ function setFormDefaultValue(obj, value) {
152
165
  if (prop) {
153
166
  if (v) {
154
167
  if (obj.pars) {
155
- setObjValue(v, prop, getObjValue(prop, v) ?? obj.default);
168
+ setObjValue(v, prop, getObjValue(prop, v) ?? getDefault(obj));
156
169
  } else {
157
- v[prop] = v[prop] ?? obj.default;
170
+ v[prop] = v[prop] ?? getDefault(obj);
158
171
  }
159
172
  } else {
160
173
  v = getFatherData(obj, value, true);
161
174
  if (obj.pars) {
162
- setObjValue(v, prop, getObjValue(prop, v) ?? obj.default);
175
+ setObjValue(v, prop, getObjValue(prop, v) ?? getDefault(obj));
163
176
  } else {
164
- v[prop] = v[prop] ?? obj.default;
177
+ v[prop] = v[prop] ?? getDefault(obj);
165
178
  }
166
179
  }
167
180
  }
@@ -205,7 +218,7 @@ function getValue(obj, data, index) {
205
218
  if (obj.formatter) {
206
219
  return obj.formatter(data, obj, cellValue, index, cdata);
207
220
  } else {
208
- return cellValue ?? obj.default;
221
+ return cellValue ?? getDefault(obj);
209
222
  }
210
223
  }
211
224
  function getListObjValue(value, obj, data, index) {
@@ -35,10 +35,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
35
35
  return vue.openBlock(), vue.createElementBlock("div", {
36
36
  class: vue.normalizeClass(vue.unref(cs).z("bigint"))
37
37
  }, [
38
- vue.createVNode(vue.unref(index$2.InputNum), {
38
+ vue.createVNode(vue.unref(index$2.InputNum), vue.mergeProps(props.config, {
39
39
  modelValue: value.value,
40
40
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event)
41
- }, null, 8, ["modelValue"])
41
+ }), null, 16, ["modelValue"])
42
42
  ], 2);
43
43
  };
44
44
  }
@@ -1,4 +1,4 @@
1
- import { defineComponent, computed, createElementBlock, openBlock, normalizeClass, unref, createVNode } from "vue";
1
+ import { defineComponent, computed, createElementBlock, openBlock, normalizeClass, unref, createVNode, mergeProps } from "vue";
2
2
  import { dataDataEmits, dataDataProps, name } from "../data.js";
3
3
  import { useCssName } from "../../../../hooks/cssname/index.js";
4
4
  import { useLocale } from "../../../../hooks/locale/index.js";
@@ -33,10 +33,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
33
33
  return openBlock(), createElementBlock("div", {
34
34
  class: normalizeClass(unref(cs).z("bigint"))
35
35
  }, [
36
- createVNode(unref(InputNum), {
36
+ createVNode(unref(InputNum), mergeProps(props.config, {
37
37
  modelValue: value.value,
38
38
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event)
39
- }, null, 8, ["modelValue"])
39
+ }), null, 16, ["modelValue"])
40
40
  ], 2);
41
41
  };
42
42
  }
@@ -45,11 +45,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
45
45
  return vue.openBlock(), vue.createElementBlock("div", {
46
46
  class: vue.normalizeClass(vue.unref(cs).z("boolean"))
47
47
  }, [
48
- vue.createVNode(vue.unref(index$2.Switchs), {
48
+ vue.createVNode(vue.unref(index$2.Switchs), vue.mergeProps(props.config, {
49
49
  options,
50
50
  modelValue: value.value,
51
51
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event)
52
- }, null, 8, ["modelValue"])
52
+ }), null, 16, ["modelValue"])
53
53
  ], 2);
54
54
  };
55
55
  }
@@ -1,4 +1,4 @@
1
- import { defineComponent, computed, createElementBlock, openBlock, normalizeClass, unref, createVNode } from "vue";
1
+ import { defineComponent, computed, createElementBlock, openBlock, normalizeClass, unref, createVNode, mergeProps } from "vue";
2
2
  import { name, dataDataEmits, dataDataProps } from "../data.js";
3
3
  import { useCssName } from "../../../../hooks/cssname/index.js";
4
4
  import { useLocale } from "../../../../hooks/locale/index.js";
@@ -43,11 +43,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
43
43
  return openBlock(), createElementBlock("div", {
44
44
  class: normalizeClass(unref(cs).z("boolean"))
45
45
  }, [
46
- createVNode(unref(Switchs), {
46
+ createVNode(unref(Switchs), mergeProps(props.config, {
47
47
  options,
48
48
  modelValue: value.value,
49
49
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event)
50
- }, null, 8, ["modelValue"])
50
+ }), null, 16, ["modelValue"])
51
51
  ], 2);
52
52
  };
53
53
  }
@@ -36,11 +36,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
36
36
  return vue.openBlock(), vue.createElementBlock("div", {
37
37
  class: vue.normalizeClass(vue.unref(cs).z("date"))
38
38
  }, [
39
- vue.createVNode(vue.unref(index$2.Dates), {
39
+ vue.createVNode(vue.unref(index$2.Dates), vue.mergeProps(props.config, {
40
40
  modelValue: value.value,
41
41
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event),
42
42
  type: "datetime"
43
- }, null, 8, ["modelValue"])
43
+ }), null, 16, ["modelValue"])
44
44
  ], 2);
45
45
  };
46
46
  }
@@ -1,4 +1,4 @@
1
- import { defineComponent, computed, createElementBlock, openBlock, normalizeClass, unref, createVNode } from "vue";
1
+ import { defineComponent, computed, createElementBlock, openBlock, normalizeClass, unref, createVNode, mergeProps } from "vue";
2
2
  import { dataDataEmits, dataDataProps, name } from "../data.js";
3
3
  import { Dates } from "../../../dates/index.js";
4
4
  import { useCssName } from "../../../../hooks/cssname/index.js";
@@ -34,11 +34,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
34
34
  return openBlock(), createElementBlock("div", {
35
35
  class: normalizeClass(unref(cs).z("date"))
36
36
  }, [
37
- createVNode(unref(Dates), {
37
+ createVNode(unref(Dates), mergeProps(props.config, {
38
38
  modelValue: value.value,
39
39
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event),
40
40
  type: "datetime"
41
- }, null, 8, ["modelValue"])
41
+ }), null, 16, ["modelValue"])
42
42
  ], 2);
43
43
  };
44
44
  }
@@ -44,11 +44,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
44
44
  return vue.openBlock(), vue.createElementBlock("div", {
45
45
  class: vue.normalizeClass(vue.unref(cs).z("not"))
46
46
  }, [
47
- vue.createVNode(vue.unref(index$2.Checks), {
47
+ vue.createVNode(vue.unref(index$2.Checks), vue.mergeProps(props.config, {
48
48
  options,
49
49
  modelValue: value.value,
50
50
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event)
51
- }, null, 8, ["modelValue"])
51
+ }), null, 16, ["modelValue"])
52
52
  ], 2);
53
53
  };
54
54
  }
@@ -1,4 +1,4 @@
1
- import { defineComponent, computed, createElementBlock, openBlock, normalizeClass, unref, createVNode } from "vue";
1
+ import { defineComponent, computed, createElementBlock, openBlock, normalizeClass, unref, createVNode, mergeProps } from "vue";
2
2
  import { dataDataEmits, dataDataProps, name } from "../data.js";
3
3
  import { useCssName } from "../../../../hooks/cssname/index.js";
4
4
  import { useLocale } from "../../../../hooks/locale/index.js";
@@ -42,11 +42,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
42
42
  return openBlock(), createElementBlock("div", {
43
43
  class: normalizeClass(unref(cs).z("not"))
44
44
  }, [
45
- createVNode(unref(Checks), {
45
+ createVNode(unref(Checks), mergeProps(props.config, {
46
46
  options,
47
47
  modelValue: value.value,
48
48
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event)
49
- }, null, 8, ["modelValue"])
49
+ }), null, 16, ["modelValue"])
50
50
  ], 2);
51
51
  };
52
52
  }
@@ -35,10 +35,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
35
35
  return vue.openBlock(), vue.createElementBlock("div", {
36
36
  class: vue.normalizeClass(vue.unref(cs).z("number"))
37
37
  }, [
38
- vue.createVNode(vue.unref(index$2.InputNum), {
38
+ vue.createVNode(vue.unref(index$2.InputNum), vue.mergeProps(props.config, {
39
39
  modelValue: value.value,
40
40
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event)
41
- }, null, 8, ["modelValue"])
41
+ }), null, 16, ["modelValue"])
42
42
  ], 2);
43
43
  };
44
44
  }
@@ -1,4 +1,4 @@
1
- import { defineComponent, computed, createElementBlock, openBlock, normalizeClass, unref, createVNode } from "vue";
1
+ import { defineComponent, computed, createElementBlock, openBlock, normalizeClass, unref, createVNode, mergeProps } from "vue";
2
2
  import { name, dataDataEmits, dataDataProps } from "../data.js";
3
3
  import { useCssName } from "../../../../hooks/cssname/index.js";
4
4
  import { useLocale } from "../../../../hooks/locale/index.js";
@@ -33,10 +33,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
33
33
  return openBlock(), createElementBlock("div", {
34
34
  class: normalizeClass(unref(cs).z("number"))
35
35
  }, [
36
- createVNode(unref(InputNum), {
36
+ createVNode(unref(InputNum), mergeProps(props.config, {
37
37
  modelValue: value.value,
38
38
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event)
39
- }, null, 8, ["modelValue"])
39
+ }), null, 16, ["modelValue"])
40
40
  ], 2);
41
41
  };
42
42
  }
@@ -35,11 +35,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
35
35
  return vue.openBlock(), vue.createElementBlock("div", {
36
36
  class: vue.normalizeClass(vue.unref(cs).z("string"))
37
37
  }, [
38
- vue.createVNode(vue.unref(index$2.Inputs), {
39
- type: "textarea",
38
+ vue.createVNode(vue.unref(index$2.Inputs), vue.mergeProps(props.config, {
39
+ type: props.config.type || "textarea",
40
40
  modelValue: value.value,
41
41
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event)
42
- }, null, 8, ["modelValue"])
42
+ }), null, 16, ["type", "modelValue"])
43
43
  ], 2);
44
44
  };
45
45
  }
@@ -1,4 +1,4 @@
1
- import { defineComponent, computed, createElementBlock, openBlock, normalizeClass, unref, createVNode } from "vue";
1
+ import { defineComponent, computed, createElementBlock, openBlock, normalizeClass, unref, createVNode, mergeProps } from "vue";
2
2
  import { name, dataDataEmits, dataDataProps } from "../data.js";
3
3
  import { useCssName } from "../../../../hooks/cssname/index.js";
4
4
  import { useLocale } from "../../../../hooks/locale/index.js";
@@ -33,11 +33,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
33
33
  return openBlock(), createElementBlock("div", {
34
34
  class: normalizeClass(unref(cs).z("string"))
35
35
  }, [
36
- createVNode(unref(Inputs), {
37
- type: "textarea",
36
+ createVNode(unref(Inputs), mergeProps(props.config, {
37
+ type: props.config.type || "textarea",
38
38
  modelValue: value.value,
39
39
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event)
40
- }, null, 8, ["modelValue"])
40
+ }), null, 16, ["type", "modelValue"])
41
41
  ], 2);
42
42
  };
43
43
  }
@@ -48,10 +48,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
48
48
  return vue.openBlock(), vue.createElementBlock("div", {
49
49
  class: vue.normalizeClass(vue.unref(cs).z("symbol"))
50
50
  }, [
51
- vue.createVNode(vue.unref(index$2.Inputs), {
51
+ vue.createVNode(vue.unref(index$2.Inputs), vue.mergeProps(props.config, {
52
52
  modelValue: value.value,
53
53
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event)
54
- }, null, 8, ["modelValue"])
54
+ }), null, 16, ["modelValue"])
55
55
  ], 2);
56
56
  };
57
57
  }
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, computed, createElementBlock, openBlock, normalizeClass, unref, createVNode } from "vue";
1
+ import { defineComponent, ref, computed, createElementBlock, openBlock, normalizeClass, unref, createVNode, mergeProps } from "vue";
2
2
  import { dataDataEmits, dataDataProps, name } from "../data.js";
3
3
  import { useCssName } from "../../../../hooks/cssname/index.js";
4
4
  import { useLocale } from "../../../../hooks/locale/index.js";
@@ -46,10 +46,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
46
46
  return openBlock(), createElementBlock("div", {
47
47
  class: normalizeClass(unref(cs).z("symbol"))
48
48
  }, [
49
- createVNode(unref(Inputs), {
49
+ createVNode(unref(Inputs), mergeProps(props.config, {
50
50
  modelValue: value.value,
51
51
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event)
52
- }, null, 8, ["modelValue"])
52
+ }), null, 16, ["modelValue"])
53
53
  ], 2);
54
54
  };
55
55
  }
@@ -10,7 +10,13 @@ const dataProps = buildProps.buildProps({
10
10
  type: {
11
11
  type: String
12
12
  },
13
- typeObj: { type: [Array, String] },
13
+ types: { type: [Array, String] },
14
+ config: {
15
+ type: Object,
16
+ default() {
17
+ return {};
18
+ }
19
+ },
14
20
  /**
15
21
  * @props { } modelValue 值
16
22
  * @model
@@ -13,7 +13,7 @@ export declare const dataProps: {
13
13
  type: {
14
14
  type: StringConstructor;
15
15
  };
16
- typeObj: {
16
+ types: {
17
17
  type: (StringConstructor | {
18
18
  (arrayLength: number): string[];
19
19
  (...items: string[]): string[];
@@ -31,6 +31,10 @@ export declare const dataProps: {
31
31
  readonly [Symbol.species]: ArrayConstructor;
32
32
  })[];
33
33
  };
34
+ config: {
35
+ type: ObjectConstructor;
36
+ default(): {};
37
+ };
34
38
  /**
35
39
  * @props { } modelValue 值
36
40
  * @model
@@ -103,7 +107,7 @@ export declare const dataDataProps: {
103
107
  type: {
104
108
  type: StringConstructor;
105
109
  };
106
- typeObj: {
110
+ types: {
107
111
  type: (StringConstructor | {
108
112
  (arrayLength: number): string[];
109
113
  (...items: string[]): string[];
@@ -121,6 +125,10 @@ export declare const dataDataProps: {
121
125
  readonly [Symbol.species]: ArrayConstructor;
122
126
  })[];
123
127
  };
128
+ config: {
129
+ type: ObjectConstructor;
130
+ default(): {};
131
+ };
124
132
  /**
125
133
  * @props { } modelValue 值
126
134
  * @model
@@ -8,7 +8,13 @@ const dataProps = buildProps({
8
8
  type: {
9
9
  type: String
10
10
  },
11
- typeObj: { type: [Array, String] },
11
+ types: { type: [Array, String] },
12
+ config: {
13
+ type: Object,
14
+ default() {
15
+ return {};
16
+ }
17
+ },
12
18
  /**
13
19
  * @props { } modelValue 值
14
20
  * @model
@@ -127,11 +127,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
127
127
  if (tps.value.length > 0) {
128
128
  return tps.value;
129
129
  } else {
130
- if (props.typeObj) {
131
- if (typeof props.typeObj === "string") {
132
- return [props.typeObj];
130
+ if (props.types) {
131
+ if (typeof props.types === "string") {
132
+ return [props.types];
133
133
  } else {
134
- return props.typeObj;
134
+ return props.types;
135
135
  }
136
136
  }
137
137
  return [];
@@ -151,11 +151,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
151
151
  title: type.value
152
152
  }, [
153
153
  (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(compon.value), vue.mergeProps(vue.unref(props), {
154
- typeObj: typeobjs.value,
154
+ types: typeobjs.value,
155
155
  type: type.value,
156
156
  modelValue: value.value,
157
157
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event)
158
- }), null, 16, ["typeObj", "type", "modelValue"]))
158
+ }), null, 16, ["types", "type", "modelValue"]))
159
159
  ], 10, _hoisted_1);
160
160
  };
161
161
  }
@@ -125,11 +125,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
125
125
  if (tps.value.length > 0) {
126
126
  return tps.value;
127
127
  } else {
128
- if (props.typeObj) {
129
- if (typeof props.typeObj === "string") {
130
- return [props.typeObj];
128
+ if (props.types) {
129
+ if (typeof props.types === "string") {
130
+ return [props.types];
131
131
  } else {
132
- return props.typeObj;
132
+ return props.types;
133
133
  }
134
134
  }
135
135
  return [];
@@ -149,11 +149,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
149
149
  title: type.value
150
150
  }, [
151
151
  (openBlock(), createBlock(resolveDynamicComponent(compon.value), mergeProps(unref(props), {
152
- typeObj: typeobjs.value,
152
+ types: typeobjs.value,
153
153
  type: type.value,
154
154
  modelValue: value.value,
155
155
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event)
156
- }), null, 16, ["typeObj", "type", "modelValue"]))
156
+ }), null, 16, ["types", "type", "modelValue"]))
157
157
  ], 10, _hoisted_1);
158
158
  };
159
159
  }
@@ -93,11 +93,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
93
93
  };
94
94
  const options = vue.computed(() => {
95
95
  let arr = [];
96
- if (props.typeObj) {
97
- if (typeof props.typeObj === "string") {
98
- arr.push(props.typeObj);
96
+ if (props.types) {
97
+ if (typeof props.types === "string") {
98
+ arr.push(props.types);
99
99
  } else {
100
- arr = props.typeObj;
100
+ arr = props.types;
101
101
  }
102
102
  arr = arr.filter((v2) => Boolean(v2)).map((v2) => getType(v2));
103
103
  }
@@ -114,11 +114,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
114
114
  if (tps.value.length > 0) {
115
115
  return tps.value;
116
116
  } else {
117
- if (props.typeObj) {
118
- if (typeof props.typeObj === "string") {
119
- return [props.typeObj];
117
+ if (props.types) {
118
+ if (typeof props.types === "string") {
119
+ return [props.types];
120
120
  } else {
121
- return props.typeObj;
121
+ return props.types;
122
122
  }
123
123
  }
124
124
  return [];
@@ -200,11 +200,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
200
200
  ], 2),
201
201
  typevalue.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
202
202
  (vue.openBlock(), vue.createBlock(vue.unref(index$7.EditData), vue.mergeProps({ key: typevalue.value }, vue.unref(props), {
203
- typeObj: typeobjs.value,
203
+ types: typeobjs.value,
204
204
  type: typevalue.value,
205
205
  modelValue: valueData.value,
206
206
  "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => valueData.value = $event)
207
- }), null, 16, ["typeObj", "type", "modelValue"]))
207
+ }), null, 16, ["types", "type", "modelValue"]))
208
208
  ])) : vue.createCommentVNode("", true)
209
209
  ], 2)
210
210
  ], 2),
@@ -91,11 +91,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
91
91
  };
92
92
  const options = computed(() => {
93
93
  let arr = [];
94
- if (props.typeObj) {
95
- if (typeof props.typeObj === "string") {
96
- arr.push(props.typeObj);
94
+ if (props.types) {
95
+ if (typeof props.types === "string") {
96
+ arr.push(props.types);
97
97
  } else {
98
- arr = props.typeObj;
98
+ arr = props.types;
99
99
  }
100
100
  arr = arr.filter((v2) => Boolean(v2)).map((v2) => getType(v2));
101
101
  }
@@ -112,11 +112,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
112
112
  if (tps.value.length > 0) {
113
113
  return tps.value;
114
114
  } else {
115
- if (props.typeObj) {
116
- if (typeof props.typeObj === "string") {
117
- return [props.typeObj];
115
+ if (props.types) {
116
+ if (typeof props.types === "string") {
117
+ return [props.types];
118
118
  } else {
119
- return props.typeObj;
119
+ return props.types;
120
120
  }
121
121
  }
122
122
  return [];
@@ -198,11 +198,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
198
198
  ], 2),
199
199
  typevalue.value ? (openBlock(), createElementBlock("div", _hoisted_1, [
200
200
  (openBlock(), createBlock(unref(EditData), mergeProps({ key: typevalue.value }, unref(props), {
201
- typeObj: typeobjs.value,
201
+ types: typeobjs.value,
202
202
  type: typevalue.value,
203
203
  modelValue: valueData.value,
204
204
  "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => valueData.value = $event)
205
- }), null, 16, ["typeObj", "type", "modelValue"]))
205
+ }), null, 16, ["types", "type", "modelValue"]))
206
206
  ])) : createCommentVNode("", true)
207
207
  ], 2)
208
208
  ], 2),
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "prefix": "fang-ui",
3
3
  "info": {},
4
- "lastModified": 1770020771351,
4
+ "lastModified": 1770169436535,
5
5
  "icons": {
6
6
  "bar": {
7
7
  "body": " <path fill=\"currentColor\" d=\"M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64z\" ></path> "
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fangzhongya/fang-ui",
3
3
  "private": false,
4
- "version": "0.1.80",
4
+ "version": "0.1.82",
5
5
  "type": "module",
6
6
  "description ": "fang-ui",
7
7
  "keywords": [
@@ -52,12 +52,12 @@
52
52
  "vue-tsc": "^3.2.2",
53
53
  "vxe-table": "4.6.20",
54
54
  "@fang-ui/components": "0.0.1-0",
55
- "@fang-ui/directives": "0.0.1-0",
56
55
  "@fang-ui/icons": "0.0.1-0",
57
- "@fang-ui/hooks": "0.0.1-0",
58
- "@fang-ui/locale": "0.0.1-0",
56
+ "@fang-ui/directives": "0.0.1-0",
59
57
  "@fang-ui/theme": "0.0.1-0",
58
+ "@fang-ui/hooks": "0.0.1-0",
60
59
  "@fang-ui/types": "0.0.1-0",
60
+ "@fang-ui/locale": "0.0.1-0",
61
61
  "@fang-ui/utils": "0.0.1-0"
62
62
  },
63
63
  "main": "./dist/index.cjs",
File without changes