@fangzhongya/fang-ui 0.1.36 → 0.1.38

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 (111) hide show
  1. package/dist/components/box-adjust/src/data.cjs +2 -2
  2. package/dist/components/box-adjust/src/data.d.ts +2 -2
  3. package/dist/components/box-adjust/src/data.js +2 -2
  4. package/dist/components/buttons/src/data.cjs +8 -4
  5. package/dist/components/buttons/src/data.d.ts +33 -4
  6. package/dist/components/buttons/src/data.js +8 -4
  7. package/dist/components/buttons/src/index2.cjs +12 -2
  8. package/dist/components/buttons/src/index2.js +14 -4
  9. package/dist/components/common/use.cjs +5 -3
  10. package/dist/components/common/use.js +5 -3
  11. package/dist/components/dates2/src/data.cjs +1 -1
  12. package/dist/components/dates2/src/data.d.ts +1 -1
  13. package/dist/components/dates2/src/data.js +1 -1
  14. package/dist/components/double/index.css +2 -1
  15. package/dist/components/double/index.scss +2 -1
  16. package/dist/components/forms/index.css +2 -1
  17. package/dist/components/forms/src/setup.cjs +8 -23
  18. package/dist/components/forms/src/setup.d.ts +1 -1
  19. package/dist/components/forms/src/setup.js +11 -26
  20. package/dist/components/forms/src/util.cjs +85 -17
  21. package/dist/components/forms/src/util.d.ts +2 -1
  22. package/dist/components/forms/src/util.js +87 -19
  23. package/dist/components/list/index.css +1 -1
  24. package/dist/components/list/index.scss +1 -1
  25. package/dist/components/list/src/data.cjs +3 -0
  26. package/dist/components/list/src/data.d.ts +3 -0
  27. package/dist/components/list/src/data.js +3 -0
  28. package/dist/components/list/src/index2.cjs +18 -13
  29. package/dist/components/list/src/index2.js +16 -11
  30. package/dist/components/list/src/util.cjs +12 -2
  31. package/dist/components/list/src/util.d.ts +1 -0
  32. package/dist/components/list/src/util.js +12 -2
  33. package/dist/components/list/style/index2.scss +1 -0
  34. package/dist/components/lists/index.css +1 -1
  35. package/dist/components/lists/src/data.d.ts +3 -3
  36. package/dist/components/lists/src/index2.cjs +9 -9
  37. package/dist/components/lists/src/index2.js +9 -9
  38. package/dist/components/listsp/index.css +1 -1
  39. package/dist/components/listspd/index.css +1 -1
  40. package/dist/components/no-data/src/data.cjs +2 -2
  41. package/dist/components/no-data/src/data.d.ts +2 -2
  42. package/dist/components/no-data/src/data.js +2 -2
  43. package/dist/components/no-data/src/index2.cjs +2 -2
  44. package/dist/components/no-data/src/index2.js +2 -2
  45. package/dist/components/page/index.css +3 -2
  46. package/dist/components/selector/index.css +2 -1
  47. package/dist/components/tables/common/com-but.cjs +4 -0
  48. package/dist/components/tables/common/com-but.js +4 -0
  49. package/dist/components/tables/common/{table-but2.cjs → com-but2.cjs} +17 -13
  50. package/dist/components/tables/common/{table-but2.js → com-but2.js} +14 -10
  51. package/dist/components/tables/common/com-color.cjs +4 -0
  52. package/dist/components/tables/common/com-color.js +4 -0
  53. package/dist/components/tables/common/{table-color2.cjs → com-color2.cjs} +21 -8
  54. package/dist/components/tables/common/{table-color2.js → com-color2.js} +23 -10
  55. package/dist/components/tables/common/com-fig.cjs +4 -0
  56. package/dist/components/tables/common/com-fig.js +4 -0
  57. package/dist/components/tables/common/com-fig2.cjs +92 -0
  58. package/dist/components/tables/common/com-fig2.js +92 -0
  59. package/dist/components/tables/common/com-lis.cjs +4 -0
  60. package/dist/components/tables/common/com-lis.js +4 -0
  61. package/dist/components/tables/common/com-lis2.cjs +151 -0
  62. package/dist/components/tables/common/com-lis2.js +151 -0
  63. package/dist/components/tables/common/pagin.d.ts +14 -6
  64. package/dist/components/tables/common/util.cjs +12 -0
  65. package/dist/components/tables/common/util.d.ts +1 -0
  66. package/dist/components/tables/common/util.js +12 -0
  67. package/dist/components/tables/src/column.cjs +5 -2
  68. package/dist/components/tables/src/column.js +6 -3
  69. package/dist/components/tables/src/columns2.cjs +9 -7
  70. package/dist/components/tables/src/columns2.js +9 -7
  71. package/dist/components/tables/src/data.d.ts +3 -3
  72. package/dist/components/tables/style/index2.scss +1 -0
  73. package/dist/components/tablesv/src/column.cjs +7 -4
  74. package/dist/components/tablesv/src/column.js +8 -5
  75. package/dist/components/tablesv/src/columns2.cjs +9 -7
  76. package/dist/components/tablesv/src/columns2.js +9 -7
  77. package/dist/components/tablesv/src/data.d.ts +3 -3
  78. package/dist/components/tablesv/src/index2.cjs +10 -1
  79. package/dist/components/tablesv/src/index2.js +10 -1
  80. package/dist/components/window/src/data.cjs +1 -1
  81. package/dist/components/window/src/data.d.ts +1 -1
  82. package/dist/components/window/src/data.js +1 -1
  83. package/dist/css/double.css +2 -1
  84. package/dist/css/forms.css +2 -1
  85. package/dist/css/index.css +3 -2
  86. package/dist/css/list.css +1 -1
  87. package/dist/css/lists.css +1 -1
  88. package/dist/css/listsp.css +1 -1
  89. package/dist/css/listspd.css +1 -1
  90. package/dist/css/page.css +3 -2
  91. package/dist/css/selector.css +2 -1
  92. package/dist/icons/index.json +1 -1
  93. package/dist/index.css +3 -2
  94. package/dist/type.d.ts +12 -3
  95. package/package.json +2 -2
  96. package/dist/components/tables/common/img.cjs +0 -4
  97. package/dist/components/tables/common/img.js +0 -4
  98. package/dist/components/tables/common/img2.cjs +0 -37
  99. package/dist/components/tables/common/img2.js +0 -37
  100. package/dist/components/tables/common/table-but.cjs +0 -4
  101. package/dist/components/tables/common/table-but.js +0 -4
  102. package/dist/components/tables/common/table-color.cjs +0 -4
  103. package/dist/components/tables/common/table-color.js +0 -4
  104. package/dist/components/tables/common/table-list.cjs +0 -4
  105. package/dist/components/tables/common/table-list.js +0 -4
  106. package/dist/components/tables/common/table-list2.cjs +0 -125
  107. package/dist/components/tables/common/table-list2.js +0 -125
  108. /package/dist/components/{forms-items → forms-item}/index.css +0 -0
  109. /package/dist/components/{draggable → keep-com}/index.css +0 -0
  110. /package/dist/css/{forms-items.css → forms-item.css} +0 -0
  111. /package/dist/css/{draggable.css → keep-com.css} +0 -0
