@web-utils/form-ui 1.0.0-beta71 → 1.0.0-beta73
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.
- package/address-input/index.mjs +1 -1
- package/affix/index.d.ts +0 -2
- package/affix/index.mjs +2 -3
- package/capsule-tab/index.mjs +1 -1
- package/card/index.mjs +15 -14
- package/chunks/-fXBgN9b2.mjs +37 -0
- package/chunks/{B3d4fdGH.mjs → -yfgKY3g.mjs} +1 -1
- package/chunks/{BeWNlclr.mjs → -zgWD713.mjs} +44 -40
- package/chunks/{5itVLmv82.mjs → 8A7LSgb4.mjs} +26 -25
- package/chunks/{DoOkwYtO.mjs → Apjns0ZM.mjs} +72 -67
- package/chunks/B0BOjeph2.mjs +108 -0
- package/chunks/BD6_5FSI.mjs +178 -0
- package/chunks/BE4V5Vf5.mjs +133 -0
- package/chunks/{DfJJr053.mjs → BGJjAw5E.mjs} +1 -1
- package/chunks/{DhQF2ZlD.mjs → BH7VEktl.mjs} +19 -17
- package/chunks/{CjmfMN1X2.mjs → BI6kCG2j2.mjs} +2 -2
- package/chunks/{6kdakei5.mjs → BYtFzO-8.mjs} +138 -133
- package/chunks/{CaRunrOV2.mjs → B_AUZSOW.mjs} +589 -760
- package/chunks/BctSGDgW2.mjs +29 -0
- package/chunks/{B5voIv4_.mjs → Bes1uXng.mjs} +28 -24
- package/chunks/BhIWiH5R.mjs +661 -0
- package/chunks/BhzlH7Az.mjs +90 -0
- package/chunks/{D6vTCC1Z2.mjs → BrelfRGo2.mjs} +14 -13
- package/chunks/{Z0BPDZlb.mjs → BsqIRxSS.mjs} +6 -5
- package/chunks/{TtxSplBB.mjs → C--HDCqy.mjs} +13 -10
- package/chunks/{DTUh8o0p2.mjs → C6mb7Nru2.mjs} +4 -4
- package/chunks/{CIybFvu92.mjs → CFoSvMJ-2.mjs} +1 -1
- package/chunks/{Ch_zaHx9.mjs → CO3taG7t2.mjs} +1 -1
- package/chunks/{DNSPORak.mjs → CZUhA3sf.mjs} +298 -4
- package/chunks/Ccxbv7uz2.mjs +34 -0
- package/chunks/Ce4tNNzg2.mjs +63 -0
- package/chunks/{B1GA44yT2.mjs → CelJ2L8A2.mjs} +2 -2
- package/chunks/CjYOitzM2.mjs +31 -0
- package/chunks/Cknuquqx.mjs +32 -0
- package/chunks/ClVh1Lek.mjs +130 -0
- package/chunks/CwyebsNL2.mjs +39 -0
- package/chunks/{9rQitPz7.mjs → D6DYxngS.mjs} +132 -127
- package/chunks/D6YM84Pf2.mjs +29 -0
- package/chunks/{BkEMJ725.mjs → DTq5QLoT.mjs} +43 -39
- package/chunks/{BvcK4D8A2.mjs → DVMfVn-M.mjs} +14 -10
- package/chunks/DVdQHb_v.mjs +50 -0
- package/chunks/{BaLjN8Ow.mjs → Daa7nl7U.mjs} +19 -15
- package/chunks/{D9qn1x3X2.mjs → Dh_BQpvC2.mjs} +2 -2
- package/chunks/DizOY5i8.mjs +69 -0
- package/chunks/{BQNqBw8h2.mjs → DjaV6_cg2.mjs} +2 -2
- package/chunks/{CbbjpJFg2.mjs → Dm3gQGoV2.mjs} +2 -2
- package/chunks/DqW9QtF3.mjs +68 -0
- package/chunks/{DbtlO6wD.mjs → DqWJCka8.mjs} +9 -7
- package/chunks/{BI-ZFlSw2.mjs → DrWUdRj32.mjs} +2 -2
- package/chunks/Dv7YRB2U2.mjs +25 -0
- package/chunks/DyLQsqWJ.mjs +61 -0
- package/chunks/HsHwYW1a.mjs +99 -0
- package/chunks/KDVLIvaS.mjs +30 -0
- package/chunks/{DxL9oojv2.mjs → Lkg7bYLD2.mjs} +73 -74
- package/chunks/{T_jwNKBr.mjs → Opn85Hlx2.mjs} +1 -1
- package/chunks/{BoId6V9J.mjs → YdNYH25C.mjs} +1 -1
- package/chunks/{BvbjlaN02.mjs → gTgPZrgY2.mjs} +119 -120
- package/chunks/{3gUkQF12.mjs → jsgk7Yse2.mjs} +2 -2
- package/chunks/nL59ZuIk.mjs +58 -0
- package/chunks/{CDqVJ7U3.mjs → neuEq1De.mjs} +70 -67
- package/chunks/{B8wGY5Hs2.mjs → sWVkgzQt2.mjs} +2 -2
- package/chunks/{Wl17p0C82.mjs → tjwOOiNr2.mjs} +31 -30
- package/code-mirror-editor/index.mjs +1 -1
- package/confirm-button/index.mjs +1 -1
- package/confirmable/index.mjs +1 -1
- package/context-menu/index.mjs +1 -1
- package/count-up/index.mjs +1 -1
- package/custom-scrollbar/index.mjs +1 -1
- package/data-box/index.mjs +9 -8
- package/data-card/index.mjs +8 -7
- package/data-card-text/index.mjs +8 -7
- package/data-display/index.mjs +9 -8
- package/data-icons/index.mjs +9 -8
- package/data-imgtext/index.mjs +9 -8
- package/data-operatext/index.mjs +8 -7
- package/data-panel/index.mjs +9 -8
- package/data-pay/index.mjs +10 -9
- package/data-price/index.mjs +8 -7
- package/data-progress/index.mjs +10 -9
- package/data-rotate/index.mjs +9 -8
- package/data-table-picker/index.mjs +11 -10
- package/data-tabs/index.mjs +9 -8
- package/dict-render/index.mjs +1 -1
- package/e-charts/index.mjs +2 -2
- package/easy-popup/index.mjs +1 -1
- package/editable-progress/index.mjs +8 -7
- package/editable-tree/index.mjs +595 -2
- package/element-dialog/index.mjs +1 -1
- package/element-resize-observer/index.mjs +1 -1
- package/flex-box/index.mjs +1 -1
- package/flex-column/index.mjs +1 -1
- package/flex-item/index.mjs +1 -1
- package/flex-row/index.mjs +1 -1
- package/flex-scroller/index.mjs +1 -1
- package/flow-designer/index.mjs +1 -1
- package/flow-viewer/index.mjs +1 -1
- package/form-cascader/index.mjs +1 -1
- package/form-checkbox/index.mjs +1 -1
- package/form-checkbox-group/index.mjs +1 -1
- package/form-date-picker/index.mjs +1 -1
- package/form-holder/index.mjs +1 -1
- package/form-image/index.mjs +1 -1
- package/form-input/index.mjs +1 -1
- package/form-input-cron-expression/index.mjs +1 -1
- package/form-input-email/index.mjs +1 -1
- package/form-input-id-card/index.mjs +1 -1
- package/form-input-number/index.mjs +1 -1
- package/form-input-phone-number/index.mjs +1 -1
- package/form-input-tag/index.mjs +1 -1
- package/form-input-time/index.mjs +1 -1
- package/form-item-group/index.mjs +1 -1
- package/form-item-x/index.mjs +1 -1
- package/form-radio-group/index.mjs +1 -1
- package/form-rate/index.mjs +1 -1
- package/form-row/index.mjs +1 -1
- package/form-select/index.mjs +1 -1
- package/form-slider/index.mjs +1 -1
- package/form-switch/index.mjs +1 -1
- package/form-table/index.mjs +1 -1
- package/form-table-plus/index.mjs +1 -1
- package/form-text/index.mjs +1 -1
- package/form-textarea/index.mjs +1 -1
- package/form-time-select/index.mjs +1 -1
- package/form-tree-select/index.mjs +1 -1
- package/form-tree-select-multiple/index.mjs +1 -1
- package/form-view/index.mjs +3 -3
- package/guide-steps/index.mjs +77 -2
- package/helper/dictionary.mjs +1 -1
- package/helper/input.mjs +1 -1
- package/highlight-j-s/index.mjs +1 -1
- package/iframe-window/index.mjs +1 -1
- package/image-cropper/index.mjs +12 -11
- package/image-preview/index.d.ts +1 -153
- package/image-preview/index.mjs +201 -2
- package/image-viewer/index.mjs +1 -1
- package/index.css +1 -1
- package/index.mjs +101 -101
- package/input-number-range/index.mjs +7 -6
- package/keyboard/index.mjs +1 -1
- package/loading-view/index.mjs +1 -1
- package/name-avatar/index.mjs +1 -1
- package/nav-bar/index.mjs +3 -2
- package/package.json +5 -1
- package/page-index/index.mjs +14 -13
- package/page-index-top/index.mjs +12 -10
- package/pageable-table/index.mjs +1 -1
- package/photo-swipe/index.mjs +1 -1
- package/props/col.mjs +1 -1
- package/props/form-item.mjs +1 -1
- package/sign-panel/index.mjs +1 -1
- package/skeleton-panel/index.mjs +3 -2
- package/split-pane/index.mjs +1 -1
- package/sub-table/index.mjs +1 -1
- package/sub-table-plus/index.mjs +1 -1
- package/swiper/index.mjs +2 -2
- package/table-column/index.mjs +1 -1
- package/table-column-def/index.mjs +1 -1
- package/table-view/index.mjs +108 -106
- package/tag-render/index.mjs +21 -20
- package/text-ellipsis/index.d.ts +1 -1
- package/text-ellipsis/index.mjs +1 -1
- package/toolbar/index.mjs +1 -1
- package/toolbar-button/index.mjs +1 -1
- package/vue-cron/index.mjs +1 -1
- package/vue-tags-input/index.mjs +1 -1
- package/vue-tree-select/index.mjs +1 -1
- package/vue-video-player/index.d.ts +1 -1
- package/vue-video-player/index.mjs +1 -1
- package/watermark/index.mjs +1 -1
- package/web-types.json +1 -1
- package/x-input-tag/index.mjs +47 -46
- package/year-calendar/index.mjs +1 -1
- package/chunks/49634Q2N2.mjs +0 -936
- package/chunks/77cFhiAz.mjs +0 -13
- package/chunks/7JVbVOff2.mjs +0 -46
- package/chunks/B1ATN2my.mjs +0 -26
- package/chunks/B7O8aGqC2.mjs +0 -58
- package/chunks/BBPczt0U.mjs +0 -4
- package/chunks/BBqq6o072.mjs +0 -243
- package/chunks/BCVhSMZN.mjs +0 -1328
- package/chunks/BDVLN2ly.mjs +0 -105
- package/chunks/BEysX5TF2.mjs +0 -1038
- package/chunks/BIj6pa8Z.mjs +0 -15
- package/chunks/BJby9uHB2.mjs +0 -233
- package/chunks/BUAQybGW.mjs +0 -230
- package/chunks/BVIHqL6g.mjs +0 -17
- package/chunks/BVSQ6DfJ.mjs +0 -17
- package/chunks/B__5L22p2.mjs +0 -346
- package/chunks/Baam4z-g.mjs +0 -275
- package/chunks/Bdeug17L.mjs +0 -42
- package/chunks/BecO0t0_2.mjs +0 -2430
- package/chunks/BffxPn8a.mjs +0 -34
- package/chunks/Bgw_3soo.mjs +0 -35
- package/chunks/BjCfQFUL.mjs +0 -54
- package/chunks/BjWs-r2V.mjs +0 -25
- package/chunks/BlB1fEo92.mjs +0 -8
- package/chunks/BrYtAPbN2.mjs +0 -161
- package/chunks/BsKwchVA.mjs +0 -14
- package/chunks/BsM0L7CS.mjs +0 -132
- package/chunks/C5f3Xfsc2.mjs +0 -36
- package/chunks/C7l9aZGE.mjs +0 -577
- package/chunks/CFvkR9Ze2.mjs +0 -31
- package/chunks/CGM03LI5.mjs +0 -588
- package/chunks/CPejK_GQ2.mjs +0 -383
- package/chunks/CQSTyCVP.mjs +0 -6
- package/chunks/CQxz8uUc.mjs +0 -454
- package/chunks/CR29QUwT2.mjs +0 -28
- package/chunks/CWvo-ucD.mjs +0 -446
- package/chunks/C_eGir-J.mjs +0 -17
- package/chunks/Calzy0Az.mjs +0 -1275
- package/chunks/CbgD7y-5.mjs +0 -5
- package/chunks/CbsGuLZz2.mjs +0 -105
- package/chunks/CcT5SsZk.mjs +0 -48
- package/chunks/CdBytH8S.mjs +0 -266
- package/chunks/CiFlMt6Z.mjs +0 -41
- package/chunks/Cjkq49252.mjs +0 -60
- package/chunks/CnCSm3LY2.mjs +0 -4
- package/chunks/CsLrkldT2.mjs +0 -225
- package/chunks/Csiz_xCa2.mjs +0 -273
- package/chunks/Ctd3_wOH2.mjs +0 -6
- package/chunks/Cu2A_1vk2.mjs +0 -106
- package/chunks/CuoF9V8s.mjs +0 -3091
- package/chunks/CwBq1JZV.mjs +0 -250
- package/chunks/CwWfRmD3.mjs +0 -57
- package/chunks/CwqeV7002.mjs +0 -67
- package/chunks/Cy8jqgun2.mjs +0 -41
- package/chunks/D-hj62se2.mjs +0 -525
- package/chunks/D3Xixh5v.mjs +0 -5
- package/chunks/D4oNQiIK.mjs +0 -461
- package/chunks/D8r81QxD.mjs +0 -732
- package/chunks/DL0o_C092.mjs +0 -1093
- package/chunks/DLgn1tQG2.mjs +0 -60
- package/chunks/DStwh2ne.mjs +0 -281
- package/chunks/DXiLi19u2.mjs +0 -33
- package/chunks/DZ0frL1U.mjs +0 -69
- package/chunks/D_qwjNah.mjs +0 -1094
- package/chunks/Dg9Q-Tbi2.mjs +0 -299
- package/chunks/Dls3rTka2.mjs +0 -24
- package/chunks/DnBzQ-xh.mjs +0 -4
- package/chunks/DoNfjRR1.mjs +0 -68
- package/chunks/DrKq_frR.mjs +0 -98
- package/chunks/DsYXqJLZ.mjs +0 -641
- package/chunks/DsZznbt2.mjs +0 -208
- package/chunks/Dsd58O0g.mjs +0 -25
- package/chunks/Dtq1xYk8.mjs +0 -47
- package/chunks/EA6hte7s2.mjs +0 -49
- package/chunks/FeuisuNY2.mjs +0 -88
- package/chunks/GEtlriHC.mjs +0 -188
- package/chunks/GsvG1yFW.mjs +0 -1919
- package/chunks/KGmxNbpi.mjs +0 -21
- package/chunks/Q2Mal3Qn2.mjs +0 -439
- package/chunks/akEzJ4kG.mjs +0 -18
- package/chunks/cMuWbLPt.mjs +0 -196
- package/chunks/gh52LMTG.mjs +0 -12
- package/chunks/hgAOQY9a.mjs +0 -406
- package/chunks/lGc5ksPb.mjs +0 -279
- package/chunks/mD3gmiOy2.mjs +0 -96
- package/chunks/nLBvkerV2.mjs +0 -621
- package/chunks/pZQfJv282.mjs +0 -4
- package/chunks/qrHhuZXg.mjs +0 -465
- package/chunks/uqKZ4RIo.mjs +0 -222
- /package/chunks/{B31ub5xS.mjs → BBvIPqcc.mjs} +0 -0
- /package/chunks/{e70aZf3z.mjs → BoCxKwBf.mjs} +0 -0
- /package/chunks/{h-Uhst9y.mjs → CE67pCwD.mjs} +0 -0
- /package/chunks/{BMTtnkb7.mjs → CQeEP_Tl.mjs} +0 -0
- /package/chunks/{BwYEpK-u.mjs → CaczibeD.mjs} +0 -0
- /package/chunks/{BPpMbPS8.mjs → DZCryyFG.mjs} +0 -0
- /package/chunks/{BVuwiZGi.mjs → Dq63V0CC.mjs} +0 -0
- /package/chunks/{C1RsHtGI.mjs → OEBJ-trG.mjs} +0 -0
- /package/chunks/{7Cv9Cq-02.mjs → fjtZc9Rq2.mjs} +0 -0
package/chunks/CQxz8uUc.mjs
DELETED
|
@@ -1,454 +0,0 @@
|
|
|
1
|
-
import { i as e } from "./akEzJ4kG.mjs";
|
|
2
|
-
import { D as t, b as n, n as r, t as i } from "./hgAOQY9a.mjs";
|
|
3
|
-
import { E as a, M as o, O as s, d as c, i as l, l as u, p as d, s as f, t as p, u as m } from "./DrKq_frR.mjs";
|
|
4
|
-
import { F as h } from "./D4oNQiIK.mjs";
|
|
5
|
-
import { i as ee } from "./CcT5SsZk.mjs";
|
|
6
|
-
import { t as g } from "./BIj6pa8Z.mjs";
|
|
7
|
-
import { n as _, t as v } from "./BBPczt0U.mjs";
|
|
8
|
-
import { n as y } from "./CQSTyCVP.mjs";
|
|
9
|
-
import { Fragment as b, TransitionGroup as x, computed as S, createBlock as te, createCommentVNode as C, createElementBlock as ne, createElementVNode as w, createTextVNode as re, createVNode as T, defineComponent as E, inject as D, nextTick as ie, normalizeClass as O, normalizeStyle as ae, onBeforeUnmount as oe, onMounted as se, onUpdated as ce, openBlock as k, provide as le, reactive as A, ref as j, renderSlot as M, resolveDynamicComponent as ue, toDisplayString as de, toRefs as fe, unref as N, useSlots as pe, watch as P, withCtx as F } from "vue";
|
|
10
|
-
import { cloneDeep as I } from "lodash-unified";
|
|
11
|
-
import me from "async-validator";
|
|
12
|
-
var L = u({
|
|
13
|
-
...u({
|
|
14
|
-
size: {
|
|
15
|
-
type: String,
|
|
16
|
-
values: e
|
|
17
|
-
},
|
|
18
|
-
disabled: Boolean
|
|
19
|
-
}),
|
|
20
|
-
model: Object,
|
|
21
|
-
rules: { type: m(Object) },
|
|
22
|
-
labelPosition: {
|
|
23
|
-
type: String,
|
|
24
|
-
values: [
|
|
25
|
-
"left",
|
|
26
|
-
"right",
|
|
27
|
-
"top"
|
|
28
|
-
],
|
|
29
|
-
default: "right"
|
|
30
|
-
},
|
|
31
|
-
requireAsteriskPosition: {
|
|
32
|
-
type: String,
|
|
33
|
-
values: ["left", "right"],
|
|
34
|
-
default: "left"
|
|
35
|
-
},
|
|
36
|
-
labelWidth: {
|
|
37
|
-
type: [String, Number],
|
|
38
|
-
default: ""
|
|
39
|
-
},
|
|
40
|
-
labelSuffix: {
|
|
41
|
-
type: String,
|
|
42
|
-
default: ""
|
|
43
|
-
},
|
|
44
|
-
inline: Boolean,
|
|
45
|
-
inlineMessage: Boolean,
|
|
46
|
-
statusIcon: Boolean,
|
|
47
|
-
showMessage: {
|
|
48
|
-
type: Boolean,
|
|
49
|
-
default: !0
|
|
50
|
-
},
|
|
51
|
-
validateOnRuleChange: {
|
|
52
|
-
type: Boolean,
|
|
53
|
-
default: !0
|
|
54
|
-
},
|
|
55
|
-
hideRequiredAsterisk: Boolean,
|
|
56
|
-
scrollToError: Boolean,
|
|
57
|
-
scrollIntoViewOptions: {
|
|
58
|
-
type: m([Object, Boolean]),
|
|
59
|
-
default: !0
|
|
60
|
-
}
|
|
61
|
-
}), he = { validate: (e, t, n) => (a(e) || o(e)) && d(t) && o(n) }, R = u({
|
|
62
|
-
label: String,
|
|
63
|
-
labelWidth: { type: [String, Number] },
|
|
64
|
-
labelPosition: {
|
|
65
|
-
type: String,
|
|
66
|
-
values: [
|
|
67
|
-
"left",
|
|
68
|
-
"right",
|
|
69
|
-
"top",
|
|
70
|
-
""
|
|
71
|
-
],
|
|
72
|
-
default: ""
|
|
73
|
-
},
|
|
74
|
-
prop: { type: m([String, Array]) },
|
|
75
|
-
required: {
|
|
76
|
-
type: Boolean,
|
|
77
|
-
default: void 0
|
|
78
|
-
},
|
|
79
|
-
rules: { type: m([Object, Array]) },
|
|
80
|
-
error: String,
|
|
81
|
-
validateStatus: {
|
|
82
|
-
type: String,
|
|
83
|
-
values: [
|
|
84
|
-
"",
|
|
85
|
-
"error",
|
|
86
|
-
"validating",
|
|
87
|
-
"success"
|
|
88
|
-
]
|
|
89
|
-
},
|
|
90
|
-
for: String,
|
|
91
|
-
inlineMessage: {
|
|
92
|
-
type: Boolean,
|
|
93
|
-
default: void 0
|
|
94
|
-
},
|
|
95
|
-
showMessage: {
|
|
96
|
-
type: Boolean,
|
|
97
|
-
default: !0
|
|
98
|
-
},
|
|
99
|
-
size: {
|
|
100
|
-
type: String,
|
|
101
|
-
values: e
|
|
102
|
-
}
|
|
103
|
-
}), z = "ElForm";
|
|
104
|
-
function B() {
|
|
105
|
-
let e = j([]), t = S(() => {
|
|
106
|
-
if (!e.value.length) return "0";
|
|
107
|
-
let t = Math.max(...e.value);
|
|
108
|
-
return t ? `${t}px` : "";
|
|
109
|
-
});
|
|
110
|
-
function n(n) {
|
|
111
|
-
let r = e.value.indexOf(n);
|
|
112
|
-
return r === -1 && t.value === "0" && i(z, `unexpected width ${n}`), r;
|
|
113
|
-
}
|
|
114
|
-
function r(t, r) {
|
|
115
|
-
if (t && r) {
|
|
116
|
-
let i = n(r);
|
|
117
|
-
e.value.splice(i, 1, t);
|
|
118
|
-
} else t && e.value.push(t);
|
|
119
|
-
}
|
|
120
|
-
function a(t) {
|
|
121
|
-
let r = n(t);
|
|
122
|
-
r > -1 && e.value.splice(r, 1);
|
|
123
|
-
}
|
|
124
|
-
return {
|
|
125
|
-
autoLabelWidth: t,
|
|
126
|
-
registerLabelWidth: r,
|
|
127
|
-
deregisterLabelWidth: a
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
var V = (e, t) => {
|
|
131
|
-
let n = y(t).map((e) => a(e) ? e.join(".") : e);
|
|
132
|
-
return n.length > 0 ? e.filter((e) => e.propString && n.includes(e.propString)) : e;
|
|
133
|
-
}, H = "ElForm", ge = /* @__PURE__ */ E({
|
|
134
|
-
name: H,
|
|
135
|
-
__name: "form",
|
|
136
|
-
props: L,
|
|
137
|
-
emits: he,
|
|
138
|
-
setup(e, { expose: t, emit: n }) {
|
|
139
|
-
let r = e, o = n, l = j(), u = A([]), d = /* @__PURE__ */ new Map(), p = ee(), m = f("form"), h = S(() => {
|
|
140
|
-
let { labelPosition: e, inline: t } = r;
|
|
141
|
-
return [
|
|
142
|
-
m.b(),
|
|
143
|
-
m.m(p.value || "default"),
|
|
144
|
-
{
|
|
145
|
-
[m.m(`label-${e}`)]: e,
|
|
146
|
-
[m.m("inline")]: t
|
|
147
|
-
}
|
|
148
|
-
];
|
|
149
|
-
}), g = (e) => V(u, [e])[0], _ = (e) => {
|
|
150
|
-
u.includes(e) || u.push(e), e.propString && (d.has(e.propString) ? e.setInitialValue(d.get(e.propString)) : d.set(e.propString, I(e.fieldValue)));
|
|
151
|
-
}, b = (e, t) => {
|
|
152
|
-
if (t) {
|
|
153
|
-
d.delete(t);
|
|
154
|
-
return;
|
|
155
|
-
}
|
|
156
|
-
let n = u.indexOf(e);
|
|
157
|
-
n > -1 && (u.splice(n, 1), e.propString && d.set(e.propString, I(e.getInitialValue())));
|
|
158
|
-
}, x = (e) => {
|
|
159
|
-
if (!r.model) {
|
|
160
|
-
i(H, "model is required for setInitialValues to work.");
|
|
161
|
-
return;
|
|
162
|
-
}
|
|
163
|
-
if (!e) {
|
|
164
|
-
i(H, "initModel is required for setInitialValues to work.");
|
|
165
|
-
return;
|
|
166
|
-
}
|
|
167
|
-
for (let t of d.keys()) d.set(t, I(c(e, t).value));
|
|
168
|
-
u.forEach((t) => {
|
|
169
|
-
t.prop && t.setInitialValue(c(e, t.prop).value);
|
|
170
|
-
});
|
|
171
|
-
}, te = (e = []) => {
|
|
172
|
-
if (!r.model) {
|
|
173
|
-
i(H, "model is required for resetFields to work.");
|
|
174
|
-
return;
|
|
175
|
-
}
|
|
176
|
-
V(u, e).forEach((e) => e.resetField());
|
|
177
|
-
let t = new Set(u.map((e) => e.propString).filter(Boolean)), n = e.length > 0 ? y(e).map((e) => a(e) ? e.join(".") : e) : [...d.keys()];
|
|
178
|
-
for (let e of n) !t.has(e) && d.has(e) && (c(r.model, e).value = I(d.get(e)));
|
|
179
|
-
}, C = (e = []) => {
|
|
180
|
-
V(u, e).forEach((e) => e.clearValidate());
|
|
181
|
-
}, w = S(() => {
|
|
182
|
-
let e = !!r.model;
|
|
183
|
-
return e || i(H, "model is required for validate to work."), e;
|
|
184
|
-
}), re = (e) => {
|
|
185
|
-
if (u.length === 0) return [];
|
|
186
|
-
let t = V(u, e);
|
|
187
|
-
return t.length ? t : (i(H, "please pass correct props!"), []);
|
|
188
|
-
}, T = async (e) => D(void 0, e), E = async (e = []) => {
|
|
189
|
-
if (!w.value) return !1;
|
|
190
|
-
let t = re(e);
|
|
191
|
-
if (t.length === 0) return !0;
|
|
192
|
-
let n = {};
|
|
193
|
-
for (let e of t) try {
|
|
194
|
-
await e.validate(""), e.validateState === "error" && !e.error && e.resetField();
|
|
195
|
-
} catch (e) {
|
|
196
|
-
n = {
|
|
197
|
-
...n,
|
|
198
|
-
...e
|
|
199
|
-
};
|
|
200
|
-
}
|
|
201
|
-
return Object.keys(n).length === 0 ? !0 : Promise.reject(n);
|
|
202
|
-
}, D = async (e = [], t) => {
|
|
203
|
-
let n = !1, i = !s(t);
|
|
204
|
-
try {
|
|
205
|
-
return n = await E(e), n === !0 && await (t == null ? void 0 : t(n)), n;
|
|
206
|
-
} catch (e) {
|
|
207
|
-
if (e instanceof Error) throw e;
|
|
208
|
-
let o = e;
|
|
209
|
-
if (r.scrollToError) {
|
|
210
|
-
var a;
|
|
211
|
-
l.value && ((a = l.value.querySelector(`.${m.b()}-item.is-error`)) == null || a.scrollIntoView(r.scrollIntoViewOptions));
|
|
212
|
-
}
|
|
213
|
-
return !n && await (t == null ? void 0 : t(!1, o)), i && Promise.reject(o);
|
|
214
|
-
}
|
|
215
|
-
}, ie = (e) => {
|
|
216
|
-
var t;
|
|
217
|
-
let n = g(e);
|
|
218
|
-
n && ((t = n.$el) == null || t.scrollIntoView(r.scrollIntoViewOptions));
|
|
219
|
-
};
|
|
220
|
-
return P(() => r.rules, () => {
|
|
221
|
-
r.validateOnRuleChange && T().catch((e) => i(e));
|
|
222
|
-
}, {
|
|
223
|
-
deep: !0,
|
|
224
|
-
flush: "post"
|
|
225
|
-
}), le(v, A({
|
|
226
|
-
...fe(r),
|
|
227
|
-
emit: o,
|
|
228
|
-
resetFields: te,
|
|
229
|
-
clearValidate: C,
|
|
230
|
-
validateField: D,
|
|
231
|
-
getField: g,
|
|
232
|
-
addField: _,
|
|
233
|
-
removeField: b,
|
|
234
|
-
setInitialValues: x,
|
|
235
|
-
...B()
|
|
236
|
-
})), t({
|
|
237
|
-
validate: T,
|
|
238
|
-
validateField: D,
|
|
239
|
-
resetFields: te,
|
|
240
|
-
clearValidate: C,
|
|
241
|
-
scrollToField: ie,
|
|
242
|
-
getField: g,
|
|
243
|
-
fields: u,
|
|
244
|
-
setInitialValues: x
|
|
245
|
-
}), (e, t) => (k(), ne("form", {
|
|
246
|
-
ref_key: "formRef",
|
|
247
|
-
ref: l,
|
|
248
|
-
class: O(h.value)
|
|
249
|
-
}, [M(e.$slots, "default")], 2));
|
|
250
|
-
}
|
|
251
|
-
}), U = "ElLabelWrap", _e = /* @__PURE__ */ E({
|
|
252
|
-
name: U,
|
|
253
|
-
props: {
|
|
254
|
-
isAutoWidth: Boolean,
|
|
255
|
-
updateAll: Boolean
|
|
256
|
-
},
|
|
257
|
-
setup(e, { slots: t }) {
|
|
258
|
-
let i = D(v, void 0), a = D(_);
|
|
259
|
-
a || r(U, "usage: <el-form-item><label-wrap /></el-form-item>");
|
|
260
|
-
let o = f("form"), s = j(), c = j(0), l = () => {
|
|
261
|
-
var e;
|
|
262
|
-
if ((e = s.value) != null && e.firstElementChild) {
|
|
263
|
-
let e = window.getComputedStyle(s.value.firstElementChild).width;
|
|
264
|
-
return Math.ceil(Number.parseFloat(e));
|
|
265
|
-
} else return 0;
|
|
266
|
-
}, u = (n = "update") => {
|
|
267
|
-
ie(() => {
|
|
268
|
-
t.default && e.isAutoWidth && (n === "update" ? c.value = l() : n === "remove" && (i == null || i.deregisterLabelWidth(c.value)));
|
|
269
|
-
});
|
|
270
|
-
}, d = () => u("update");
|
|
271
|
-
return se(() => {
|
|
272
|
-
d();
|
|
273
|
-
}), oe(() => {
|
|
274
|
-
u("remove");
|
|
275
|
-
}), ce(() => d()), P(c, (t, n) => {
|
|
276
|
-
e.updateAll && (i == null || i.registerLabelWidth(t, n));
|
|
277
|
-
}), n(S(() => {
|
|
278
|
-
var e;
|
|
279
|
-
return ((e = s.value) == null ? void 0 : e.firstElementChild) ?? null;
|
|
280
|
-
}), d), () => {
|
|
281
|
-
var n;
|
|
282
|
-
if (!t) return null;
|
|
283
|
-
let { isAutoWidth: r } = e;
|
|
284
|
-
if (r) {
|
|
285
|
-
var l;
|
|
286
|
-
let e = i == null ? void 0 : i.autoLabelWidth, n = a == null ? void 0 : a.hasLabel, r = {};
|
|
287
|
-
if (n && e && e !== "auto") {
|
|
288
|
-
let t = Math.max(0, Number.parseInt(e, 10) - c.value), n = (a.labelPosition || i.labelPosition) === "left" ? "marginRight" : "marginLeft";
|
|
289
|
-
t && (r[n] = `${t}px`);
|
|
290
|
-
}
|
|
291
|
-
return T("div", {
|
|
292
|
-
ref: s,
|
|
293
|
-
class: [o.be("item", "label-wrap")],
|
|
294
|
-
style: r
|
|
295
|
-
}, [(l = t.default) == null ? void 0 : l.call(t)]);
|
|
296
|
-
} else return T(b, { ref: s }, [(n = t.default) == null ? void 0 : n.call(t)]);
|
|
297
|
-
};
|
|
298
|
-
}
|
|
299
|
-
}), ve = ["role", "aria-labelledby"], W = /* @__PURE__ */ E({
|
|
300
|
-
name: "ElFormItem",
|
|
301
|
-
__name: "form-item",
|
|
302
|
-
props: R,
|
|
303
|
-
setup(e, { expose: n }) {
|
|
304
|
-
let r = e, i = pe(), o = D(v, void 0), l = D(_, void 0), u = ee(void 0, { formItem: !1 }), p = f("form-item"), m = g().value, b = j([]), E = j(""), ce = t(E, 100), L = j(""), he = j(), R, z = !1, B = S(() => r.labelPosition || (o == null ? void 0 : o.labelPosition)), V = S(() => B.value === "top" ? {} : { width: h(r.labelWidth ?? (o == null ? void 0 : o.labelWidth)) }), H = S(() => {
|
|
305
|
-
if (B.value === "top" || o != null && o.inline || !r.label && !r.labelWidth && ye) return {};
|
|
306
|
-
let e = h(r.labelWidth ?? (o == null ? void 0 : o.labelWidth));
|
|
307
|
-
return !r.label && !i.label ? { marginLeft: e } : {};
|
|
308
|
-
}), ge = S(() => [
|
|
309
|
-
p.b(),
|
|
310
|
-
p.m(u.value),
|
|
311
|
-
p.is("error", E.value === "error"),
|
|
312
|
-
p.is("validating", E.value === "validating"),
|
|
313
|
-
p.is("success", E.value === "success"),
|
|
314
|
-
p.is("required", Se.value || r.required),
|
|
315
|
-
p.is("no-asterisk", o == null ? void 0 : o.hideRequiredAsterisk),
|
|
316
|
-
(o == null ? void 0 : o.requireAsteriskPosition) === "right" ? "asterisk-right" : "asterisk-left",
|
|
317
|
-
{
|
|
318
|
-
[p.m("feedback")]: o == null ? void 0 : o.statusIcon,
|
|
319
|
-
[p.m(`label-${B.value}`)]: B.value
|
|
320
|
-
}
|
|
321
|
-
]), U = S(() => d(r.inlineMessage) ? r.inlineMessage : (o == null ? void 0 : o.inlineMessage) || !1), W = S(() => [p.e("error"), { [p.em("error", "inline")]: U.value }]), G = S(() => r.prop ? a(r.prop) ? r.prop.join(".") : r.prop : ""), K = S(() => !!(r.label || i.label)), q = S(() => r.for ?? (b.value.length === 1 ? b.value[0] : void 0)), J = S(() => !q.value && K.value), ye = !!l, Y = S(() => {
|
|
322
|
-
let e = o == null ? void 0 : o.model;
|
|
323
|
-
if (!(!e || !r.prop)) return c(e, r.prop).value;
|
|
324
|
-
}), X = S(() => {
|
|
325
|
-
let { required: e } = r, t = [];
|
|
326
|
-
r.rules && t.push(...y(r.rules));
|
|
327
|
-
let n = o == null ? void 0 : o.rules;
|
|
328
|
-
if (n && r.prop) {
|
|
329
|
-
let e = c(n, r.prop).value;
|
|
330
|
-
e && t.push(...y(e));
|
|
331
|
-
}
|
|
332
|
-
if (e !== void 0) {
|
|
333
|
-
let n = t.map((e, t) => [e, t]).filter(([e]) => "required" in e);
|
|
334
|
-
if (n.length > 0) for (let [r, i] of n) r.required !== e && (t[i] = {
|
|
335
|
-
...r,
|
|
336
|
-
required: e
|
|
337
|
-
});
|
|
338
|
-
else t.push({ required: e });
|
|
339
|
-
}
|
|
340
|
-
return t;
|
|
341
|
-
}), be = S(() => X.value.length > 0), xe = (e) => X.value.filter((t) => !t.trigger || !e ? !0 : a(t.trigger) ? t.trigger.includes(e) : t.trigger === e).map(({ trigger: e, ...t }) => t), Se = S(() => X.value.some((e) => e.required)), Ce = S(() => ce.value === "error" && r.showMessage && ((o == null ? void 0 : o.showMessage) ?? !0)), we = S(() => `${r.label || ""}${(o == null ? void 0 : o.labelSuffix) || ""}`), Z = (e) => {
|
|
342
|
-
E.value = e;
|
|
343
|
-
}, Te = (e) => {
|
|
344
|
-
var t;
|
|
345
|
-
let { errors: n, fields: i } = e;
|
|
346
|
-
(!n || !i) && console.error(e), Z("error"), L.value = n ? (n == null || (t = n[0]) == null ? void 0 : t.message) ?? `${r.prop} is required` : "", o == null || o.emit("validate", r.prop, !1, L.value);
|
|
347
|
-
}, Ee = () => {
|
|
348
|
-
Z("success"), o == null || o.emit("validate", r.prop, !0, "");
|
|
349
|
-
}, De = async (e) => {
|
|
350
|
-
let t = G.value;
|
|
351
|
-
return new me({ [t]: e }).validate({ [t]: Y.value }, { firstFields: !0 }).then(() => (Ee(), !0)).catch((e) => (Te(e), Promise.reject(e)));
|
|
352
|
-
}, Oe = async (e, t) => {
|
|
353
|
-
if (z || !r.prop) return !1;
|
|
354
|
-
let n = s(t);
|
|
355
|
-
if (!be.value) return t == null || t(!1), !1;
|
|
356
|
-
let i = xe(e);
|
|
357
|
-
return i.length === 0 ? (t == null || t(!0), !0) : (Z("validating"), De(i).then(() => (t == null || t(!0), !0)).catch((e) => {
|
|
358
|
-
let { fields: r } = e;
|
|
359
|
-
return t == null || t(!1, r), n ? !1 : Promise.reject(r);
|
|
360
|
-
}));
|
|
361
|
-
}, ke = () => {
|
|
362
|
-
Z(""), L.value = "", z = !1;
|
|
363
|
-
}, Ae = async () => {
|
|
364
|
-
let e = o == null ? void 0 : o.model;
|
|
365
|
-
if (!e || !r.prop) return;
|
|
366
|
-
let t = c(e, r.prop);
|
|
367
|
-
z = !0, t.value = I(R), await ie(), ke(), z = !1;
|
|
368
|
-
}, je = (e) => {
|
|
369
|
-
b.value.includes(e) || b.value.push(e);
|
|
370
|
-
}, Me = (e) => {
|
|
371
|
-
b.value = b.value.filter((t) => t !== e);
|
|
372
|
-
}, Q = (e) => {
|
|
373
|
-
R = I(e);
|
|
374
|
-
}, Ne = () => R;
|
|
375
|
-
P(() => r.error, (e) => {
|
|
376
|
-
L.value = e || "", Z(e ? "error" : "");
|
|
377
|
-
}, { immediate: !0 }), P(() => r.validateStatus, (e) => Z(e || ""));
|
|
378
|
-
let $ = A({
|
|
379
|
-
...fe(r),
|
|
380
|
-
$el: he,
|
|
381
|
-
size: u,
|
|
382
|
-
validateMessage: L,
|
|
383
|
-
validateState: E,
|
|
384
|
-
labelId: m,
|
|
385
|
-
inputIds: b,
|
|
386
|
-
isGroup: J,
|
|
387
|
-
hasLabel: K,
|
|
388
|
-
fieldValue: Y,
|
|
389
|
-
addInputId: je,
|
|
390
|
-
removeInputId: Me,
|
|
391
|
-
resetField: Ae,
|
|
392
|
-
clearValidate: ke,
|
|
393
|
-
validate: Oe,
|
|
394
|
-
propString: G,
|
|
395
|
-
setInitialValue: Q,
|
|
396
|
-
getInitialValue: Ne
|
|
397
|
-
});
|
|
398
|
-
return le(_, $), P(G, (e, t) => {
|
|
399
|
-
!o || !t || (o.removeField($, t), e && (Q(Y.value), o.addField($)));
|
|
400
|
-
}), se(() => {
|
|
401
|
-
r.prop && (Q(Y.value), o == null || o.addField($));
|
|
402
|
-
}), oe(() => {
|
|
403
|
-
o == null || o.removeField($);
|
|
404
|
-
}), n({
|
|
405
|
-
size: u,
|
|
406
|
-
validateMessage: L,
|
|
407
|
-
validateState: E,
|
|
408
|
-
validate: Oe,
|
|
409
|
-
clearValidate: ke,
|
|
410
|
-
resetField: Ae,
|
|
411
|
-
setInitialValue: Q
|
|
412
|
-
}), (t, n) => {
|
|
413
|
-
var r;
|
|
414
|
-
return k(), ne("div", {
|
|
415
|
-
ref_key: "formItemRef",
|
|
416
|
-
ref: he,
|
|
417
|
-
class: O(ge.value),
|
|
418
|
-
role: J.value ? "group" : void 0,
|
|
419
|
-
"aria-labelledby": J.value ? N(m) : void 0
|
|
420
|
-
}, [T(N(_e), {
|
|
421
|
-
"is-auto-width": V.value.width === "auto",
|
|
422
|
-
"update-all": ((r = N(o)) == null ? void 0 : r.labelWidth) === "auto"
|
|
423
|
-
}, {
|
|
424
|
-
default: F(() => [e.label || t.$slots.label ? (k(), te(ue(q.value ? "label" : "div"), {
|
|
425
|
-
key: 0,
|
|
426
|
-
id: N(m),
|
|
427
|
-
for: q.value,
|
|
428
|
-
class: O(N(p).e("label")),
|
|
429
|
-
style: ae(V.value)
|
|
430
|
-
}, {
|
|
431
|
-
default: F(() => [M(t.$slots, "label", { label: we.value }, () => [re(de(we.value), 1)])]),
|
|
432
|
-
_: 3
|
|
433
|
-
}, 8, [
|
|
434
|
-
"id",
|
|
435
|
-
"for",
|
|
436
|
-
"class",
|
|
437
|
-
"style"
|
|
438
|
-
])) : C("v-if", !0)]),
|
|
439
|
-
_: 3
|
|
440
|
-
}, 8, ["is-auto-width", "update-all"]), w("div", {
|
|
441
|
-
class: O(N(p).e("content")),
|
|
442
|
-
style: ae(H.value)
|
|
443
|
-
}, [M(t.$slots, "default"), T(x, { name: `${N(p).namespace.value}-zoom-in-top` }, {
|
|
444
|
-
default: F(() => [Ce.value ? M(t.$slots, "error", {
|
|
445
|
-
key: 0,
|
|
446
|
-
error: L.value
|
|
447
|
-
}, () => [w("div", { class: O(W.value) }, de(L.value), 3)]) : C("v-if", !0)]),
|
|
448
|
-
_: 3
|
|
449
|
-
}, 8, ["name"])], 6)], 10, ve);
|
|
450
|
-
};
|
|
451
|
-
}
|
|
452
|
-
}), G = p(ge, { FormItem: W }), K = l(W);
|
|
453
|
-
//#endregion
|
|
454
|
-
export { K as n, G as t };
|
package/chunks/CR29QUwT2.mjs
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import "./CjjJimnU.mjs";
|
|
2
|
-
import { t as e } from "./DsYXqJLZ.mjs";
|
|
3
|
-
import { n as t, o as n } from "./BsM0L7CS.mjs";
|
|
4
|
-
import { allProps as r, predicate as i } from "../props/slide.mjs";
|
|
5
|
-
import { createVNode as a, mergeProps as o, useModel as s } from "vue";
|
|
6
|
-
//#endregion
|
|
7
|
-
//#region src/components/form/FormSlider.vue
|
|
8
|
-
var c = {
|
|
9
|
-
name: "FormSlider",
|
|
10
|
-
inheritAttrs: !1,
|
|
11
|
-
props: { ...r },
|
|
12
|
-
emits: { ...t },
|
|
13
|
-
setup(t, { emit: r, slots: c, attrs: l }) {
|
|
14
|
-
let u = s(t, "modelValue"), { render: d, disabled: f, listeners: p, inputProps: m } = n(t, {
|
|
15
|
-
emit: r,
|
|
16
|
-
slots: c,
|
|
17
|
-
predicate: i,
|
|
18
|
-
attrs: l
|
|
19
|
-
});
|
|
20
|
-
return () => d({ vNodes: a(e, o(p.value, m.value, {
|
|
21
|
-
modelValue: u.value,
|
|
22
|
-
"onUpdate:modelValue": (e) => u.value = e,
|
|
23
|
-
disabled: f.value
|
|
24
|
-
}), null) });
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
//#endregion
|
|
28
|
-
export { c as t };
|