@fangzhongya/fang-ui 0.0.27 → 0.0.29

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 (110) hide show
  1. package/dist/components/array/src/index.cjs +6 -9
  2. package/dist/components/array/src/index.js +6 -9
  3. package/dist/components/button/index.d.ts +1 -1
  4. package/dist/components/button/src/index.d.ts +2 -2
  5. package/dist/components/cascader/index.d.ts +1 -1
  6. package/dist/components/cascader/src/index.d.ts +2 -2
  7. package/dist/components/checks/src/index.cjs +4 -4
  8. package/dist/components/checks/src/index.js +4 -4
  9. package/dist/components/common/list.cjs +2 -3
  10. package/dist/components/common/list.js +2 -3
  11. package/dist/components/common/use.cjs +11 -11
  12. package/dist/components/common/use.js +11 -11
  13. package/dist/components/cs-slot/src/index.cjs +6 -6
  14. package/dist/components/cs-slot/src/index.js +6 -6
  15. package/dist/components/dates/index.css +1 -1
  16. package/dist/components/dates/index.scss +4 -6
  17. package/dist/components/dialog/src/index.cjs +7 -11
  18. package/dist/components/dialog/src/index.js +8 -12
  19. package/dist/components/dialog/style/index2.scss +3 -0
  20. package/dist/components/edit-float/src/index2.cjs +2 -2
  21. package/dist/components/edit-float/src/index2.js +2 -2
  22. package/dist/components/el-tables/src/columns3.cjs +1 -1
  23. package/dist/components/el-tables/src/columns3.js +1 -1
  24. package/dist/components/el-tables/src/index.cjs +2 -3
  25. package/dist/components/el-tables/src/index.js +2 -3
  26. package/dist/components/forms/src/data.cjs +1 -1
  27. package/dist/components/forms/src/data.js +1 -1
  28. package/dist/components/forms/src/index.cjs +2 -2
  29. package/dist/components/forms/src/index.js +2 -2
  30. package/dist/components/forms/src/setup.cjs +5 -8
  31. package/dist/components/forms/src/setup.js +5 -8
  32. package/dist/components/forms/src/util.cjs +1 -2
  33. package/dist/components/forms/src/util.js +1 -2
  34. package/dist/components/forms-drag/src/index.cjs +2 -2
  35. package/dist/components/forms-drag/src/index.js +2 -2
  36. package/dist/components/forms-item/src/index.cjs +1 -1
  37. package/dist/components/forms-item/src/index.js +1 -1
  38. package/dist/components/forms-items/src/index.cjs +2 -2
  39. package/dist/components/forms-items/src/index.js +2 -2
  40. package/dist/components/global-config/src/index.cjs +1 -1
  41. package/dist/components/global-config/src/index.js +1 -1
  42. package/dist/components/icon-picker/src/index.cjs +4 -6
  43. package/dist/components/icon-picker/src/index.js +4 -6
  44. package/dist/components/input/index.d.ts +2 -2
  45. package/dist/components/input/src/index.d.ts +4 -4
  46. package/dist/components/input-history/src/util.d.ts +17 -0
  47. package/dist/components/input-number/index.d.ts +1 -1
  48. package/dist/components/input-number/src/index.d.ts +2 -2
  49. package/dist/components/input-select/index.d.ts +2 -2
  50. package/dist/components/input-select/src/index.d.ts +4 -4
  51. package/dist/components/input-select/src/index2.cjs +1 -1
  52. package/dist/components/input-select/src/index2.js +1 -1
  53. package/dist/components/labels/src/index2.cjs +1 -2
  54. package/dist/components/labels/src/index2.js +1 -2
  55. package/dist/components/menus/src/menu-ll.cjs +1 -1
  56. package/dist/components/menus/src/menu-ll.js +1 -1
  57. package/dist/components/page/src/index.cjs +65 -85
  58. package/dist/components/page/src/index.js +65 -85
  59. package/dist/components/page/src/set-column2.cjs +2 -2
  60. package/dist/components/page/src/set-column2.js +2 -2
  61. package/dist/components/right-key/index.d.ts +15 -0
  62. package/dist/components/right-key/src/data.cjs +5 -1
  63. package/dist/components/right-key/src/data.d.ts +4 -0
  64. package/dist/components/right-key/src/data.js +5 -1
  65. package/dist/components/right-key/src/index.cjs +6 -1
  66. package/dist/components/right-key/src/index.d.ts +9 -0
  67. package/dist/components/right-key/src/index.js +6 -1
  68. package/dist/components/role-select/src/index.cjs +1 -1
  69. package/dist/components/role-select/src/index.js +1 -1
  70. package/dist/components/selector/src/index2.cjs +2 -2
  71. package/dist/components/selector/src/index2.js +2 -2
  72. package/dist/components/selects/src/index.cjs +1 -1
  73. package/dist/components/selects/src/index.js +1 -1
  74. package/dist/components/stick-window/src/index.cjs +1 -1
  75. package/dist/components/stick-window/src/index.js +1 -1
  76. package/dist/components/switchs/src/index.cjs +4 -4
  77. package/dist/components/switchs/src/index.js +4 -4
  78. package/dist/components/table-list/src/table-list.cjs +10 -15
  79. package/dist/components/table-list/src/table-list.js +10 -15
  80. package/dist/components/tables/common/pagin.cjs +40 -57
  81. package/dist/components/tables/common/pagin.js +40 -57
  82. package/dist/components/tables/common/table-but.cjs +1 -2
  83. package/dist/components/tables/common/table-but.js +1 -2
  84. package/dist/components/tables/common/table-color.cjs +4 -5
  85. package/dist/components/tables/common/table-color.js +4 -5
  86. package/dist/components/tables/common/table-list.cjs +1 -2
  87. package/dist/components/tables/common/table-list.js +1 -2
  88. package/dist/components/tables/common/util.cjs +2 -3
  89. package/dist/components/tables/common/util.js +2 -3
  90. package/dist/components/tables/src/index.cjs +4 -5
  91. package/dist/components/tables/src/index.js +4 -5
  92. package/dist/components/tables-form/src/columns3.cjs +1 -1
  93. package/dist/components/tables-form/src/columns3.js +1 -1
  94. package/dist/components/tables-form/src/index.cjs +4 -7
  95. package/dist/components/tables-form/src/index.js +4 -7
  96. package/dist/components/tables-pagin/src/index.cjs +3 -4
  97. package/dist/components/tables-pagin/src/index.js +3 -4
  98. package/dist/components/tooltip/index.d.ts +1 -1
  99. package/dist/components/tooltip/src/index.d.ts +2 -2
  100. package/dist/components/vxe-tables/src/columns3.cjs +1 -1
  101. package/dist/components/vxe-tables/src/columns3.js +1 -1
  102. package/dist/components/vxe-tables/src/index.cjs +2 -3
  103. package/dist/components/vxe-tables/src/index.js +2 -3
  104. package/dist/directives/adjust/index.cjs +1 -2
  105. package/dist/directives/adjust/index.js +1 -2
  106. package/dist/hooks/global-config/index.cjs +2 -5
  107. package/dist/hooks/global-config/index.js +2 -5
  108. package/dist/index.css +1 -1
  109. package/package.json +13 -13
  110. /package/dist/components/{forms-items → forms-item}/index.css +0 -0
