@web-utils/form-ui 1.0.0-beta36 → 1.0.0-beta38

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 (103) hide show
  1. package/chunks/{BLWwTutr.mjs → B3ajWLh3.mjs} +15 -33
  2. package/chunks/{Cr1vBYne.mjs → BH_JJ8Xh.mjs} +15 -15
  3. package/chunks/{DistOy_O.mjs → BWBHzD5N.mjs} +28 -19
  4. package/chunks/{DQJyNm1V.mjs → Bd1UFJic.mjs} +135 -131
  5. package/chunks/{DcbnHU8K.mjs → BsCS7SB5.mjs} +19 -23
  6. package/chunks/{BTS_zTkz.mjs → BufIRDd0.mjs} +35 -39
  7. package/chunks/C1AgOUe_.mjs +172 -0
  8. package/chunks/C3Uo82-I.mjs +35 -0
  9. package/chunks/C9dGL28n.mjs +56 -0
  10. package/chunks/{A3sHIRQ_.mjs → CFOGMFgo.mjs} +22 -45
  11. package/chunks/{ZXCLnZFa.mjs → CLPSCSsy.mjs} +111 -144
  12. package/chunks/{D7hD-ppq.mjs → CSyJ-vEx.mjs} +1 -1
  13. package/chunks/CTKmEf2M.mjs +93 -0
  14. package/chunks/{DFsI7Y6h.mjs → CXvGoZKJ.mjs} +12 -11
  15. package/chunks/{Dgyjc3LT.mjs → Cab-ZjRx.mjs} +29 -45
  16. package/chunks/Cj59E77g.mjs +230 -0
  17. package/chunks/Cj5h2Wda.mjs +32 -0
  18. package/chunks/{iWQD3xvX.mjs → CqTcEefA.mjs} +14 -16
  19. package/chunks/{axr9InkL.mjs → Ct5bDJ50.mjs} +9 -13
  20. package/chunks/{D5_ctQqL.mjs → CuG2Q-PM.mjs} +2 -2
  21. package/chunks/{CLn0r4lV.mjs → D8UVq1t1.mjs} +16 -17
  22. package/chunks/{BYAy19s4.mjs → DJe97Fgi.mjs} +2 -8
  23. package/chunks/{Buc52aVh.mjs → DXYgAmil.mjs} +12 -29
  24. package/chunks/{DQxPzCsy.mjs → DhtHh0jk.mjs} +14 -15
  25. package/chunks/{CGJkMYZ4.mjs → DiJyms_r.mjs} +12 -20
  26. package/chunks/{1cDNhlSV.mjs → TvNHGVAP.mjs} +2 -2
  27. package/chunks/{CNskrN5I.mjs → XCGWTz41.mjs} +2 -2
  28. package/chunks/{DQKi5eEl.mjs → XqRTtFfp.mjs} +2 -2
  29. package/chunks/{BX-cVxlK.mjs → cmuHpsX6.mjs} +21 -14
  30. package/chunks/{DJKE5P39.mjs → o6VhYAN52.mjs} +2 -2
  31. package/chunks/{BwdWZEjT.mjs → pdwFQpA8.mjs} +13 -18
  32. package/chunks/{_dm2lLNL.mjs → taicx2sd.mjs} +2 -2
  33. package/constants/index.d.ts +16 -5
  34. package/editable-tree/index.d.ts +1 -1
  35. package/editable-tree/index.mjs +1 -1
  36. package/element-dialog/index.d.ts +1 -1
  37. package/element-dialog/index.mjs +1 -1
  38. package/form-card/index.d.ts +14 -0
  39. package/form-card/index.mjs +18 -0
  40. package/form-cascader/index.d.ts +0 -14
  41. package/form-cascader/index.mjs +1 -1
  42. package/form-check-box-group/index.d.ts +0 -2
  43. package/form-check-box-group/index.mjs +1 -1
  44. package/form-checkbox/index.d.ts +36 -10
  45. package/form-checkbox/index.mjs +1 -1
  46. package/form-date-picker/index.mjs +1 -1
  47. package/form-holder/index.d.ts +2 -6
  48. package/form-holder/index.mjs +1 -1
  49. package/form-image/index.d.ts +2 -14
  50. package/form-image/index.mjs +1 -1
  51. package/form-input/index.d.ts +9 -26
  52. package/form-input/index.mjs +1 -1
  53. package/form-input-cron-expression/index.mjs +1 -1
  54. package/form-input-email/index.d.ts +9 -2
  55. package/form-input-email/index.mjs +1 -1
  56. package/form-input-id-card/index.d.ts +9 -2
  57. package/form-input-id-card/index.mjs +1 -1
  58. package/form-input-number/index.d.ts +0 -6
  59. package/form-input-number/index.mjs +1 -1
  60. package/form-input-phone-number/index.d.ts +9 -2
  61. package/form-input-phone-number/index.mjs +1 -1
  62. package/form-input-tag/index.d.ts +263 -1
  63. package/form-input-tag/index.mjs +1 -3
  64. package/form-input-time/index.d.ts +434 -1
  65. package/form-input-time/index.mjs +1 -3
  66. package/form-item-group/index.mjs +1 -1
  67. package/form-item-x/index.mjs +1 -1
  68. package/form-radio-group/index.d.ts +0 -2
  69. package/form-radio-group/index.mjs +1 -1
  70. package/form-rate/index.d.ts +0 -2
  71. package/form-rate/index.mjs +1 -1
  72. package/form-row/index.mjs +1 -1
  73. package/form-select/index.d.ts +0 -14
  74. package/form-select/index.mjs +1 -1
  75. package/form-slider/index.d.ts +1 -5
  76. package/form-slider/index.mjs +1 -1
  77. package/form-switch/index.d.ts +0 -2
  78. package/form-switch/index.mjs +1 -1
  79. package/form-text/index.mjs +1 -1
  80. package/form-textarea/index.d.ts +370 -0
  81. package/form-textarea/index.mjs +2 -0
  82. package/form-time-select/index.d.ts +319 -0
  83. package/form-time-select/index.mjs +2 -0
  84. package/helper/dictionary.mjs +1 -1
  85. package/iframe-window/index.mjs +1 -1
  86. package/index.d.ts +4 -1
  87. package/index.mjs +46 -43
  88. package/package.json +1 -1
  89. package/pageable-table/index.d.ts +0 -38
  90. package/pageable-table/index.mjs +1 -1
  91. package/table-column/index.mjs +1 -1
  92. package/table-column-def/index.mjs +1 -1
  93. package/table-view/index.mjs +6 -6
  94. package/toolbar/index.mjs +1 -1
  95. package/toolbar-button/index.mjs +1 -1
  96. package/web-types.json +1 -1
  97. package/x-input-tag/index.mjs +4 -3
  98. package/year-calendar/index.mjs +1 -1
  99. package/chunks/BLRY0zkF.mjs +0 -51
  100. package/chunks/BvsmTC3G.mjs +0 -229
  101. /package/chunks/{CnAEuI_c.mjs → ChmDDqoZ2.mjs} +0 -0
  102. /package/chunks/{BW6iY7Q7.mjs → DDmQcNm6.mjs} +0 -0
  103. /package/chunks/{DiE4GJtU.mjs → Ds_Tpa_M.mjs} +0 -0
