@web-utils/form-ui 1.0.0-beta5 → 1.0.0-beta50

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 (208) hide show
  1. package/api/index.d.ts +60 -0
  2. package/api/index.mjs +42 -0
  3. package/awesome-button/index.d.ts +60 -0
  4. package/awesome-button/index.mjs +49 -0
  5. package/base.css +1 -1
  6. package/chunks/6yfBZFOB.mjs +56 -0
  7. package/chunks/B-zqRAXo.mjs +69 -0
  8. package/chunks/B1IPSTA6.mjs +198 -0
  9. package/chunks/B9gA65rt2.mjs +38 -0
  10. package/chunks/BA2KEptL.mjs +172 -0
  11. package/chunks/BBERmTup.mjs +83 -0
  12. package/chunks/BUGCiCnl.mjs +83 -0
  13. package/chunks/BbSPWDDZ.mjs +100 -0
  14. package/chunks/BfxDxIg0.mjs +106 -0
  15. package/chunks/BqWvBF14.mjs +35 -0
  16. package/chunks/BsZgAJX_2.mjs +81 -0
  17. package/chunks/BtcjAHE6.mjs +317 -0
  18. package/chunks/ByHz4mmh.mjs +87 -0
  19. package/chunks/C2zgFLYO.mjs +185 -0
  20. package/chunks/CAd1zK9Q.mjs +25 -0
  21. package/chunks/CJdkjadi.mjs +17 -0
  22. package/chunks/CabldOLo.mjs +157 -0
  23. package/chunks/CkOD-_VV.mjs +8 -0
  24. package/chunks/Cln3RBAD.mjs +660 -0
  25. package/chunks/CqoVAnxC2.mjs +93 -0
  26. package/chunks/CuAoMR3n.mjs +105 -0
  27. package/chunks/CxTg0r4n.mjs +166 -0
  28. package/chunks/D0Zg2CV0.mjs +57 -0
  29. package/chunks/DA7oGHSX.mjs +141 -0
  30. package/chunks/DOP3aBxf.mjs +93 -0
  31. package/chunks/DOZRzqlo.mjs +37 -0
  32. package/chunks/D_qiRmiE.mjs +230 -0
  33. package/chunks/DcTVYqeJ.mjs +113 -0
  34. package/chunks/Dkd5BC98.mjs +198 -0
  35. package/chunks/GI8krYU82.mjs +478 -0
  36. package/chunks/V2p-PCpL.mjs +176 -0
  37. package/chunks/bFbPPcdq.mjs +25 -0
  38. package/chunks/cqIZWDHo.mjs +614 -0
  39. package/chunks/eae6huQB.mjs +25 -0
  40. package/chunks/gCeDFHo1.mjs +32 -0
  41. package/chunks/gLPy4Sus.mjs +164 -0
  42. package/chunks/hlha6Bhc.mjs +107 -0
  43. package/chunks/hzaYr6Ud2.mjs +207 -0
  44. package/chunks/kflKDW4T2.mjs +146 -0
  45. package/chunks/pIzhYsBe.mjs +93 -0
  46. package/chunks/vXQf89tS.mjs +1361 -0
  47. package/chunks/wXeqV-_7.mjs +89 -0
  48. package/chunks/zwXzk9ff2.mjs +568 -0
  49. package/confirm-button/index.d.ts +115 -0
  50. package/confirm-button/index.mjs +35 -0
  51. package/confirmable/index.d.ts +86 -0
  52. package/confirmable/index.mjs +8 -0
  53. package/constants/index.d.ts +53 -0
  54. package/constants/index.mjs +4 -0
  55. package/dict-render/index.d.ts +28 -0
  56. package/dict-render/index.mjs +2 -0
  57. package/editable-tree/index.d.ts +254 -0
  58. package/editable-tree/index.mjs +2 -0
  59. package/editable-tree/style.css +1 -0
  60. package/element-dialog/index.d.ts +337 -16
  61. package/element-dialog/index.mjs +2 -91
  62. package/element-resize-observer/index.d.ts +8 -0
  63. package/element-resize-observer/index.mjs +40 -0
  64. package/element-resize-observer/style.css +1 -0
  65. package/empty-view/index.d.ts +2 -2
  66. package/empty-view/index.mjs +1 -1
  67. package/flex-scroll-area/index.d.ts +1 -1
  68. package/flex-scroll-area/index.mjs +1 -1
  69. package/form-advice/index.mjs +13 -12
  70. package/form-button/index.d.ts +116 -0
  71. package/form-button/index.mjs +36 -0
  72. package/form-card/index.d.ts +14 -0
  73. package/form-card/index.mjs +18 -0
  74. package/form-cascader/index.d.ts +472 -0
  75. package/form-cascader/index.mjs +2 -0
  76. package/form-checkbox/index.d.ts +236 -16
  77. package/form-checkbox/index.mjs +1 -1
  78. package/form-checkbox-group/index.d.ts +364 -0
  79. package/form-checkbox-group/index.mjs +2 -0
  80. package/form-checkbox-group/style.css +1 -0
  81. package/form-date-picker/index.d.ts +390 -19
  82. package/form-date-picker/index.mjs +1 -1
  83. package/form-holder/index.d.ts +87 -20
  84. package/form-holder/index.mjs +1 -1
  85. package/form-holder/style.css +1 -1
  86. package/form-image/index.d.ts +145 -13
  87. package/form-image/index.mjs +1 -1
  88. package/form-input/index.d.ts +301 -20
  89. package/form-input/index.mjs +1 -1
  90. package/form-input/style.css +1 -0
  91. package/form-input-cron-expression/index.d.ts +217 -0
  92. package/form-input-cron-expression/index.mjs +2 -0
  93. package/form-input-cron-expression/style.css +1 -0
  94. package/form-input-email/index.d.ts +307 -16
  95. package/form-input-email/index.mjs +1 -1
  96. package/form-input-id-card/index.d.ts +307 -16
  97. package/form-input-id-card/index.mjs +1 -1
  98. package/form-input-number/index.d.ts +246 -18
  99. package/form-input-number/index.mjs +1 -1
  100. package/form-input-phone-number/index.d.ts +307 -16
  101. package/form-input-phone-number/index.mjs +1 -1
  102. package/form-input-tag/index.d.ts +263 -1
  103. package/form-input-tag/index.mjs +1 -3
  104. package/form-input-time/index.d.ts +434 -1
  105. package/form-input-time/index.mjs +1 -3
  106. package/form-item-config-provider/index.d.ts +22 -0
  107. package/form-item-config-provider/index.mjs +24 -0
  108. package/form-item-group/index.d.ts +91 -17
  109. package/form-item-group/index.mjs +2 -78
  110. package/form-item-group/style.css +1 -1
  111. package/form-item-x/index.d.ts +141 -11
  112. package/form-item-x/index.mjs +1 -1
  113. package/form-item-x/style.css +1 -0
  114. package/form-radio-group/index.d.ts +303 -16
  115. package/form-radio-group/index.mjs +1 -1
  116. package/form-rate/index.d.ts +254 -14
  117. package/form-rate/index.mjs +1 -1
  118. package/form-red-table/index.mjs +27 -26
  119. package/form-row/index.d.ts +2 -2
  120. package/form-row/index.mjs +1 -1
  121. package/form-select/index.d.ts +537 -18
  122. package/form-select/index.mjs +1 -1
  123. package/form-slider/index.d.ts +283 -16
  124. package/form-slider/index.mjs +1 -1
  125. package/form-switch/index.d.ts +272 -14
  126. package/form-switch/index.mjs +1 -1
  127. package/form-table/index.d.ts +269 -0
  128. package/form-table/index.mjs +2 -0
  129. package/form-table-plus/index.d.ts +266 -0
  130. package/form-table-plus/index.mjs +2 -0
  131. package/form-text/index.d.ts +165 -13
  132. package/form-text/index.mjs +1 -1
  133. package/form-textarea/index.d.ts +351 -0
  134. package/form-textarea/index.mjs +2 -0
  135. package/form-time-select/index.d.ts +319 -0
  136. package/form-time-select/index.mjs +2 -0
  137. package/form-view/index.mjs +1 -1
  138. package/helper/dictionary.d.ts +15 -0
  139. package/helper/dictionary.mjs +97 -0
  140. package/hook/useDictionary.d.ts +60 -0
  141. package/hook/useDictionary.mjs +15 -0
  142. package/hook/useVisibilityChange.d.ts +4 -0
  143. package/hook/useVisibilityChange.mjs +14 -0
  144. package/iframe-window/index.d.ts +9 -0
  145. package/iframe-window/index.mjs +37 -0
  146. package/iframe-window/style.css +1 -0
  147. package/index.css +2 -0
  148. package/index.d.ts +57 -36
  149. package/index.mjs +59 -61
  150. package/package.json +10 -5
  151. package/pageable-table/index.d.ts +398 -0
  152. package/pageable-table/index.mjs +2 -0
  153. package/pageable-table/style.css +1 -0
  154. package/resolver/index.mjs +29 -0
  155. package/sub-table/index.d.ts +100 -0
  156. package/sub-table/index.mjs +472 -0
  157. package/sub-table/style.css +1 -0
  158. package/sub-table-plus/index.d.ts +97 -0
  159. package/sub-table-plus/index.mjs +2 -0
  160. package/sub-table-plus/style.css +1 -0
  161. package/table-column/index.d.ts +160 -0
  162. package/table-column/index.mjs +2 -0
  163. package/table-column/style.css +1 -0
  164. package/table-column-def/index.d.ts +95 -0
  165. package/table-column-def/index.mjs +11 -0
  166. package/table-view/index.d.ts +340 -1
  167. package/table-view/index.mjs +454 -6
  168. package/table-view/style.css +1 -0
  169. package/toolbar/index.d.ts +128 -1
  170. package/toolbar/index.mjs +1 -8
  171. package/toolbar/style.css +1 -0
  172. package/toolbar-button/index.d.ts +188 -1
  173. package/toolbar-button/index.mjs +1 -8
  174. package/vue-cron/index.d.ts +191 -0
  175. package/vue-cron/index.mjs +2 -0
  176. package/vue-cron/style.css +1 -0
  177. package/web-types.json +1 -1
  178. package/x-input-tag/index.d.ts +2 -0
  179. package/x-input-tag/index.mjs +228 -0
  180. package/x-input-tag/style.css +1 -0
  181. package/year-calendar/index.d.ts +99 -0
  182. package/year-calendar/index.mjs +2 -0
  183. package/year-calendar/style.css +1 -0
  184. package/chunks/B4M_TFeR.mjs +0 -152
  185. package/chunks/B5BIQCcK.mjs +0 -149
  186. package/chunks/BHNKrW1j.mjs +0 -61
  187. package/chunks/BO9jWhBl.mjs +0 -46
  188. package/chunks/BZ8aOa78.mjs +0 -35
  189. package/chunks/Bsz7y4Xp.mjs +0 -73
  190. package/chunks/Bxj372sF.mjs +0 -53
  191. package/chunks/C33EmJN8.mjs +0 -32
  192. package/chunks/C6Li3-l7.mjs +0 -28
  193. package/chunks/CBcdalMX.mjs +0 -35
  194. package/chunks/CdRsyF0n.mjs +0 -43
  195. package/chunks/ClNahmiU.mjs +0 -23
  196. package/chunks/CstztYMu.mjs +0 -28
  197. package/chunks/DC9b53M6.mjs +0 -32
  198. package/chunks/DDVAgRED.mjs +0 -36
  199. package/chunks/DpJQABVD.mjs +0 -91
  200. package/chunks/ZsLNWI9x.mjs +0 -46
  201. package/chunks/jn_iQrVZ.mjs +0 -28
  202. package/constants.d.ts +0 -1
  203. package/constants.mjs +0 -4
  204. package/form-check-box-group/index.d.ts +0 -93
  205. package/form-check-box-group/index.mjs +0 -2
  206. package/input/style.css +0 -1
  207. package/resolver.mjs +0 -79
  208. /package/{resolver.d.ts → resolver/index.d.ts} +0 -0