@@ -5,7 +5,7 @@ import { ElTableColumn } from "element-plus";
5
5
  import { setProps, setHeader, columnRender } from "./column.js";
6
6
  function getLists(arrs, emit, props, slots, listobj) {
7
7
  let arr = [];
8
- arrs == null ? void 0 : arrs.forEach((obj, index) => {
8
+ arrs?.forEach((obj, index) => {
9
9
  if (listobj) {
10
10
  obj.father = obj.father ?? listobj;
11
11
  }
@@ -42,10 +42,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
42
42
  }
43
43
  let isSort = false;
44
44
  const tableDefaultSort = vue.computed(() => {
45
- var _a, _b;
46
45
  return {
47
- prop: (_a = props.defaultSort) == null ? void 0 : _a.prop,
48
- order: (_b = props.defaultSort) == null ? void 0 : _b.order
46
+ prop: props.defaultSort?.prop,
47
+ order: props.defaultSort?.order
49
48
  };
50
49
  });
51
50
  const rowStyle = vue.computed(() => {
@@ -40,10 +40,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
40
40
  }
41
41
  let isSort = false;
42
42
  const tableDefaultSort = computed(() => {
43
- var _a, _b;
44
43
  return {
45
- prop: (_a = props.defaultSort) == null ? void 0 : _a.prop,
46
- order: (_b = props.defaultSort) == null ? void 0 : _b.order
44
+ prop: props.defaultSort?.prop,
45
+ order: props.defaultSort?.order
47
46
  };
48
47
  });
49
48
  const rowStyle = computed(() => {
@@ -74,7 +74,7 @@ const dataProps = {
74
74
  },
75
75
  queryInterval: {
76
76
  type: String,
77
- default: "10px"
77
+ default: "6px"
78
78
  },
79
79
  inlineRight: {
80
80
  type: String,
@@ -72,7 +72,7 @@ const dataProps = {
72
72
  },
73
73
  queryInterval: {
74
74
  type: String,
75
- default: "10px"
75
+ default: "6px"
76
76
  },
77
77
  inlineRight: {
78
78
  type: String,
@@ -88,12 +88,12 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
88
88
  key: setKey(item, index2),
89
89
  class: vue.normalizeClass([
90
90
  vue.unref(cs).z("li"),
91
- vue.unref(cs).is("div", item == null ? void 0 : item.isdiv),
91
+ vue.unref(cs).is("div", item?.isdiv),
92
92
  item.class
93
93
  ]),
94
94
  style: vue.normalizeStyle(vue.unref(setStyles)(item))
95
95
  }, [
96
- (item == null ? void 0 : item.isdiv) ? (vue.openBlock(), vue.createBlock(vue.unref(index$2.FormsDiv), {
96
+ item?.isdiv ? (vue.openBlock(), vue.createBlock(vue.unref(index$2.FormsDiv), {
97
97
  key: 0,
98
98
  listobj: item,
99
99
  optionss: props.options,
@@ -86,12 +86,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
86
86
  key: setKey(item, index),
87
87
  class: normalizeClass([
88
88
  unref(cs).z("li"),
89
- unref(cs).is("div", item == null ? void 0 : item.isdiv),
89
+ unref(cs).is("div", item?.isdiv),
90
90
  item.class
91
91
  ]),
92
92
  style: normalizeStyle(unref(setStyles)(item))
93
93
  }, [
94
- (item == null ? void 0 : item.isdiv) ? (openBlock(), createBlock(unref(FormsDiv), {
94
+ item?.isdiv ? (openBlock(), createBlock(unref(FormsDiv), {
95
95
  key: 0,
96
96
  listobj: item,
97
97
  optionss: props.options,
@@ -111,8 +111,7 @@ function setUp(props, emit, cs, refForm) {
111
111
  function getRules() {
112
112
  const rules = {};
113
113
  const setListValue = (arr, listobj) => {
114
- arr == null ? void 0 : arr.forEach((obj) => {
115
- var _a, _b;
114
+ arr?.forEach((obj) => {
116
115
  if (listobj) {
117
116
  obj.father = obj.father ?? listobj;
118
117
  }
@@ -129,10 +128,10 @@ function setUp(props, emit, cs, refForm) {
129
128
  }
130
129
  }
131
130
  obj.config = obj.config ?? {};
132
- if (((_a = obj.config) == null ? void 0 : _a.placeholder) === void 0) {
131
+ if (obj.config?.placeholder === void 0) {
133
132
  obj.config.placeholder = (trigger == 1 ? "请输入" : "请选择") + obj.label;
134
133
  }
135
- if (((_b = obj.config) == null ? void 0 : _b.clearable) === void 0) {
134
+ if (obj.config?.clearable === void 0) {
136
135
  obj.config.clearable = true;
137
136
  }
138
137
  if (obj.prop) {
@@ -204,12 +203,10 @@ function setUp(props, emit, cs, refForm) {
204
203
  });
205
204
  }
206
205
  function resetFields() {
207
- var _a;
208
- (_a = refForm.value) == null ? void 0 : _a.resetFields();
206
+ refForm.value?.resetFields();
209
207
  }
210
208
  function validateField(...arr) {
211
- var _a;
212
- (_a = refForm.value) == null ? void 0 : _a.validateField(...arr);
209
+ refForm.value?.validateField(...arr);
213
210
  }
214
211
  function closeForm() {
215
212
  resetFields();
@@ -109,8 +109,7 @@ function setUp(props, emit, cs, refForm) {
109
109
  function getRules() {
110
110
  const rules = {};
111
111
  const setListValue = (arr, listobj) => {
112
- arr == null ? void 0 : arr.forEach((obj) => {
113
- var _a, _b;
112
+ arr?.forEach((obj) => {
114
113
  if (listobj) {
115
114
  obj.father = obj.father ?? listobj;
116
115
  }
@@ -127,10 +126,10 @@ function setUp(props, emit, cs, refForm) {
127
126
  }
128
127
  }
129
128
  obj.config = obj.config ?? {};
130
- if (((_a = obj.config) == null ? void 0 : _a.placeholder) === void 0) {
129
+ if (obj.config?.placeholder === void 0) {
131
130
  obj.config.placeholder = (trigger == 1 ? "请输入" : "请选择") + obj.label;
132
131
  }
133
- if (((_b = obj.config) == null ? void 0 : _b.clearable) === void 0) {
132
+ if (obj.config?.clearable === void 0) {
134
133
  obj.config.clearable = true;
135
134
  }
136
135
  if (obj.prop) {
@@ -202,12 +201,10 @@ function setUp(props, emit, cs, refForm) {
202
201
  });
203
202
  }
204
203
  function resetFields() {
205
- var _a;
206
- (_a = refForm.value) == null ? void 0 : _a.resetFields();
204
+ refForm.value?.resetFields();
207
205
  }
208
206
  function validateField(...arr) {
209
- var _a;
210
- (_a = refForm.value) == null ? void 0 : _a.validateField(...arr);
207
+ refForm.value?.validateField(...arr);
211
208
  }
212
209
  function closeForm() {
213
210
  resetFields();
@@ -20,9 +20,8 @@ function _interopNamespaceDefault(e) {
20
20
  }
21
21
  const judge__namespace = /* @__PURE__ */ _interopNamespaceDefault(judge);
22
22
  function getRule(trigger, obj, data, refForm) {
23
- var _a;
24
23
  const name = obj.label;
25
- let multiple = obj.multiple ?? ((_a = obj.config) == null ? void 0 : _a.multiple);
24
+ let multiple = obj.multiple ?? obj.config?.multiple;
26
25
  const rule = obj.rule;
27
26
  if (typeof multiple != "boolean") {
28
27
  multiple = false;
@@ -1,9 +1,8 @@
1
1
  import { useHide } from "../../common/use.js";
2
2
  import * as judge from "@fangzhongya/utils/judge/judge";
3
3
  function getRule(trigger, obj, data, refForm) {
4
- var _a;
5
4
  const name = obj.label;
6
- let multiple = obj.multiple ?? ((_a = obj.config) == null ? void 0 : _a.multiple);
5
+ let multiple = obj.multiple ?? obj.config?.multiple;
7
6
  const rule = obj.rule;
8
7
  if (typeof multiple != "boolean") {
9
8
  multiple = false;
@@ -144,7 +144,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
144
144
  vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
145
145
  class: vue.normalizeClass(["handle", [
146
146
  vue.unref(cs).z("li"),
147
- vue.unref(cs).is("div", item == null ? void 0 : item.isDiv),
147
+ vue.unref(cs).is("div", item?.isDiv),
148
148
  item.class,
149
149
  props.itemClass,
150
150
  vue.unref(cs).is("hover", props.index == index2)
@@ -153,7 +153,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
153
153
  onClick: vue.withModifiers(($event) => onClickHandle(item, index2), ["stop"]),
154
154
  "data-key": index2
155
155
  }, [
156
- (item == null ? void 0 : item.isDiv) ? (vue.openBlock(), vue.createBlock(vue.unref(index$3.FormsDiv), {
156
+ item?.isDiv ? (vue.openBlock(), vue.createBlock(vue.unref(index$3.FormsDiv), {
157
157
  key: 0,
158
158
  listobj: item,
159
159
  optionss: props.options,
@@ -142,7 +142,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
142
142
  withDirectives((openBlock(), createElementBlock("div", {
143
143
  class: normalizeClass(["handle", [
144
144
  unref(cs).z("li"),
145
- unref(cs).is("div", item == null ? void 0 : item.isDiv),
145
+ unref(cs).is("div", item?.isDiv),
146
146
  item.class,
147
147
  props.itemClass,
148
148
  unref(cs).is("hover", props.index == index)
@@ -151,7 +151,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
151
151
  onClick: withModifiers(($event) => onClickHandle(item, index), ["stop"]),
152
152
  "data-key": index
153
153
  }, [
154
- (item == null ? void 0 : item.isDiv) ? (openBlock(), createBlock(unref(FormsDiv), {
154
+ item?.isDiv ? (openBlock(), createBlock(unref(FormsDiv), {
155
155
  key: 0,
156
156
  listobj: item,
157
157
  optionss: props.options,
@@ -30,7 +30,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
30
30
  });
31
31
  const itemProp = props.__prop ?? props.prop;
32
32
  const rowHeight = vue.computed(() => {
33
- return props.rowHeight ?? prs.rowHeight ?? (form == null ? void 0 : form.rowHeight);
33
+ return props.rowHeight ?? prs.rowHeight ?? form?.rowHeight;
34
34
  });
35
35
  function setLabelWidth(v) {
36
36
  if (v.hideLabel ?? prs.hideLabel) {
@@ -28,7 +28,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
28
28
  });
29
29
  const itemProp = props.__prop ?? props.prop;
30
30
  const rowHeight = computed(() => {
31
- return props.rowHeight ?? prs.rowHeight ?? (form == null ? void 0 : form.rowHeight);
31
+ return props.rowHeight ?? prs.rowHeight ?? form?.rowHeight;
32
32
  });
33
33
  function setLabelWidth(v) {
34
34
  if (v.hideLabel ?? prs.hideLabel) {
@@ -72,10 +72,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
72
72
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(props).children, (item, index2) => {
73
73
  return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
74
74
  key: setKey(item, index2),
75
- class: vue.normalizeClass([vue.unref(cs).z("li"), vue.unref(cs).is("div", item == null ? void 0 : item.isdiv), item.class]),
75
+ class: vue.normalizeClass([vue.unref(cs).z("li"), vue.unref(cs).is("div", item?.isdiv), item.class]),
76
76
  style: vue.normalizeStyle(setStyles(item))
77
77
  }, [
78
- (item == null ? void 0 : item.isdiv) ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.FormsDiv), vue.mergeProps({
78
+ item?.isdiv ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.FormsDiv), vue.mergeProps({
79
79
  key: 0,
80
80
  ref_for: true
81
81
  }, binds.value, {
@@ -70,10 +70,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
70
70
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(props).children, (item, index) => {
71
71
  return withDirectives((openBlock(), createElementBlock("div", {
72
72
  key: setKey(item, index),
73
- class: normalizeClass([unref(cs).z("li"), unref(cs).is("div", item == null ? void 0 : item.isdiv), item.class]),
73
+ class: normalizeClass([unref(cs).z("li"), unref(cs).is("div", item?.isdiv), item.class]),
74
74
  style: normalizeStyle(setStyles(item))
75
75
  }, [
76
- (item == null ? void 0 : item.isdiv) ? (openBlock(), createBlock(unref(FormsDiv), mergeProps({
76
+ item?.isdiv ? (openBlock(), createBlock(unref(FormsDiv), mergeProps({
77
77
  key: 0,
78
78
  ref_for: true
79
79
  }, binds.value, {
@@ -8,7 +8,7 @@ const SrcVue = vue.defineComponent({
8
8
  setup(props, { slots }) {
9
9
  const config = index.provideGlobalConfig(props);
10
10
  return () => vue.renderSlot(slots, "default", {
11
- config: config == null ? void 0 : config.value
11
+ config: config?.value
12
12
  });
13
13
  }
14
14
  });
@@ -6,7 +6,7 @@ const SrcVue = defineComponent({
6
6
  setup(props, { slots }) {
7
7
  const config = provideGlobalConfig(props);
8
8
  return () => renderSlot(slots, "default", {
9
- config: config == null ? void 0 : config.value
9
+ config: config?.value
10
10
  });
11
11
  }
12
12
  });
@@ -36,7 +36,6 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
36
36
  props: data.dataProps,
37
37
  emits: data.dataEmits,
38
38
  setup(__props, { expose: __expose, emit: __emit }) {
39
- var _a, _b;
40
39
  const { getLocale } = index.useLocale();
41
40
  const cs = index$1.useCssName("icon-picker");
42
41
  const props = __props;
@@ -44,10 +43,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
44
43
  let ac = "";
45
44
  if (props.icons) {
46
45
  if (props.icons instanceof Array) {
47
- ac = (_a = props.icons[0]) == null ? void 0 : _a.prefix;
46
+ ac = props.icons[0]?.prefix;
48
47
  } else {
49
48
  const k = Object.keys(props.icons)[0];
50
- ac = (_b = props.icons[k]) == null ? void 0 : _b.prefix;
49
+ ac = props.icons[k]?.prefix;
51
50
  }
52
51
  }
53
52
  const activeName = vue.ref(ac);
@@ -55,7 +54,6 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
55
54
  const search = vue.ref("");
56
55
  const value = vue.ref("");
57
56
  const currentIconList = vue.computed(() => {
58
- var _a2;
59
57
  let arr = {};
60
58
  if (activeName.value) {
61
59
  if (props.icons instanceof Array) {
@@ -63,12 +61,12 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
63
61
  const element = props.icons[index2];
64
62
  const name = element.prefix;
65
63
  if (name == activeName.value) {
66
- arr = (element == null ? void 0 : element.icons) || [];
64
+ arr = element?.icons || [];
67
65
  break;
68
66
  }
69
67
  }
70
68
  } else {
71
- arr = ((_a2 = props.icons[activeName.value]) == null ? void 0 : _a2.icons) || [];
69
+ arr = props.icons[activeName.value]?.icons || [];
72
70
  }
73
71
  }
74
72
  if (search.value) {
@@ -34,7 +34,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
34
34
  props: dataProps,
35
35
  emits: dataEmits,
36
36
  setup(__props, { expose: __expose, emit: __emit }) {
37
- var _a, _b;
38
37
  const { getLocale } = useLocale();
39
38
  const cs = useCssName("icon-picker");
40
39
  const props = __props;
@@ -42,10 +41,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
42
41
  let ac = "";
43
42
  if (props.icons) {
44
43
  if (props.icons instanceof Array) {
45
- ac = (_a = props.icons[0]) == null ? void 0 : _a.prefix;
44
+ ac = props.icons[0]?.prefix;
46
45
  } else {
47
46
  const k = Object.keys(props.icons)[0];
48
- ac = (_b = props.icons[k]) == null ? void 0 : _b.prefix;
47
+ ac = props.icons[k]?.prefix;
49
48
  }
50
49
  }
51
50
  const activeName = ref(ac);
@@ -53,7 +52,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
53
52
  const search = ref("");
54
53
  const value = ref("");
55
54
  const currentIconList = computed(() => {
56
- var _a2;
57
55
  let arr = {};
58
56
  if (activeName.value) {
59
57
  if (props.icons instanceof Array) {
@@ -61,12 +59,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
61
59
  const element = props.icons[index];
62
60
  const name = element.prefix;
63
61
  if (name == activeName.value) {
64
- arr = (element == null ? void 0 : element.icons) || [];
62
+ arr = element?.icons || [];
65
63
  break;
66
64
  }
67
65
  }
68
66
  } else {
69
- arr = ((_a2 = props.icons[activeName.value]) == null ? void 0 : _a2.icons) || [];
67
+ arr = props.icons[activeName.value]?.icons || [];
70
68
  }
71
69
  }
72
70
  if (search.value) {
@@ -44,9 +44,9 @@ declare const Input: {
44
44
  readonly size?: ("" | "default" | "small" | "large") | undefined;
45
45
  readonly name?: string | undefined;
46
46
  readonly form?: string | undefined;
47
+ readonly placeholder?: string | undefined;
47
48
  readonly ariaLabel?: string | undefined;
48
49
  readonly id?: string | undefined;
49
- readonly placeholder?: string | undefined;
50
50
  readonly prefixIcon?: (string | Component) | undefined;
51
51
  readonly inputmode?: "text" | "search" | "none" | "url" | "email" | "tel" | "numeric" | "decimal" | undefined;
52
52
  readonly maxlength?: (string | number) | undefined;
@@ -504,7 +504,7 @@ declare const Input: {
504
504
  onMouseenter?: ((evt: MouseEvent) => any) | undefined;
505
505
  onMouseleave?: ((evt: MouseEvent) => any) | undefined;
506
506
  onClear?: (() => any) | undefined;
507
- }, "clear" | "type" | "input" | "select" | "textarea" | "modelValue" | "ref" | "disabled" | "autofocus" | "id" | "tabindex" | "validateEvent" | "focus" | "blur" | "clearable" | "readonly" | "inputmode" | "autosize" | "autocomplete" | "showPassword" | "showWordLimit" | "containerRole" | "inputStyle" | "rows" | "textareaStyle" | "isComposing" | "resizeTextarea"> & ShallowUnwrapRef<{
507
+ }, "clear" | "type" | "input" | "select" | "textarea" | "modelValue" | "disabled" | "autofocus" | "ref" | "id" | "tabindex" | "validateEvent" | "focus" | "blur" | "clearable" | "readonly" | "inputmode" | "autosize" | "autocomplete" | "showPassword" | "showWordLimit" | "containerRole" | "inputStyle" | "rows" | "textareaStyle" | "isComposing" | "resizeTextarea"> & ShallowUnwrapRef<{
508
508
  input: ShallowRef<HTMLInputElement | undefined>;
509
509
  textarea: ShallowRef<HTMLTextAreaElement | undefined>;
510
510
  ref: ComputedRef<HTMLInputElement | HTMLTextAreaElement | undefined>;
@@ -44,9 +44,9 @@ declare function __VLS_template(): {
44
44
  readonly size?: ("" | "default" | "small" | "large") | undefined;
45
45
  readonly name?: string | undefined;
46
46
  readonly form?: string | undefined;
47
+ readonly placeholder?: string | undefined;
47
48
  readonly ariaLabel?: string | undefined;
48
49
  readonly id?: string | undefined;
49
- readonly placeholder?: string | undefined;
50
50
  readonly prefixIcon?: (string | Component) | undefined;
51
51
  readonly inputmode?: "text" | "search" | "none" | "url" | "email" | "tel" | "numeric" | "decimal" | undefined;
52
52
  readonly maxlength?: (string | number) | undefined;
@@ -504,7 +504,7 @@ declare function __VLS_template(): {
504
504
  onMouseenter?: ((evt: MouseEvent) => any) | undefined;
505
505
  onMouseleave?: ((evt: MouseEvent) => any) | undefined;
506
506
  onClear?: (() => any) | undefined;
507
- }, "clear" | "type" | "input" | "select" | "textarea" | "modelValue" | "ref" | "disabled" | "autofocus" | "id" | "tabindex" | "validateEvent" | "focus" | "blur" | "clearable" | "readonly" | "inputmode" | "autosize" | "autocomplete" | "showPassword" | "showWordLimit" | "containerRole" | "inputStyle" | "rows" | "textareaStyle" | "isComposing" | "resizeTextarea"> & ShallowUnwrapRef<{
507
+ }, "clear" | "type" | "input" | "select" | "textarea" | "modelValue" | "disabled" | "autofocus" | "ref" | "id" | "tabindex" | "validateEvent" | "focus" | "blur" | "clearable" | "readonly" | "inputmode" | "autosize" | "autocomplete" | "showPassword" | "showWordLimit" | "containerRole" | "inputStyle" | "rows" | "textareaStyle" | "isComposing" | "resizeTextarea"> & ShallowUnwrapRef<{
508
508
  input: ShallowRef<HTMLInputElement | undefined>;
509
509
  textarea: ShallowRef<HTMLTextAreaElement | undefined>;
510
510
  ref: ComputedRef<HTMLInputElement | HTMLTextAreaElement | undefined>;
@@ -570,9 +570,9 @@ declare const __VLS_component: DefineComponent<{}, {
570
570
  readonly size?: ("" | "default" | "small" | "large") | undefined;
571
571
  readonly name?: string | undefined;
572
572
  readonly form?: string | undefined;
573
+ readonly placeholder?: string | undefined;
573
574
  readonly ariaLabel?: string | undefined;
574
575
  readonly id?: string | undefined;
575
- readonly placeholder?: string | undefined;
576
576
  readonly prefixIcon?: (string | Component) | undefined;
577
577
  readonly inputmode?: "text" | "search" | "none" | "url" | "email" | "tel" | "numeric" | "decimal" | undefined;
578
578
  readonly maxlength?: (string | number) | undefined;
@@ -1030,7 +1030,7 @@ declare const __VLS_component: DefineComponent<{}, {
1030
1030
  onMouseenter?: ((evt: MouseEvent) => any) | undefined;
1031
1031
  onMouseleave?: ((evt: MouseEvent) => any) | undefined;
1032
1032
  onClear?: (() => any) | undefined;
1033
- }, "clear" | "type" | "input" | "select" | "textarea" | "modelValue" | "ref" | "disabled" | "autofocus" | "id" | "tabindex" | "validateEvent" | "focus" | "blur" | "clearable" | "readonly" | "inputmode" | "autosize" | "autocomplete" | "showPassword" | "showWordLimit" | "containerRole" | "inputStyle" | "rows" | "textareaStyle" | "isComposing" | "resizeTextarea"> & ShallowUnwrapRef<{
1033
+ }, "clear" | "type" | "input" | "select" | "textarea" | "modelValue" | "disabled" | "autofocus" | "ref" | "id" | "tabindex" | "validateEvent" | "focus" | "blur" | "clearable" | "readonly" | "inputmode" | "autosize" | "autocomplete" | "showPassword" | "showWordLimit" | "containerRole" | "inputStyle" | "rows" | "textareaStyle" | "isComposing" | "resizeTextarea"> & ShallowUnwrapRef<{
1034
1034
  input: ShallowRef<HTMLInputElement | undefined>;
1035
1035
  textarea: ShallowRef<HTMLTextAreaElement | undefined>;
1036
1036
  ref: ComputedRef<HTMLInputElement | HTMLTextAreaElement | undefined>;
@@ -0,0 +1,17 @@
1
+ import { Ref, UnwrapRef } from 'vue';
2
+ import { IfAny } from '@vue/shared';
3
+ /**
4
+ * 删除已经存在数组值,把新值添加最后
5
+ * @param {Array<T>} arr 当前数组
6
+ * @param {Object} obj 要处理的对象
7
+ * @param {string} id 比对的对应属性名称
8
+ * @param {string} is 是否在前面添加
9
+ * @returns {Array<T>} 判断后的数组值
10
+ */
11
+ export declare function replaceAfter<T>(arr: Array<T>, obj: T, id?: string, is?: boolean): Array<T>;
12
+ /**
13
+ * 删除数组中的值
14
+ */
15
+ export declare function deleteArray<T>(arr: Array<T>, obj: T, key?: string, is?: boolean): T[] | undefined;
16
+ export declare const useStorage: <T>(storage: string, d: any, is?: boolean) => [T] extends [ Ref<any, any>] ? IfAny<T, Ref<T, T>, T> : Ref<UnwrapRef<T>, T | UnwrapRef<T>>;
17
+ export type UseStorageReturn = ReturnType<typeof useStorage>;
@@ -34,9 +34,9 @@ declare const InputNumber: {
34
34
  readonly size?: ("" | "default" | "small" | "large") | undefined;
35
35
  readonly name?: string | undefined;
36
36
  readonly modelValue?: any;
37
+ readonly placeholder?: string | undefined;
37
38
  readonly ariaLabel?: string | undefined;
38
39
  readonly id?: string | undefined;
39
- readonly placeholder?: string | undefined;
40
40
  readonly inputmode?: "text" | "search" | "none" | "url" | "email" | "tel" | "numeric" | "decimal" | undefined;
41
41
  readonly precision?: number | undefined;
42
42
  "onUpdate:modelValue"?: ((val: number | undefined) => any) | undefined | undefined;
@@ -34,9 +34,9 @@ declare function __VLS_template(): {
34
34
  readonly size?: ("" | "default" | "small" | "large") | undefined;
35
35
  readonly name?: string | undefined;
36
36
  readonly modelValue?: any;
37
+ readonly placeholder?: string | undefined;
37
38
  readonly ariaLabel?: string | undefined;
38
39
  readonly id?: string | undefined;
39
- readonly placeholder?: string | undefined;
40
40
  readonly inputmode?: "text" | "search" | "none" | "url" | "email" | "tel" | "numeric" | "decimal" | undefined;
41
41
  readonly precision?: number | undefined;
42
42
  "onUpdate:modelValue"?: ((val: number | undefined) => any) | undefined | undefined;
@@ -368,9 +368,9 @@ declare const __VLS_component: DefineComponent<{}, {
368
368
  readonly size?: ("" | "default" | "small" | "large") | undefined;
369
369
  readonly name?: string | undefined;
370
370
  readonly modelValue?: any;
371
+ readonly placeholder?: string | undefined;
371
372
  readonly ariaLabel?: string | undefined;
372
373
  readonly id?: string | undefined;
373
- readonly placeholder?: string | undefined;
374
374
  readonly inputmode?: "text" | "search" | "none" | "url" | "email" | "tel" | "numeric" | "decimal" | undefined;
375
375
  readonly precision?: number | undefined;
376
376
  "onUpdate:modelValue"?: ((val: number | undefined) => any) | undefined | undefined;
@@ -93,9 +93,9 @@ declare const InputSelect: {
93
93
  readonly size?: ("" | "default" | "small" | "large") | undefined;
94
94
  readonly name?: string | undefined;
95
95
  readonly form?: string | undefined;
96
+ readonly placeholder?: string | undefined;
96
97
  readonly ariaLabel?: string | undefined;
97
98
  readonly id?: string | undefined;
98
- readonly placeholder?: string | undefined;
99
99
  readonly prefixIcon?: (string | Component) | undefined;
100
100
  readonly inputmode?: "text" | "search" | "none" | "url" | "email" | "tel" | "numeric" | "decimal" | undefined;
101
101
  readonly maxlength?: (string | number) | undefined;
@@ -553,7 +553,7 @@ declare const InputSelect: {
553
553
  onMouseenter?: ((evt: MouseEvent) => any) | undefined;
554
554
  onMouseleave?: ((evt: MouseEvent) => any) | undefined;
555
555
  onClear?: (() => any) | undefined;
556
- }, "clear" | "type" | "input" | "select" | "textarea" | "modelValue" | "ref" | "disabled" | "autofocus" | "id" | "tabindex" | "validateEvent" | "focus" | "blur" | "clearable" | "readonly" | "inputmode" | "autosize" | "autocomplete" | "showPassword" | "showWordLimit" | "containerRole" | "inputStyle" | "rows" | "textareaStyle" | "isComposing" | "resizeTextarea"> & ShallowUnwrapRef<{
556
+ }, "clear" | "type" | "input" | "select" | "textarea" | "modelValue" | "disabled" | "autofocus" | "ref" | "id" | "tabindex" | "validateEvent" | "focus" | "blur" | "clearable" | "readonly" | "inputmode" | "autosize" | "autocomplete" | "showPassword" | "showWordLimit" | "containerRole" | "inputStyle" | "rows" | "textareaStyle" | "isComposing" | "resizeTextarea"> & ShallowUnwrapRef<{
557
557
  input: ShallowRef<HTMLInputElement | undefined>;
558
558
  textarea: ShallowRef<HTMLTextAreaElement | undefined>;
559
559
  ref: ComputedRef<HTMLInputElement | HTMLTextAreaElement | undefined>;
@@ -44,9 +44,9 @@ declare function __VLS_template(): {
44
44
  readonly size?: ("" | "default" | "small" | "large") | undefined;
45
45
  readonly name?: string | undefined;
46
46
  readonly form?: string | undefined;
47
+ readonly placeholder?: string | undefined;
47
48
  readonly ariaLabel?: string | undefined;
48
49
  readonly id?: string | undefined;
49
- readonly placeholder?: string | undefined;
50
50
  readonly prefixIcon?: (string | Component) | undefined;
51
51
  readonly inputmode?: "text" | "search" | "none" | "url" | "email" | "tel" | "numeric" | "decimal" | undefined;
52
52
  readonly maxlength?: (string | number) | undefined;
@@ -504,7 +504,7 @@ declare function __VLS_template(): {
504
504
  onMouseenter?: ((evt: MouseEvent) => any) | undefined;
505
505
  onMouseleave?: ((evt: MouseEvent) => any) | undefined;
506
506
  onClear?: (() => any) | undefined;
507
- }, "clear" | "type" | "input" | "select" | "textarea" | "modelValue" | "ref" | "disabled" | "autofocus" | "id" | "tabindex" | "validateEvent" | "focus" | "blur" | "clearable" | "readonly" | "inputmode" | "autosize" | "autocomplete" | "showPassword" | "showWordLimit" | "containerRole" | "inputStyle" | "rows" | "textareaStyle" | "isComposing" | "resizeTextarea"> & ShallowUnwrapRef<{
507
+ }, "clear" | "type" | "input" | "select" | "textarea" | "modelValue" | "disabled" | "autofocus" | "ref" | "id" | "tabindex" | "validateEvent" | "focus" | "blur" | "clearable" | "readonly" | "inputmode" | "autosize" | "autocomplete" | "showPassword" | "showWordLimit" | "containerRole" | "inputStyle" | "rows" | "textareaStyle" | "isComposing" | "resizeTextarea"> & ShallowUnwrapRef<{
508
508
  input: ShallowRef<HTMLInputElement | undefined>;
509
509
  textarea: ShallowRef<HTMLTextAreaElement | undefined>;
510
510
  ref: ComputedRef<HTMLInputElement | HTMLTextAreaElement | undefined>;
@@ -662,9 +662,9 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
662
662
  readonly size?: ("" | "default" | "small" | "large") | undefined;
663
663
  readonly name?: string | undefined;
664
664
  readonly form?: string | undefined;
665
+ readonly placeholder?: string | undefined;
665
666
  readonly ariaLabel?: string | undefined;
666
667
  readonly id?: string | undefined;
667
- readonly placeholder?: string | undefined;
668
668
  readonly prefixIcon?: (string | Component) | undefined;
669
669
  readonly inputmode?: "text" | "search" | "none" | "url" | "email" | "tel" | "numeric" | "decimal" | undefined;
670
670
  readonly maxlength?: (string | number) | undefined;
@@ -1122,7 +1122,7 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
1122
1122
  onMouseenter?: ((evt: MouseEvent) => any) | undefined;
1123
1123
  onMouseleave?: ((evt: MouseEvent) => any) | undefined;
1124
1124
  onClear?: (() => any) | undefined;
1125
- }, "clear" | "type" | "input" | "select" | "textarea" | "modelValue" | "ref" | "disabled" | "autofocus" | "id" | "tabindex" | "validateEvent" | "focus" | "blur" | "clearable" | "readonly" | "inputmode" | "autosize" | "autocomplete" | "showPassword" | "showWordLimit" | "containerRole" | "inputStyle" | "rows" | "textareaStyle" | "isComposing" | "resizeTextarea"> & ShallowUnwrapRef<{
1125
+ }, "clear" | "type" | "input" | "select" | "textarea" | "modelValue" | "disabled" | "autofocus" | "ref" | "id" | "tabindex" | "validateEvent" | "focus" | "blur" | "clearable" | "readonly" | "inputmode" | "autosize" | "autocomplete" | "showPassword" | "showWordLimit" | "containerRole" | "inputStyle" | "rows" | "textareaStyle" | "isComposing" | "resizeTextarea"> & ShallowUnwrapRef<{
1126
1126
  input: ShallowRef<HTMLInputElement | undefined>;
1127
1127
  textarea: ShallowRef<HTMLTextAreaElement | undefined>;
1128
1128
  ref: ComputedRef<HTMLInputElement | HTMLTextAreaElement | undefined>;
@@ -204,7 +204,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
204
204
  return vue.openBlock(), vue.createElementBlock("li", {
205
205
  class: vue.normalizeClass([
206
206
  vue.unref(cs).z("select-li"),
207
- vue.unref(cs).is("disabled", item == null ? void 0 : item.disabled),
207
+ vue.unref(cs).is("disabled", item?.disabled),
208
208
  getSelected(item)
209
209
  ]),
210
210
  onClick: vue.withModifiers(($event) => onClickSelect(item), ["stop"])
@@ -202,7 +202,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
202
202
  return openBlock(), createElementBlock("li", {
203
203
  class: normalizeClass([
204
204
  unref(cs).z("select-li"),
205
- unref(cs).is("disabled", item == null ? void 0 : item.disabled),
205
+ unref(cs).is("disabled", item?.disabled),
206
206
  getSelected(item)
207
207
  ]),
208
208
  onClick: withModifiers(($event) => onClickSelect(item), ["stop"])
@@ -57,11 +57,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
57
57
  }
58
58
  },
59
59
  set(v) {
60
- var _a;
61
60
  if (v.includes(wholeValue)) {
62
61
  v = v.filter((item) => item !== wholeValue);
63
62
  }
64
- if (v.length !== (((_a = value.value) == null ? void 0 : _a.length) ?? 0)) {
63
+ if (v.length !== (value.value?.length ?? 0)) {
65
64
  value.value = [...v];
66
65
  }
67
66
  }
@@ -55,11 +55,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
55
55
  }
56
56
  },
57
57
  set(v) {
58
- var _a;
59
58
  if (v.includes(wholeValue)) {
60
59
  v = v.filter((item) => item !== wholeValue);
61
60
  }
62
- if (v.length !== (((_a = value.value) == null ? void 0 : _a.length) ?? 0)) {
61
+ if (v.length !== (value.value?.length ?? 0)) {
63
62
  value.value = [...v];
64
63
  }
65
64
  }