@@ -57,7 +57,7 @@ var O = {
57
57
  },
58
58
  computed: {
59
59
  inputDisabled() {
60
- return this.disabled || (this.elForm || {}).disabled;
60
+ return this.disabled;
61
61
  },
62
62
  tags: { get() {
63
63
  if (this.arrayMode) {
@@ -91,10 +91,11 @@ var O = {
91
91
  this.$emit("update:modelValue", this.arrayMode ? t : t.map((e) => e.name || e).join(this.separator));
92
92
  },
93
93
  async handleInputConfirm() {
94
- await d(), n(this.currentIndex) && this.items[this.currentIndex] ? await this.addTag(this.items[this.currentIndex]) : this.inputValue ? await this.addTag(this.inputValue) : this.reset();
94
+ await d(), n(this.currentIndex) && this.items[this.currentIndex] ? await this.addTag(this.items[this.currentIndex]) : this.inputValue ? await this.addTag(this.inputValue) : await this.reset();
95
95
  },
96
96
  async reset() {
97
- this.$refs.popover.hide(), await d(), this.inputVisible = !1, this.inputValue = "", this.currentIndex = null;
97
+ var e;
98
+ (e = this.$refs.popover) == null || e.hide(), await d(), this.inputVisible = !1, this.inputValue = "", this.currentIndex = null;
98
99
  },
99
100
  async addTag(e) {
100
101
  if (this.tags.length >= this.maxTag) {
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/CnAEuI_c.mjs";
1
+ import { t as e } from "../chunks/ChmDDqoZ2.mjs";
2
2
  export { e as default };
@@ -1,51 +0,0 @@
1
- import { u as e } from "./BX-cVxlK.mjs";
2
- import { o as t, r as n } from "./BvsmTC3G.mjs";
3
- import { n as r } from "./D7hD-ppq.mjs";
4
- import { createVNode as i, isVNode as a, mergeProps as o } from "vue";
5
- import { ElImage as s } from "element-plus/es";
6
- //#region src/components/form/props/image.ts
7
- var c = {
8
- ...r,
9
- src: String,
10
- fit: String,
11
- hideOnClickModal: Boolean
12
- }, l = { modelValue: !0 }, u = [
13
- "load",
14
- "error",
15
- "switch",
16
- "close",
17
- "show"
18
- ], d = (e) => r[e] === void 0 && l[e] !== !0;
19
- //#endregion
20
- //#region src/components/form/FormImage.vue?vue&type=script&lang.jsx
21
- function f(e) {
22
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !a(e);
23
- }
24
- //#endregion
25
- //#region src/components/form/FormImage.vue
26
- var p = {
27
- name: "FormImage",
28
- inheritAttrs: !1,
29
- props: { ...c },
30
- emits: {
31
- load: null,
32
- error: null,
33
- switch: null,
34
- close: null,
35
- show: null
36
- },
37
- setup(r, { slots: a, attrs: c, emit: l }) {
38
- let p = t(r, { attrs: c }), m = e(r, {
39
- events: u,
40
- predicate: d,
41
- emit: l
42
- });
43
- return () => n(r, {
44
- vNodes: i(s, o(m.value, c, { "preview-src-list": [r.src] }), f(a) ? a : { default: () => [a] }),
45
- formItemProps: p,
46
- slots: a
47
- });
48
- }
49
- };
50
- //#endregion
51
- export { p as t };
@@ -1,229 +0,0 @@
1
- import { a as e } from "./BX-cVxlK.mjs";
2
- import { formHolderContextKey as t, formItemConfigProviderContextKey as n, formItemGroupContextKey as r } from "../constants/index.mjs";
3
- import { isArray as i, isPlainObject as a, isString as o } from "@web-utils/core";
4
- import { computed as s, createVNode as c, h as l, inject as u, mergeProps as d, nextTick as f, unref as p, useTemplateRef as m } from "vue";
5
- import { ElCol as h, rowContextKey as g } from "element-plus";
6
- import { ElCol as _, ElFormItem as v, ElTooltip as y } from "element-plus/es";
7
- //#region src/components/form/props/form-item.ts
8
- var b = {
9
- prop: [String, Array],
10
- label: String,
11
- labelPosition: {
12
- type: String,
13
- default: ""
14
- },
15
- labelWidth: [String, Number],
16
- required: {
17
- type: Boolean,
18
- default: !1
19
- },
20
- rules: Object,
21
- error: String,
22
- showMessage: {
23
- type: Boolean,
24
- default: !0
25
- },
26
- inlineMessage: {
27
- type: Boolean,
28
- default: !1
29
- },
30
- size: String,
31
- for: String,
32
- validateStatus: String,
33
- messagePrefix: String,
34
- message: String,
35
- wrapCol: {
36
- type: Boolean,
37
- default: !0
38
- },
39
- fixedSpan: Number,
40
- block: Boolean,
41
- unwrap: Boolean,
42
- half: Boolean,
43
- formItemClass: String,
44
- hideLabel: Boolean,
45
- tips: { type: String },
46
- tipsAfterLabel: {
47
- type: Boolean,
48
- default: !1
49
- },
50
- labelColspan: [Number, String],
51
- inputColspan: [Number, String],
52
- labelRowspan: [Number, String],
53
- inputRowspan: [Number, String]
54
- }, x = {
55
- required: !0,
56
- rules: !0,
57
- messagePrefix: !0,
58
- message: !0,
59
- wrapCol: !0,
60
- fixedSpan: !0,
61
- block: !0,
62
- unwrap: !0,
63
- half: !0,
64
- formItemClass: !0,
65
- hideLabel: !0,
66
- tips: !0,
67
- tipsAfterLabel: !0,
68
- labelColspan: !0,
69
- inputColspan: !0,
70
- labelRowspan: !0,
71
- inputRowspan: !0
72
- }, S = (e) => b[e] !== void 0 && x[e] !== !0, C = (t, { emit: n, events: r, predicate: i }) => s(() => e(t, i, r, n)), w = {
73
- span: {
74
- type: Number,
75
- default: 12
76
- },
77
- offset: {
78
- type: Number,
79
- default: 0
80
- },
81
- push: {
82
- type: Number,
83
- default: 0
84
- },
85
- pull: {
86
- type: Number,
87
- default: 0
88
- },
89
- xs: { type: [Number, Object] },
90
- sm: { type: [Number, Object] },
91
- md: { type: [Number, Object] },
92
- lg: { type: [Number, Object] },
93
- xl: { type: [Number, Object] },
94
- tag: {
95
- type: String,
96
- default: "div"
97
- }
98
- }, T = { span: !0 }, E = (e) => w[e] !== void 0 && T[e] !== !0, D = (t, { emit: n, events: r, predicate: i }) => s(() => e(t, i, r, n)), O = (e) => {
99
- let n = u(t, null);
100
- return s(() => e.required === !0 ? !0 : (n == null ? void 0 : n.requiredFieldsMap[e.prop]) === !0);
101
- }, k = (e, t) => {
102
- let n = p(t);
103
- o(n) ? e.push(n) : i(n) ? e.push(...n) : a(n) && e.push(n);
104
- }, A = (e, { rules: t, attrs: n, messagePrefix: r, message: i, ...a } = {}) => {
105
- let o = O(e);
106
- return s(() => {
107
- let s = { message: i }, c = p(t);
108
- Object.keys({
109
- ...b,
110
- ...w
111
- }).forEach((t) => {
112
- t === "rules" ? e[t] && c ? s[t] = [...e[t], ...c] : e[t] ? s[t] = e[t] : c && (s[t] = c) : t === "messagePrefix" ? s[t] = e.messagePrefix || r : s[t] = e[t];
113
- });
114
- let l = [];
115
- return k(l, n == null ? void 0 : n.class), k(l, a == null ? void 0 : a.class), s.required = o.value, s.class = l, s.style = n == null ? void 0 : n.style, s;
116
- });
117
- }, j = {
118
- name: "FormItemX",
119
- inheritAttrs: !1,
120
- props: {
121
- ...b,
122
- ...w
123
- },
124
- setup(e, { attrs: r, slots: i, expose: a }) {
125
- let o = u(g, null), l = u(n, null), p = u(t, null), h = r.embed ? s(() => r.disabled) : N(e), b = C(e, { predicate: S }), x = D(e, { predicate: E }), w = s(() => (l == null ? void 0 : l.reactive) === !0 && l.block === !1 && e.fixedSpan === void 0 && !e.half), T = O(e), k = m("formItem"), A = s(() => (l == null ? void 0 : l.wrapCol) === !1 ? !1 : !!o && e.wrapCol), j = s(() => p != null && p.tableForm ? "" : l != null && l.block ? "100%" : e.half && A.value ? `calc(50% - ${o.gutter.value / 2}px)` : ""), M = s(() => (l == null ? void 0 : l.block) === !0 || e.block || e.half ? 24 : e.span), P = s(() => {
126
- if (h.value) return [];
127
- if (T.value) {
128
- let t = {
129
- required: !0,
130
- message: e.message || `${e.messagePrefix || "请输入"}${e.label}`
131
- };
132
- return e.rules ? [...e.rules, t] : [t];
133
- }
134
- return e.rules;
135
- });
136
- return a({
137
- clearValidate: async () => {
138
- var e;
139
- await f(), (e = k.value) == null || e.clearValidate();
140
- },
141
- validate: async () => {
142
- var e;
143
- await f(), (e = k.value) == null || e.validate();
144
- }
145
- }), () => {
146
- var t;
147
- let n = i.tips || e.tips, a = n ? c(y, {
148
- effect: "light",
149
- content: e.tips,
150
- offset: 4
151
- }, {
152
- default: () => c("i", { class: "el-icon-info form-item-input-info" }, null),
153
- content: i.tips ? i.tips : null
154
- }) : null, o = c(v, d(b.value, r, {
155
- ref: "formItem",
156
- style: { width: j.value },
157
- class: [
158
- "form-item",
159
- e.formItemClass,
160
- {
161
- "form-item-hide-label": e.hideLabel,
162
- "with-tips": !e.tipsAfterLabel && n,
163
- required: h.value === !1 && T.value
164
- }
165
- ],
166
- rules: P.value
167
- }), {
168
- ...i,
169
- default: () => {
170
- var t;
171
- return [(t = i.default) == null ? void 0 : t.call(i, {
172
- disabled: h.value,
173
- required: T.value
174
- }), n && !e.tipsAfterLabel ? a : null];
175
- },
176
- label: () => [i.label ? i.label() : e.label, e.tipsAfterLabel ? a : null]
177
- }), s = [o, (t = i.below) == null ? void 0 : t.call(i)];
178
- return e.unwrap ? s : A.value ? c(_, d(x.value, w.value ? {
179
- xs: 24,
180
- sm: 12,
181
- md: 12,
182
- lg: 8,
183
- xl: 6
184
- } : {}, { span: M.value }), { default: () => s }) : o;
185
- };
186
- }
187
- }, M = "update:modelValue", N = (e) => {
188
- let n = u(t, null), i = u(r, null);
189
- return s(() => {
190
- if (e.disabled !== void 0) return e.disabled;
191
- if (n) {
192
- if (n.requiredFieldsMap[e.prop] === !0 || n.enabledFieldsMap[e.prop] === !0) return !1;
193
- if (n.disabledFieldsMap[e.prop] === !0) return !0;
194
- }
195
- return (i == null ? void 0 : i.enabled) === !0 ? !1 : (i == null ? void 0 : i.disabled) === !0 ? !0 : (n == null ? void 0 : n.disabled) === !0;
196
- });
197
- }, P = { [M]: null }, F = (e, t) => e(M, t), I = (e, { vNodes: t, formItemProps: n, slots: r, disabled: i }) => e.wrapFormItem ? l(j, {
198
- ...n.value,
199
- embed: !0,
200
- disabled: i == null ? void 0 : i.value
201
- }, {
202
- default: () => t,
203
- label: r.label,
204
- error: r.error,
205
- tips: r.tips,
206
- below: r.below
207
- }) : t, L = (t, { emit: n, slots: r, attrs: i, rules: a, events: o, predicate: c, messagePrefix: u = "请输入", ...d }) => {
208
- let f = N(t), p = s(() => f.value ? "" : `${u}${t.label}`), m = A(t, {
209
- rules: a,
210
- attrs: i,
211
- message: p.value,
212
- ...d
213
- }), g = (e) => F(n, e), _ = (e) => t.col ? l(h, { span: t.block ? 24 : t.span }, { default: () => e }) : e;
214
- return {
215
- emitInput: g,
216
- render: ({ vNodes: e }) => I(t, {
217
- vNodes: _(e),
218
- formItemProps: m,
219
- slots: r,
220
- disabled: f
221
- }),
222
- placeholder: p,
223
- disabled: f,
224
- formItemProps: m,
225
- autoBind: s(() => e(t, c, o, n))
226
- };
227
- }, R = (e) => e.icon ? l("i", { class: e.icon }) : null;
228
- //#endregion
229
- export { j as a, b as c, L as i, P as n, A as o, I as r, w as s, R as t };
File without changes
File without changes
File without changes