@@ -0,0 +1,2 @@
1
+ declare const _default: import('vue').DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, import('vue').PublicProps>;
2
+ export default _default;
@@ -0,0 +1,228 @@
1
+ import { t as e } from "../chunks/CxTg0r4n.mjs";
2
+ import { t } from "../chunks/CkOD-_VV.mjs";
3
+ import { isArray as n, isDef as r, isPlainObject as i, scrollIntoView as a } from "@web-utils/core";
4
+ import { Fragment as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, nextTick as f, normalizeClass as p, openBlock as m, renderList as h, toDisplayString as g, vShow as _, withCtx as v, withDirectives as y, withKeys as b } from "vue";
5
+ import { ElMessage as x, formContextKey as S, formItemContextKey as C } from "element-plus";
6
+ import { ElInput as w, ElPopover as T, ElTag as E } from "element-plus/es";
7
+ import { debounce as D } from "lodash-es";
8
+ //#region src/components/form/XInputTag.vue
9
+ var O = {
10
+ name: "XInputTag",
11
+ inject: {
12
+ elForm: {
13
+ from: S,
14
+ default: ""
15
+ },
16
+ elFormItem: {
17
+ from: C,
18
+ default: ""
19
+ }
20
+ },
21
+ props: {
22
+ modelValue: {
23
+ type: [Array, String],
24
+ default: () => []
25
+ },
26
+ disabled: Boolean,
27
+ separator: {
28
+ type: String,
29
+ default: ","
30
+ },
31
+ count: {
32
+ type: Boolean,
33
+ default: !0
34
+ },
35
+ arrayMode: {
36
+ type: Boolean,
37
+ default: !0
38
+ },
39
+ objectMode: {
40
+ type: Boolean,
41
+ default: !0
42
+ },
43
+ query: Function,
44
+ type: {
45
+ type: String,
46
+ default: "标签"
47
+ }
48
+ },
49
+ emits: ["update:modelValue"],
50
+ data() {
51
+ return {
52
+ inputVisible: !1,
53
+ inputValue: "",
54
+ maxTag: 20,
55
+ items: [],
56
+ currentIndex: null
57
+ };
58
+ },
59
+ computed: {
60
+ inputDisabled() {
61
+ return this.disabled;
62
+ },
63
+ tags: { get() {
64
+ if (this.arrayMode) {
65
+ var e;
66
+ return (e = this.modelValue) != null && e.length ? this.objectMode ? this.modelValue.map((e) => e.id > 0 ? e : {
67
+ ...e,
68
+ id: null
69
+ }) : this.modelValue : [];
70
+ } else {
71
+ var t;
72
+ let e = this.arrayMode ? this.modelValue || [] : n(this.modelValue) ? this.modelValue : ((t = this.modelValue) == null ? void 0 : t.split(this.separator)) || [];
73
+ return e.length && e[0] ? e.map((e) => this.objectMode ? {
74
+ name: e,
75
+ id: null
76
+ } : e) : [];
77
+ }
78
+ } }
79
+ },
80
+ created() {
81
+ this.query && (this.debounceQuery = D(async () => {
82
+ this.query ? (this.items = await this.query(this.inputValue), this.currentIndex = 0) : this.currentIndex = null;
83
+ }, 200));
84
+ },
85
+ methods: {
86
+ async showInput() {
87
+ var e;
88
+ this.inputVisible = !0, await f(), this.$refs.saveTagInput.$refs.input.focus(), (e = this.items) != null && e.length && (this.currentIndex = 0);
89
+ },
90
+ handleClose(e) {
91
+ let t = this.tags.filter((t) => t !== e);
92
+ this.$emit("update:modelValue", this.arrayMode ? t : t.map((e) => e.name || e).join(this.separator));
93
+ },
94
+ async handleInputConfirm() {
95
+ await f(), r(this.currentIndex) && this.items[this.currentIndex] ? await this.addTag(this.items[this.currentIndex]) : this.inputValue ? await this.addTag(this.inputValue) : await this.reset();
96
+ },
97
+ async reset() {
98
+ var e;
99
+ (e = this.$refs.popover) == null || e.hide(), await f(), this.inputVisible = !1, this.inputValue = "", this.currentIndex = null;
100
+ },
101
+ async addTag(e) {
102
+ if (this.tags.length >= this.maxTag) {
103
+ x.warning({
104
+ message: `${this.type}已达上限!`,
105
+ showClose: !0
106
+ }), this.inputVisible = !1, this.inputValue = "";
107
+ return;
108
+ }
109
+ if (e) {
110
+ var t;
111
+ let n = i(e);
112
+ if (this.tags.some((t) => (this.objectMode && t.name || t) === (n && e.name || e))) {
113
+ this.inputVisible = !1, this.inputValue = "", x.warning({
114
+ message: `${this.type}已存在!`,
115
+ showClose: !0
116
+ });
117
+ return;
118
+ }
119
+ let r = [...this.tags];
120
+ if (n) r.push(e);
121
+ else {
122
+ let t = this.items.find((t) => (t.name || t) === e);
123
+ t ? r.push(t) : r.push(this.objectMode ? {
124
+ id: null,
125
+ name: e
126
+ } : e);
127
+ }
128
+ this.$emit("update:modelValue", this.arrayMode ? r : r.map((e) => e.name || e).join(this.separator)), await this.$nextTick(), (t = this.elFormItem) == null || t.clearValidate();
129
+ }
130
+ await this.reset();
131
+ },
132
+ onInputBlur() {
133
+ var e;
134
+ ((e = this.items) == null ? void 0 : e.length) === 0 ? this.handleInputConfirm() : this.reset();
135
+ },
136
+ tryQuery() {
137
+ var e;
138
+ (e = this.debounceQuery) == null || e.call(this);
139
+ },
140
+ onDropdownItemClick(e) {
141
+ this.inputVisible = !1, this.inputValue = "", this.addTag(e);
142
+ },
143
+ select(e) {
144
+ var t;
145
+ (t = this.items) != null && t.length && (e === 1 ? this.currentIndex > 0 ? this.currentIndex-- : this.currentIndex = this.items.length - 1 : e === 2 && (this.currentIndex < this.items.length - 1 ? this.currentIndex++ : this.currentIndex = 0), a(this.$refs.list, this.$refs.items[this.currentIndex]));
146
+ }
147
+ }
148
+ }, k = { class: "x-input-tag" }, A = {
149
+ key: 1,
150
+ style: {
151
+ "margin-left": "8px",
152
+ color: "#b5b5b5",
153
+ "line-height": "normal"
154
+ }
155
+ }, j = {
156
+ key: 4,
157
+ class: "tags-count"
158
+ }, M = {
159
+ ref: "list",
160
+ class: "dropdown-item-list"
161
+ }, N = ["onMouseenter", "onClick"];
162
+ function P(t, n, r, i, a, f) {
163
+ let x = E, S = w, C = e, D = T;
164
+ return m(), l("div", k, [
165
+ f.tags && f.tags.length && f.tags[0] ? (m(!0), l(o, { key: 0 }, h(f.tags, (e, t) => (m(), s(x, {
166
+ key: e.id || e.name || e,
167
+ size: "small",
168
+ "disable-transitions": "",
169
+ closable: !f.inputDisabled,
170
+ onClose: (n) => f.handleClose(e, t)
171
+ }, {
172
+ default: v(() => [d(g(e.name || e), 1)]),
173
+ _: 2
174
+ }, 1032, ["closable", "onClose"]))), 128)) : f.inputDisabled ? (m(), l("span", A, "无")) : c("v-if", !0),
175
+ f.inputDisabled ? c("v-if", !0) : y((m(), s(S, {
176
+ key: 2,
177
+ ref: "saveTagInput",
178
+ modelValue: a.inputValue,
179
+ "onUpdate:modelValue": [n[0] || (n[0] = (e) => a.inputValue = e), f.tryQuery],
180
+ class: "input-new-tag",
181
+ size: "small",
182
+ onKeyup: [
183
+ n[1] || (n[1] = b((e) => f.select(1), ["up"])),
184
+ n[2] || (n[2] = b((e) => f.select(2), ["down"])),
185
+ b(f.onInputBlur, ["esc"]),
186
+ b(f.handleInputConfirm, ["enter"])
187
+ ],
188
+ onBlur: f.onInputBlur
189
+ }, null, 8, [
190
+ "modelValue",
191
+ "onUpdate:modelValue",
192
+ "onKeyup",
193
+ "onBlur"
194
+ ])), [[_, a.inputVisible]]),
195
+ !f.inputDisabled && !a.inputVisible ? y((m(), s(C, {
196
+ key: 3,
197
+ class: "button-new-tag",
198
+ size: "small",
199
+ onClick: f.showInput
200
+ }, {
201
+ default: v(() => [...n[3] || (n[3] = [d(" + 添加 ", -1)])]),
202
+ _: 1
203
+ }, 8, ["onClick"])), [[_, f.tags.length < a.maxTag]]) : c("v-if", !0),
204
+ r.count ? (m(), l("span", j, g(f.tags.length && f.tags[0] ? f.tags.length : ""), 1)) : c("v-if", !0),
205
+ r.query ? (m(), s(D, {
206
+ key: 5,
207
+ ref: "popover",
208
+ "virtual-ref": t.$refs.saveTagInput,
209
+ placement: "bottom",
210
+ width: "240",
211
+ "popper-class": "dropdown-popup",
212
+ trigger: "manual"
213
+ }, {
214
+ default: v(() => [u("ul", M, [(m(!0), l(o, null, h(a.items, (e, t) => (m(), l("li", {
215
+ ref_for: !0,
216
+ ref: "items",
217
+ key: e.id || e.name || e,
218
+ class: p(["dropdown-item", { active: a.currentIndex === t }]),
219
+ onMouseenter: (e) => a.currentIndex = t,
220
+ onClick: (t) => f.onDropdownItemClick(e)
221
+ }, g(e.name || e), 43, N))), 128))], 512)]),
222
+ _: 1
223
+ }, 8, ["virtual-ref"])) : c("v-if", !0)
224
+ ]);
225
+ }
226
+ var F = /* @__PURE__ */ t(O, [["render", P]]);
227
+ //#endregion
228
+ export { F as default };
@@ -0,0 +1 @@
1
+ .el-form-item.is-error .x-input-tag{border-color:#f56c6c}.x-input-tag{border:1px solid var(--border-color);border-radius:4px;width:100%;height:120px;padding-top:4px;padding-right:4px;line-height:0;position:relative;overflow:auto}.x-input-tag .el-tag .el-tag__close:hover{background-color:#ee8677}.x-input-tag .el-tag,.x-input-tag .button-new-tag{margin-bottom:4px;margin-left:4px}.x-input-tag .el-input.input-new-tag{width:120px;margin-bottom:4px;margin-left:4px}.x-input-tag .tags-count{color:#b7b7b7;font-size:.9em;position:absolute;bottom:10px;right:6px}.dropdown-popup{padding:0}.dropdown-popup .dropdown-item-list{max-height:200px;overflow:auto}.dropdown-popup .dropdown-item{cursor:pointer;padding:5px 10px}.dropdown-popup .dropdown-item:hover,.dropdown-popup .dropdown-item.active{background-color:#f5f7fa}
@@ -0,0 +1,99 @@
1
+ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
2
+ showYearSelector: {
3
+ type: BooleanConstructor;
4
+ default: () => true;
5
+ };
6
+ activeDates: {
7
+ type: ArrayConstructor;
8
+ default: () => never[];
9
+ validator: (dateArray: unknown) => true;
10
+ };
11
+ modelValue: {
12
+ type: (StringConstructor | NumberConstructor)[];
13
+ default: number;
14
+ };
15
+ lang: {
16
+ type: StringConstructor;
17
+ default: string;
18
+ };
19
+ activeClass: {
20
+ type: StringConstructor;
21
+ default: () => "";
22
+ };
23
+ prefixClass: {
24
+ type: StringConstructor;
25
+ default: () => "calendar--active";
26
+ };
27
+ hideWeekend: {
28
+ type: BooleanConstructor;
29
+ default: boolean;
30
+ };
31
+ hideSunday: {
32
+ type: BooleanConstructor;
33
+ default: boolean;
34
+ };
35
+ }>, {}, {
36
+ isUsingString: boolean;
37
+ }, {
38
+ month(): {};
39
+ activeYear: {
40
+ get(): number;
41
+ set(val: any): void;
42
+ };
43
+ }, {
44
+ changeYear(idx: any): void;
45
+ toggleDate(dateObj: any): void;
46
+ modifiedActiveDates(dateIndex: any, activeDate: any): unknown[];
47
+ monthClick(monthYearInfo: any): void;
48
+ }, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("update:modelValue" | "toggleDate" | "monthClick" | "update:activeDates")[], "update:modelValue" | "toggleDate" | "monthClick" | "update:activeDates", import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
49
+ showYearSelector: {
50
+ type: BooleanConstructor;
51
+ default: () => true;
52
+ };
53
+ activeDates: {
54
+ type: ArrayConstructor;
55
+ default: () => never[];
56
+ validator: (dateArray: unknown) => true;
57
+ };
58
+ modelValue: {
59
+ type: (StringConstructor | NumberConstructor)[];
60
+ default: number;
61
+ };
62
+ lang: {
63
+ type: StringConstructor;
64
+ default: string;
65
+ };
66
+ activeClass: {
67
+ type: StringConstructor;
68
+ default: () => "";
69
+ };
70
+ prefixClass: {
71
+ type: StringConstructor;
72
+ default: () => "calendar--active";
73
+ };
74
+ hideWeekend: {
75
+ type: BooleanConstructor;
76
+ default: boolean;
77
+ };
78
+ hideSunday: {
79
+ type: BooleanConstructor;
80
+ default: boolean;
81
+ };
82
+ }>> & Readonly<{
83
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
84
+ onToggleDate?: ((...args: any[]) => any) | undefined;
85
+ onMonthClick?: ((...args: any[]) => any) | undefined;
86
+ "onUpdate:activeDates"?: ((...args: any[]) => any) | undefined;
87
+ }>, {
88
+ modelValue: string | number;
89
+ showYearSelector: boolean;
90
+ activeDates: unknown[];
91
+ lang: string;
92
+ activeClass: string;
93
+ prefixClass: string;
94
+ hideWeekend: boolean;
95
+ hideSunday: boolean;
96
+ }, {}, {
97
+ MonthCalendar: any;
98
+ }, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
99
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import { t as e } from "../chunks/GI8krYU82.mjs";
2
+ export { e as default };
@@ -0,0 +1 @@
1
+ .c-wrapper[data-v-2a7f150d]{padding:10px}.calendar[data-v-2a7f150d]{text-align:center;color:#353c46cc;background-color:#fff;border-radius:2px;min-width:0;min-height:295px;text-decoration:none;transition:transform .3s;position:relative;box-shadow:0 2px 1px -1px #0003,0 1px 1px #00000024,0 1px 3px #0000001f}.calendar[data-v-2a7f150d]:hover{z-index:2}@media (min-width:1024px){.calendar[data-v-2a7f150d]:hover{transform:scale(1.15);box-shadow:0 7px 21px #0000001a}}.calendar .calendar__title[data-v-2a7f150d]{cursor:pointer;border-bottom:1px solid #c4c4c44d;flex:100%;justify-content:center;align-items:center;height:50px;margin-bottom:12px;font-size:18px;font-weight:700;display:flex}.calendar .calendar__body[data-v-2a7f150d]{flex-wrap:wrap;place-content:flex-start;min-width:194px;padding:0 20px;display:flex}.calendar .calendar__day[data-v-2a7f150d]{color:#5db3d4;flex:14.28%;justify-content:center;align-items:center;height:31px;font-size:16px;display:flex}.calendar .day__weektitle[data-v-2a7f150d]{color:#353c46cc}.calendar .day[data-v-2a7f150d]{cursor:pointer;-webkit-user-select:none;user-select:none;border-radius:5px;justify-content:center;align-items:center;width:22px;height:22px;font-size:14px;display:flex;position:relative}.calendar .day[data-v-2a7f150d]:after{content:"";z-index:1;background-color:#0000;border-radius:50%;width:10px;height:10px;display:block;position:absolute;top:-5px;right:-5px}.calendar .day.calendar--active[data-v-2a7f150d]:after{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%3e%3cpath%20d='M0%200h24v24H0z'%20fill='none'/%3e%3cpath%20fill='%23FF6060'%20d='M12%202C6.48%202%202%206.48%202%2012s4.48%2010%2010%2010%2010-4.48%2010-10S17.52%202%2012%202zm5%2011H7v-2h10v2z'/%3e%3c/svg%3e");background-size:100% 100%}.calendar .day[data-v-2a7f150d]:not(.calendar__day--otherMonth):hover{background-color:#6666661a;border-radius:5px}.calendar .day.calendar--active[data-v-2a7f150d]{color:#bcbcbc;background-color:#ffbaba80}.calendar .day.calendar--active.info[data-v-2a7f150d]{color:#fff;background-color:#17a2b8cc}.calendar .day.calendar--active.info[data-v-2a7f150d]:after{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%3e%3cpath%20fill='%2317a2b8'%20d='M0%200h24v24H0V0z'/%3e%3cpath%20fill='white'%20d='M11%207h2v2h-2zm0%204h2v6h-2zm1-9C6.48%202%202%206.48%202%2012s4.48%2010%2010%2010%2010-4.48%2010-10S17.52%202%2012%202zm0%2018c-4.41%200-8-3.59-8-8s3.59-8%208-8%208%203.59%208%208-3.59%208-8%208z'/%3e%3c/svg%3e");background-size:100% 100%}.calendar .day.calendar--active.warning[data-v-2a7f150d]{color:#fff;background-color:#ffc107b3}.calendar .day.calendar--active.warning[data-v-2a7f150d]:after{background-color:#eaeaea4d;background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%3e%3cpath%20fill='%23ffc107'%20d='M4.47%2021h15.06c1.54%200%202.5-1.67%201.73-3L13.73%204.99c-.77-1.33-2.69-1.33-3.46%200L2.74%2018c-.77%201.33.19%203%201.73%203zM12%2014c-.55%200-1-.45-1-1v-2c0-.55.45-1%201-1s1%20.45%201%201v2c0%20.55-.45%201-1%201zm1%204h-2v-2h2v2z'/%3e%3c/svg%3e");background-size:100% 100%}.calendar .calendar__day--otherMonth[data-v-2a7f150d]{color:#eaeaea;cursor:auto}.container__months.hide-sunday .calendar__day:nth-of-type(7n){display:none}.container__months.hide-sunday .calendar__day{flex:16.66%}.container__months.hide-weekend .calendar__day:nth-of-type(7n),.container__months.hide-weekend .calendar__day:nth-of-type(7n-1){display:none}.container__months.hide-weekend .calendar__day{flex:19%}.vue-calendar__container[data-v-5cc87b9a]{background-color:#f6f6f3;border-radius:2px;min-width:0;text-decoration:none;position:relative;box-shadow:0 2px 1px -1px #0003,0 1px 1px #00000024,0 1px 3px #0000001f}.vue-calendar__container .container__year[data-v-5cc87b9a]{-webkit-user-select:none;user-select:none;text-align:center;background-color:#fff;flex:100%;height:65px;font-size:24px;display:flex}.vue-calendar__container .container__year .year__chooser[data-v-5cc87b9a]{cursor:pointer;color:#000000e6;flex:1;justify-content:center;align-items:center;height:100%;display:flex}.vue-calendar__container .container__year .year__chooser[data-v-5cc87b9a]:hover{background-color:#6666661a}.vue-calendar__container .container__year .year__chooser[data-v-5cc87b9a]:nth-child(4n-3){color:#0000004d}.vue-calendar__container .container__year .year__chooser[data-v-5cc87b9a]:nth-child(2n){color:#0009}.vue-calendar__container .container__year .year__chooser[data-v-5cc87b9a]:nth-child(3){box-shadow:inset 0 -3px #4792bd}.vue-calendar__container .container__months[data-v-5cc87b9a]{flex-wrap:wrap;padding:15px;display:flex}.vue-calendar__container .container__month[data-v-5cc87b9a]{flex:16.66%;padding:8px}@media (max-width:1300px){.vue-calendar__container .container__month[data-v-5cc87b9a]{flex:25%}}@media (max-width:992px){.vue-calendar__container .container__month[data-v-5cc87b9a]{flex:33.3%}}@media (max-width:768px){.vue-calendar__container .container__month[data-v-5cc87b9a]{flex:50%}}@media (max-width:450px){.vue-calendar__container .container__month[data-v-5cc87b9a]{flex:100%}}.vue-calendar__container .p-0[data-v-5cc87b9a]{padding:0}
@@ -1,152 +0,0 @@
1
- import { ElCol as e, ElFormItem as t, ElTooltip as n } from "element-plus/es";
2
- import { computed as r, createVNode as i, h as a, inject as o, isVNode as s, nextTick as c, unref as l, useTemplateRef as u } from "vue";
3
- import { ElCol as d, rowContextKey as f } from "element-plus";
4
- //#region src/components/form/form-item.js
5
- var p = {
6
- label: String,
7
- prop: String,
8
- required: Boolean,
9
- rules: Array,
10
- span: {
11
- type: Number,
12
- default: 12
13
- },
14
- block: Boolean,
15
- formItemClass: String,
16
- hideLabel: Boolean,
17
- tips: { type: String },
18
- tipsAfterLabel: {
19
- type: Boolean,
20
- default: !1
21
- },
22
- labelColspan: [Number, String],
23
- inputColspan: [Number, String],
24
- labelRowspan: [Number, String],
25
- inputRowspan: [Number, String]
26
- }, m = (e) => {
27
- let t = o("formHolder", null);
28
- return r(() => e.required === !0 ? !0 : (t == null ? void 0 : t.requiredFieldsMap[e.prop]) === !0);
29
- }, h = (e, { rules: t } = {}) => {
30
- let n = m(e);
31
- return r(() => {
32
- let r = {}, i = l(t);
33
- return Object.keys(p).forEach((t) => {
34
- t === "rules" ? e[t] && i ? r[t] = [...e[t], ...i] : e[t] ? r[t] = e[t] : i && (r[t] = i) : r[t] = e[t];
35
- }), r.required = n.value, r;
36
- });
37
- };
38
- //#endregion
39
- //#region src/components/form/FormItemX.vue?vue&type=script&lang.jsx
40
- function g(e) {
41
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !s(e);
42
- }
43
- //#endregion
44
- //#region src/components/form/FormItemX.vue
45
- var _ = {
46
- name: "FormItemX",
47
- inheritAttrs: !1,
48
- props: { ...p },
49
- setup(a, { attrs: s, slots: l, expose: d }) {
50
- let p = o(f, null), h = s.embed ? r(() => s.disabled) : b(a), _ = m(a), v = u("formItem"), y = r(() => !!p), x = r(() => {
51
- if (h.value) return [];
52
- if (_.value) {
53
- let e = {
54
- required: !0,
55
- message: `请输入${a.label}`
56
- };
57
- return a.rules ? [...a.rules, e] : [e];
58
- }
59
- return a.rules;
60
- });
61
- return d({
62
- clearValidate: async () => {
63
- var e;
64
- await c(), (e = v.value) == null || e.clearValidate();
65
- },
66
- validate: async () => {
67
- var e;
68
- await c(), (e = v.value) == null || e.validate();
69
- }
70
- }), () => {
71
- let r = l.tips || a.tips, o = r ? i(n, {
72
- effect: "light",
73
- content: a.tips,
74
- offset: 4
75
- }, {
76
- default: () => i("i", { class: "el-icon-info form-item-input-info" }, null),
77
- content: l.tips ? l.tips : null
78
- }) : null, s = i(t, {
79
- ref: "formItem",
80
- label: a.label,
81
- class: [
82
- "form-item",
83
- a.formItemClass,
84
- {
85
- "form-item-hide-label": a.hideLabel,
86
- "with-tips": !a.tipsAfterLabel && r,
87
- required: h.value === !1 && _.value
88
- }
89
- ],
90
- prop: a.prop,
91
- rules: x.value
92
- }, {
93
- ...l,
94
- default: () => {
95
- var e;
96
- return [(e = l.default) == null ? void 0 : e.call(l, {
97
- disabled: h.value,
98
- required: _.value
99
- }), r && !a.tipsAfterLabel ? o : null];
100
- },
101
- label: () => [l.label ? l.label() : a.label, a.tipsAfterLabel ? o : null]
102
- });
103
- return y.value ? i(e, { span: a.block ? 24 : a.span }, g(s) ? s : { default: () => [s] }) : s;
104
- };
105
- }
106
- }, v = "update:modelValue", y = {
107
- ...p,
108
- wrapFormItem: {
109
- type: Boolean,
110
- default: !0
111
- },
112
- disabled: {
113
- type: Boolean,
114
- default: void 0
115
- },
116
- col: Boolean
117
- }, b = (e) => {
118
- let t = o("formHolder", null), n = o("formItemGroup", null);
119
- return r(() => {
120
- if (e.disabled !== void 0) return e.disabled;
121
- if (t) {
122
- if (t.requiredFieldsMap[e.prop] === !0 || t.enabledFieldsMap[e.prop] === !0) return !1;
123
- if (t.disabledFieldsMap[e.prop] === !0) return !0;
124
- }
125
- return (n == null ? void 0 : n.enabled) === !0 ? !1 : (n == null ? void 0 : n.disabled) === !0 ? !0 : (t == null ? void 0 : t.disabled) === !0;
126
- });
127
- }, x = [v], S = (e, t) => e(v, t), C = (e, { vNodes: t, formItemProps: n, slots: r, disabled: i }) => e.wrapFormItem ? a(_, {
128
- ...n.value,
129
- embed: !0,
130
- disabled: i == null ? void 0 : i.value
131
- }, {
132
- default: () => t,
133
- label: r.label,
134
- error: r.error,
135
- tips: r.tips
136
- }) : t, w = (e, { emit: t, slots: n, rules: i }) => {
137
- let o = h(e, { rules: i }), s = b(e), c = (e) => S(t, e), l = (t) => e.col ? a(d, { span: e.block ? 24 : e.span }, { default: () => t }) : t;
138
- return {
139
- emitInput: c,
140
- render: ({ vNodes: t }) => C(e, {
141
- vNodes: l(t),
142
- formItemProps: o,
143
- slots: n,
144
- disabled: s
145
- }),
146
- placeholder: r(() => s.value ? "" : `请输入${e.label}`),
147
- disabled: s,
148
- formItemProps: o
149
- };
150
- };
151
- //#endregion
152
- export { w as a, S as i, y as n, _ as o, C as r, h as s, x as t };
@@ -1,149 +0,0 @@
1
- import e from "../form-advice/index.mjs";
2
- import t from "../form-red-table/index.mjs";
3
- import { ElForm as n, ElRow as r } from "element-plus/es";
4
- import { computed as i, createVNode as a, inject as o, nextTick as s, provide as c, reactive as l, useTemplateRef as u, watch as d } from "vue";
5
- import { animate as f } from "@web-utils/core";
6
- //#endregion
7
- //#region src/components/form/FormHolder.vue
8
- var p = {
9
- name: "FormHolder",
10
- inheritAttrs: !1,
11
- props: {
12
- model: Object,
13
- size: String,
14
- disabled: {
15
- type: Boolean,
16
- default: void 0
17
- },
18
- labelPosition: {
19
- type: String,
20
- default: "right"
21
- },
22
- labelWidth: {
23
- type: [String, Number],
24
- default: "auto"
25
- },
26
- required: {
27
- type: Boolean,
28
- default: !0
29
- },
30
- requiredFields: Array,
31
- disabledFields: Array,
32
- enabledFields: Array,
33
- showAdvice: {
34
- type: Boolean,
35
- default: !0
36
- },
37
- columns: [Array, Object],
38
- colCount: Number,
39
- notTableForm: {
40
- type: Boolean,
41
- default: void 0
42
- },
43
- commentValueColspan: Number,
44
- commentLabelColspan: Number,
45
- showMessage: {
46
- type: Boolean,
47
- default: !0
48
- },
49
- wrapRow: {
50
- type: Boolean,
51
- default: !0
52
- }
53
- },
54
- setup(p, { slots: m, expose: h }) {
55
- let g = o("formView", null), _ = u("form"), v = i(() => p.notTableForm === void 0 ? (g == null ? void 0 : g.tableForm) === void 0 ? !1 : g == null ? void 0 : g.tableForm : !p.notTableForm), y = i(() => v.value ? !1 : p.showMessage), b = i(() => {
56
- let e = {};
57
- return p.disabledFields && p.disabledFields.forEach((t) => {
58
- e[t] = !0;
59
- }), e;
60
- }), x = i(() => {
61
- let e = {};
62
- return p.enabledFields && p.enabledFields.length && p.enabledFields.forEach((t) => {
63
- e[t] = !0;
64
- }), e;
65
- }), S = i(() => {
66
- let e = {};
67
- return p.requiredFields && p.requiredFields.length && p.requiredFields.forEach((t) => {
68
- e[t] = !0;
69
- }), e;
70
- }), C = i(() => p.disabled === !0 ? !0 : p.disabled), w = i(() => p.enabledFields), T = i(() => p.requiredFields), E = i(() => p.disabledFields), D = async () => {
71
- await s();
72
- let e = _.value.$el.querySelector(".el-form-item.is-error");
73
- e && e.scrollIntoView({
74
- block: "center",
75
- inline: "center",
76
- behavior: "smooth"
77
- });
78
- }, O = async () => {
79
- try {
80
- return await _.value.validate();
81
- } catch {
82
- throw await D(), _.value.$el.querySelectorAll(".el-form-item.is-error .el-form-item__content > :first-child").forEach((e) => {
83
- f(e, "breathe-animation");
84
- }), Error("表单验证不通过!");
85
- }
86
- }, k = (e) => _.value.validateField(e), A = (e) => _.value.resetFields(e), j = (e) => _.value.scrollToField(e), M = (e) => _.value.clearValidate(e), N = () => _.value.getField(), P = (e) => _.value.setInitialValues(e), F = () => _.value.fields;
87
- d(() => p.required, () => {
88
- M();
89
- });
90
- let I = l({
91
- tableForm: v,
92
- disabled: C,
93
- enabledFields: w,
94
- requiredFields: T,
95
- enabledFieldsMap: x,
96
- disabledFieldsMap: b,
97
- requiredFieldsMap: S,
98
- disabledFields: E,
99
- scrollIntoRequiredField: D,
100
- formRef: _,
101
- validate: O,
102
- validateField: k,
103
- resetFields: A,
104
- scrollToField: j,
105
- clearValidate: M,
106
- getField: N,
107
- setInitialValues: P,
108
- getFields: F
109
- });
110
- return c("formHolder", I), h(I), () => a(n, {
111
- ref: "form",
112
- class: "form-holder",
113
- model: p.model,
114
- size: p.size,
115
- "show-message": y.value,
116
- disabled: p.disabled,
117
- "label-width": p.labelWidth,
118
- "label-position": p.labelPosition
119
- }, { default: () => {
120
- if (v.value) {
121
- var n, i, o;
122
- return [
123
- (n = m.top) == null ? void 0 : n.call(m),
124
- a(t, {
125
- class: { "hide-error-message": v },
126
- columns: p.columns,
127
- "col-count": p.colCount
128
- }, { default: () => {
129
- var t;
130
- return [(t = m.default) == null ? void 0 : t.call(m), p.showAdvice ? a(e, {
131
- "label-colspan": p.commentLabelColspan,
132
- "value-colspan": p.commentValueColspan
133
- }, null) : null];
134
- } }),
135
- (i = m.bottom) == null ? void 0 : i.call(m),
136
- a("div", { class: "red-form-footer" }, [(o = m.footer) == null ? void 0 : o.call(m)])
137
- ];
138
- } else {
139
- var s;
140
- return p.wrapRow ? a(r, null, { default: () => {
141
- var e;
142
- return [(e = m.default) == null ? void 0 : e.call(m)];
143
- } }) : (s = m.default) == null ? void 0 : s.call(m);
144
- }
145
- } });
146
- }
147
- };
148
- //#endregion
149
- export { p as t };