@@ -20,7 +20,7 @@ const dataProps = buildProps.buildProps({
20
20
  type: Boolean
21
21
  },
22
22
  /**
23
- * @props { Boolean } max= ( )
23
+ * @props { Boolean } isMax= ( )
24
24
  * 是否显示最大化
25
25
  */
26
26
  isMax: {
@@ -28,7 +28,7 @@ const dataProps = buildProps.buildProps({
28
28
  },
29
29
  /**
30
30
  * @props { Boolean } max= ( )
31
- * 是否要最大化
31
+ * 是否最大化
32
32
  */
33
33
  max: {
34
34
  type: Boolean
@@ -20,7 +20,7 @@ export declare const dataProps: {
20
20
  type: BooleanConstructor;
21
21
  };
22
22
  /**
23
- * @props { Boolean } max= ( )
23
+ * @props { Boolean } isMax= ( )
24
24
  * 是否显示最大化
25
25
  */
26
26
  isMax: {
@@ -28,7 +28,7 @@ export declare const dataProps: {
28
28
  };
29
29
  /**
30
30
  * @props { Boolean } max= ( )
31
- * 是否要最大化
31
+ * 是否最大化
32
32
  */
33
33
  max: {
34
34
  type: BooleanConstructor;
@@ -18,7 +18,7 @@ const dataProps = buildProps({
18
18
  type: Boolean
19
19
  },
20
20
  /**
21
- * @props { Boolean } max= ( )
21
+ * @props { Boolean } isMax= ( )
22
22
  * 是否显示最大化
23
23
  */
24
24
  isMax: {
@@ -26,7 +26,7 @@ const dataProps = buildProps({
26
26
  },
27
27
  /**
28
28
  * @props { Boolean } max= ( )
29
- * 是否要最大化
29
+ * 是否最大化
30
30
  */
31
31
  max: {
32
32
  type: Boolean
@@ -1,24 +1,28 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const list = require("../../common/list.cjs");
3
4
  const name = "buttons";
4
5
  const dataProps = {
5
- options: {
6
- type: [Array]
7
- },
6
+ ...list.props,
8
7
  isFather: {
9
8
  type: Boolean
10
9
  },
10
+ isValue: {
11
+ type: Boolean
12
+ },
11
13
  disabled: {
12
14
  type: Boolean
13
15
  }
14
16
  };
15
- const dataEmits = ["clicks"];
17
+ const dataHandle = list.comHandle;
18
+ const dataEmits = [...list.emits, "clicks"];
16
19
  const dataSlot = {
17
20
  default: "default"
18
21
  };
19
22
  const dataExpose = {};
20
23
  exports.dataEmits = dataEmits;
21
24
  exports.dataExpose = dataExpose;
25
+ exports.dataHandle = dataHandle;
22
26
  exports.dataProps = dataProps;
23
27
  exports.dataSlot = dataSlot;
24
28
  exports.name = name;
@@ -1,9 +1,19 @@
1
1
  import { ExtractPropTypes } from 'vue';
2
+ import { comHandle } from '../../common/list';
2
3
  /**
3
4
  * @title {h3} buttons
4
5
  */
5
6
  export declare const name = "buttons";
6
7
  export declare const dataProps: {
8
+ isFather: {
9
+ type: BooleanConstructor;
10
+ };
11
+ isValue: {
12
+ type: BooleanConstructor;
13
+ };
14
+ disabled: {
15
+ type: BooleanConstructor;
16
+ };
7
17
  options: {
8
18
  type: {
9
19
  (arrayLength: number): ObjAny[];
@@ -20,13 +30,31 @@ export declare const dataProps: {
20
30
  fromAsync<T>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>): Promise<T[]>;
21
31
  fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>, index: number) => U, thisArg?: any): Promise<Awaited<U>[]>;
22
32
  readonly [Symbol.species]: ArrayConstructor;
23
- }[];
33
+ };
34
+ default(): never[];
24
35
  };
25
- isFather: {
36
+ clearAbsent: {
26
37
  type: BooleanConstructor;
27
38
  };
28
- disabled: {
29
- type: BooleanConstructor;
39
+ label: {
40
+ type: (StringConstructor | FunctionConstructor)[];
41
+ default: string;
42
+ };
43
+ prop: {
44
+ type: (StringConstructor | FunctionConstructor)[];
45
+ default: string;
46
+ };
47
+ modelValue: {
48
+ type: null;
49
+ };
50
+ multiple: {
51
+ type: (BooleanConstructor | StringConstructor)[];
52
+ };
53
+ load: {
54
+ type: BooleanConstructor[];
55
+ };
56
+ optobj: {
57
+ type: BooleanConstructor[];
30
58
  };
31
59
  };
32
60
  export type DataProps = ExtractPropTypes<typeof dataProps>;
@@ -34,6 +62,7 @@ export type DataProps = ExtractPropTypes<typeof dataProps>;
34
62
  * @emits change (val:[String, Array])
35
63
  * 选择的时间
36
64
  */
65
+ export declare const dataHandle: typeof comHandle;
37
66
  export declare const dataEmits: string[];
38
67
  export type DataEmits = typeof dataEmits;
39
68
  /**
@@ -1,16 +1,19 @@
1
+ import { props, comHandle, emits } from "../../common/list.js";
1
2
  const name = "buttons";
2
3
  const dataProps = {
3
- options: {
4
- type: [Array]
5
- },
4
+ ...props,
6
5
  isFather: {
7
6
  type: Boolean
8
7
  },
8
+ isValue: {
9
+ type: Boolean
10
+ },
9
11
  disabled: {
10
12
  type: Boolean
11
13
  }
12
14
  };
13
- const dataEmits = ["clicks"];
15
+ const dataHandle = comHandle;
16
+ const dataEmits = [...emits, "clicks"];
14
17
  const dataSlot = {
15
18
  default: "default"
16
19
  };
@@ -18,6 +21,7 @@ const dataExpose = {};
18
21
  export {
19
22
  dataEmits,
20
23
  dataExpose,
24
+ dataHandle,
21
25
  dataProps,
22
26
  dataSlot,
23
27
  name
@@ -14,6 +14,16 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
14
14
  const prs = __props;
15
15
  const props = index$1.usePropsDefault(data.name, prs, data.dataProps);
16
16
  const emit = __emit;
17
+ const listFuObj = data.dataHandle(props, emit);
18
+ const value = listFuObj.value;
19
+ const multiple = listFuObj.multiple;
20
+ const valueOptions = vue.computed(() => {
21
+ if (props.isValue) {
22
+ return listFuObj.getValueObjs(value.value);
23
+ } else {
24
+ return props.options;
25
+ }
26
+ });
17
27
  function onClick(obj, index2, $event) {
18
28
  if (obj.click) {
19
29
  obj.click(obj, index2, $event);
@@ -25,7 +35,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
25
35
  ...data.dataExpose
26
36
  });
27
37
  return (_ctx, _cache) => {
28
- return vue.unref(props).isFather ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(vue.unref(props).options, (item, index2) => {
38
+ return vue.unref(props).isFather ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(valueOptions.value, (item, index2) => {
29
39
  return vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: index2 }, [
30
40
  !item.hide ? (vue.openBlock(), vue.createBlock(vue.unref(index$2.Button), vue.mergeProps({
31
41
  key: 0,
@@ -44,7 +54,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
44
54
  key: 1,
45
55
  class: vue.normalizeClass(vue.unref(cs).z())
46
56
  }, [
47
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(props).options, (item, index2) => {
57
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(valueOptions.value, (item, index2) => {
48
58
  return vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: index2 }, [
49
59
  !item.hide ? (vue.openBlock(), vue.createBlock(vue.unref(index$2.Button), vue.mergeProps({
50
60
  key: 0,
@@ -1,6 +1,6 @@
1
- import { defineComponent, createElementBlock, unref, openBlock, Fragment, renderList, createBlock, createCommentVNode, mergeProps, withModifiers, withCtx, createTextVNode, toDisplayString, normalizeClass } from "vue";
1
+ import { defineComponent, computed, createElementBlock, unref, openBlock, Fragment, renderList, createBlock, createCommentVNode, mergeProps, withModifiers, withCtx, createTextVNode, toDisplayString, normalizeClass } from "vue";
2
2
  import { Button } from "../../button/index.js";
3
- import { name, dataProps, dataExpose, dataEmits } from "./data.js";
3
+ import { name, dataProps, dataHandle, dataExpose, dataEmits } from "./data.js";
4
4
  import { usePropsDefault, getProps } from "../../../hooks/props-default/index.js";
5
5
  import { useCssName } from "../../../hooks/cssname/index.js";
6
6
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -12,6 +12,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
12
12
  const prs = __props;
13
13
  const props = usePropsDefault(name, prs, dataProps);
14
14
  const emit = __emit;
15
+ const listFuObj = dataHandle(props, emit);
16
+ const value = listFuObj.value;
17
+ const multiple = listFuObj.multiple;
18
+ const valueOptions = computed(() => {
19
+ if (props.isValue) {
20
+ return listFuObj.getValueObjs(value.value);
21
+ } else {
22
+ return props.options;
23
+ }
24
+ });
15
25
  function onClick(obj, index, $event) {
16
26
  if (obj.click) {
17
27
  obj.click(obj, index, $event);
@@ -23,7 +33,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
23
33
  ...dataExpose
24
34
  });
25
35
  return (_ctx, _cache) => {
26
- return unref(props).isFather ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(unref(props).options, (item, index) => {
36
+ return unref(props).isFather ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(valueOptions.value, (item, index) => {
27
37
  return openBlock(), createElementBlock(Fragment, { key: index }, [
28
38
  !item.hide ? (openBlock(), createBlock(unref(Button), mergeProps({
29
39
  key: 0,
@@ -42,7 +52,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
42
52
  key: 1,
43
53
  class: normalizeClass(unref(cs).z())
44
54
  }, [
45
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(props).options, (item, index) => {
55
+ (openBlock(true), createElementBlock(Fragment, null, renderList(valueOptions.value, (item, index) => {
46
56
  return openBlock(), createElementBlock(Fragment, { key: index }, [
47
57
  !item.hide ? (openBlock(), createBlock(unref(Button), mergeProps({
48
58
  key: 0,
@@ -150,7 +150,7 @@ function getValueObjs(value, multiple, options, config) {
150
150
  return value;
151
151
  }
152
152
  }
153
- function setOptionsValue(value, obj, data, optionss) {
153
+ function setOptionsValue(value, obj, data, optionss = {}) {
154
154
  let options = [];
155
155
  if (obj == null ? void 0 : obj.options) {
156
156
  const opt = obj.options;
@@ -226,7 +226,7 @@ function processOptions(obj, componObj, optionss, value, data) {
226
226
  }
227
227
  function renderComponent(tcom, compon, componObj, value, compons) {
228
228
  if (Object.keys(compons).includes(tcom)) {
229
- return vue.h(compons[tcom], componObj, value);
229
+ return vue.h(compons[tcom], componObj);
230
230
  }
231
231
  if (shared.isHTMLTag(compon) || shared.isSVGTag(compon)) {
232
232
  return vue.h(compon, componObj, value);
@@ -284,13 +284,15 @@ function useSetCompon(obj, data, optionss, compons, emit, index, scope) {
284
284
  ...attrs,
285
285
  ...obj.config,
286
286
  ...getOnObjs(obj, data, emit, scope),
287
- multiple: obj.multiple,
288
287
  [componValueName]: value,
289
288
  ["onUpdate:" + componValueName]: (v) => setValue(v, obj, data),
290
289
  listobj: obj,
291
290
  valueobj: data,
292
291
  comscope: scope
293
292
  };
293
+ if (obj.multiple) {
294
+ componObj.multiple = obj.multiple;
295
+ }
294
296
  if (typeof obj.compon == "string") {
295
297
  return setComponString(
296
298
  value,
@@ -148,7 +148,7 @@ function getValueObjs(value, multiple, options, config) {
148
148
  return value;
149
149
  }
150
150
  }
151
- function setOptionsValue(value, obj, data, optionss) {
151
+ function setOptionsValue(value, obj, data, optionss = {}) {
152
152
  let options = [];
153
153
  if (obj == null ? void 0 : obj.options) {
154
154
  const opt = obj.options;
@@ -224,7 +224,7 @@ function processOptions(obj, componObj, optionss, value, data) {
224
224
  }
225
225
  function renderComponent(tcom, compon, componObj, value, compons) {
226
226
  if (Object.keys(compons).includes(tcom)) {
227
- return h(compons[tcom], componObj, value);
227
+ return h(compons[tcom], componObj);
228
228
  }
229
229
  if (isHTMLTag(compon) || isSVGTag(compon)) {
230
230
  return h(compon, componObj, value);
@@ -282,13 +282,15 @@ function useSetCompon(obj, data, optionss, compons, emit, index, scope) {
282
282
  ...attrs,
283
283
  ...obj.config,
284
284
  ...getOnObjs(obj, data, emit, scope),
285
- multiple: obj.multiple,
286
285
  [componValueName]: value,
287
286
  ["onUpdate:" + componValueName]: (v) => setValue(v, obj, data),
288
287
  listobj: obj,
289
288
  valueobj: data,
290
289
  comscope: scope
291
290
  };
291
+ if (obj.multiple) {
292
+ componObj.multiple = obj.multiple;
293
+ }
292
294
  if (typeof obj.compon == "string") {
293
295
  return setComponString(
294
296
  value,
@@ -24,7 +24,7 @@ const dataProps = {
24
24
  type: Array
25
25
  },
26
26
  /**
27
- * @props {String, Number, Date, Array} modelValue/v-model 时间数据
27
+ * @props {String, Number, Date, Array} modelValue 时间数据
28
28
  */
29
29
  modelValue: {
30
30
  type: [String, Number, Date, Array]
@@ -58,7 +58,7 @@ export declare const dataProps: {
58
58
  };
59
59
  };
60
60
  /**
61
- * @props {String, Number, Date, Array} modelValue/v-model 时间数据
61
+ * @props {String, Number, Date, Array} modelValue 时间数据
62
62
  */
63
63
  modelValue: {
64
64
  type: (DateConstructor | StringConstructor | NumberConstructor | {
@@ -22,7 +22,7 @@ const dataProps = {
22
22
  type: Array
23
23
  },
24
24
  /**
25
- * @props {String, Number, Date, Array} modelValue/v-model 时间数据
25
+ * @props {String, Number, Date, Array} modelValue 时间数据
26
26
  */
27
27
  modelValue: {
28
28
  type: [String, Number, Date, Array]
@@ -26,7 +26,8 @@
26
26
  width: 100%;
27
27
  display: inline-flex;
28
28
  align-items: center;
29
- padding: 1px;
29
+ box-sizing: content-box;
30
+ padding: 1.2px 1px;
30
31
  position: relative;
31
32
  box-shadow: 0 0 0 1px var(--el-input-border-color, var(--el-border-color)) inset;
32
33
  border-radius: var(--el-input-border-radius, var(--el-border-radius-base));
@@ -5,7 +5,8 @@ $double: 'double';
5
5
  width: 100%;
6
6
  display: inline-flex;
7
7
  align-items: center;
8
- padding: 1px;
8
+ box-sizing: content-box;
9
+ padding: 1.2px 1px;
9
10
  position: relative;
10
11
  box-shadow: 0 0 0 1px
11
12
  var(--#{e()}input-border-color, var(--#{e()}border-color)) inset;
@@ -53,7 +53,8 @@
53
53
  width: 100%;
54
54
  display: inline-flex;
55
55
  align-items: center;
56
- padding: 1px;
56
+ box-sizing: content-box;
57
+ padding: 1.2px 1px;
57
58
  position: relative;
58
59
  box-shadow: 0 0 0 1px var(--el-input-border-color, var(--el-border-color)) inset;
59
60
  border-radius: var(--el-input-border-radius, var(--el-border-radius-base));
@@ -5,7 +5,6 @@ const config = require("../common/config.cjs");
5
5
  const util = require("./util.cjs");
6
6
  require("../../../utils/css.cjs");
7
7
  const use = require("../../common/use.cjs");
8
- const lineToLargeHump = require("@fangzhongya/utils/name/lineToLargeHump");
9
8
  const vue = require("vue");
10
9
  const index$1 = require("../../../hooks/compons/index.cjs");
11
10
  const index = require("../../forms-items/index.cjs");
@@ -99,15 +98,15 @@ function setUp(props, emit, cs, refForm, getLocale) {
99
98
  setListValue(props.list);
100
99
  }
101
100
  const triggerMap = {
102
- "1": getLocale("form.import"),
103
- "2": getLocale("form.select"),
101
+ blur: getLocale("form.import"),
102
+ change: getLocale("form.select"),
104
103
  verif: getLocale("form.verif")
105
104
  };
106
105
  function getRules() {
107
106
  const rules = {};
108
107
  const setListValue = (arr, listobj) => {
109
108
  arr == null ? void 0 : arr.forEach((obj) => {
110
- var _a, _b;
109
+ var _a;
111
110
  if (listobj) {
112
111
  obj.father = obj.father ?? listobj;
113
112
  }
@@ -115,34 +114,20 @@ function setUp(props, emit, cs, refForm, getLocale) {
115
114
  setListValue(obj.children, obj);
116
115
  }
117
116
  use.setFormDefaultValue(obj, dataForm.value);
118
- let trigger = 1;
119
- if (typeof obj.compon == "string") {
120
- if (config.changes.includes(lineToLargeHump.lineToLargeHump(obj.compon))) {
121
- trigger = 2;
122
- }
123
- }
124
117
  obj.config = obj.config ?? {};
125
- const labeltext = obj.labelText ?? use.getLabelText(obj.label);
126
- if (((_a = obj.config) == null ? void 0 : _a.placeholder) === void 0) {
127
- obj.config.placeholder = triggerMap[trigger + ""] + labeltext;
128
- }
129
- if (((_b = obj.config) == null ? void 0 : _b.clearable) === void 0) {
118
+ if (((_a = obj.config) == null ? void 0 : _a.clearable) === void 0) {
130
119
  obj.config.clearable = true;
131
120
  }
121
+ if (!obj.rule) {
122
+ util.setPlaceholder(obj, triggerMap);
123
+ }
132
124
  if (obj.prop) {
133
125
  const p = use.getFormRule(obj) ?? obj.prop;
134
126
  obj.__prop = p;
135
127
  if (obj.rules) {
136
128
  rules[p] = obj.rules;
137
129
  } else if (obj.rule) {
138
- rules[p] = util.getRule(
139
- labeltext,
140
- trigger,
141
- obj,
142
- dataForm,
143
- refForm,
144
- triggerMap
145
- );
130
+ rules[p] = util.getRule(obj, dataForm, refForm, triggerMap);
146
131
  } else {
147
132
  rules[p] = [];
148
133
  }
@@ -1,5 +1,5 @@
1
1
  import { DataProps } from './data';
2
- import { UseCssNameReturn } from '../../../hooks/cssname';
2
+ import { UseCssNameReturn } from '../../../hooks/cssname/index';
3
3
  import { CSSProperties, Ref, WritableComputedRef, ComputedRef } from 'vue';
4
4
  type Emit = (...args: any[]) => void;
5
5
  export declare function setUp(props: DataProps, emit: Emit, cs: UseCssNameReturn, refForm: any, getLocale: Function): {
@@ -1,9 +1,8 @@
1
1
  import { dataHandle } from "./data.js";
2
- import { provides, changes } from "../common/config.js";
3
- import { getRule } from "./util.js";
2
+ import { provides } from "../common/config.js";
3
+ import { setPlaceholder, getRule } from "./util.js";
4
4
  import "../../../utils/css.js";
5
- import { setFormDefaultValue, getLabelText, getFormRule } from "../../common/use.js";
6
- import { lineToLargeHump } from "@fangzhongya/utils/name/lineToLargeHump";
5
+ import { setFormDefaultValue, getFormRule } from "../../common/use.js";
7
6
  import { computed, provide, isProxy, ref, watch } from "vue";
8
7
  import { useCompons } from "../../../hooks/compons/index.js";
9
8
  import { FormsItems } from "../../forms-items/index.js";
@@ -97,15 +96,15 @@ function setUp(props, emit, cs, refForm, getLocale) {
97
96
  setListValue(props.list);
98
97
  }
99
98
  const triggerMap = {
100
- "1": getLocale("form.import"),
101
- "2": getLocale("form.select"),
99
+ blur: getLocale("form.import"),
100
+ change: getLocale("form.select"),
102
101
  verif: getLocale("form.verif")
103
102
  };
104
103
  function getRules() {
105
104
  const rules = {};
106
105
  const setListValue = (arr, listobj) => {
107
106
  arr == null ? void 0 : arr.forEach((obj) => {
108
- var _a, _b;
107
+ var _a;
109
108
  if (listobj) {
110
109
  obj.father = obj.father ?? listobj;
111
110
  }
@@ -113,34 +112,20 @@ function setUp(props, emit, cs, refForm, getLocale) {
113
112
  setListValue(obj.children, obj);
114
113
  }
115
114
  setFormDefaultValue(obj, dataForm.value);
116
- let trigger = 1;
117
- if (typeof obj.compon == "string") {
118
- if (changes.includes(lineToLargeHump(obj.compon))) {
119
- trigger = 2;
120
- }
121
- }
122
115
  obj.config = obj.config ?? {};
123
- const labeltext = obj.labelText ?? getLabelText(obj.label);
124
- if (((_a = obj.config) == null ? void 0 : _a.placeholder) === void 0) {
125
- obj.config.placeholder = triggerMap[trigger + ""] + labeltext;
126
- }
127
- if (((_b = obj.config) == null ? void 0 : _b.clearable) === void 0) {
116
+ if (((_a = obj.config) == null ? void 0 : _a.clearable) === void 0) {
128
117
  obj.config.clearable = true;
129
118
  }
119
+ if (!obj.rule) {
120
+ setPlaceholder(obj, triggerMap);
121
+ }
130
122
  if (obj.prop) {
131
123
  const p = getFormRule(obj) ?? obj.prop;
132
124
  obj.__prop = p;
133
125
  if (obj.rules) {
134
126
  rules[p] = obj.rules;
135
127
  } else if (obj.rule) {
136
- rules[p] = getRule(
137
- labeltext,
138
- trigger,
139
- obj,
140
- dataForm,
141
- refForm,
142
- triggerMap
143
- );
128
+ rules[p] = getRule(obj, dataForm, refForm, triggerMap);
144
129
  } else {
145
130
  rules[p] = [];
146
131
  }