@xiaohaih/json-form-vant 0.0.1
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/CHANGELOG.md +9 -0
- package/README.md +807 -0
- package/TODO.md +36 -0
- package/components/area/index.ts +6 -0
- package/components/area/index.vue +120 -0
- package/components/area/types.ts +84 -0
- package/components/cascader/index.ts +6 -0
- package/components/cascader/index.vue +146 -0
- package/components/cascader/types.ts +75 -0
- package/components/checkbox/index.ts +6 -0
- package/components/checkbox/index.vue +59 -0
- package/components/checkbox/types.ts +54 -0
- package/components/checkbox-group/index.ts +6 -0
- package/components/checkbox-group/index.vue +67 -0
- package/components/checkbox-group/types.ts +63 -0
- package/components/component-definition/components.ts +29 -0
- package/components/component-definition/definition.ts +25 -0
- package/components/component-definition/index.ts +4 -0
- package/components/custom-render/index.ts +6 -0
- package/components/custom-render/index.vue +66 -0
- package/components/custom-render/types.ts +43 -0
- package/components/date-picker/index.ts +6 -0
- package/components/date-picker/index.vue +130 -0
- package/components/date-picker/types.ts +91 -0
- package/components/date-time-picker-group/index.ts +6 -0
- package/components/date-time-picker-group/index.vue +158 -0
- package/components/date-time-picker-group/types.ts +115 -0
- package/components/datetime-picker/index.ts +6 -0
- package/components/datetime-picker/index.vue +128 -0
- package/components/datetime-picker/types.ts +78 -0
- package/components/dynamic-group/index.ts +10 -0
- package/components/dynamic-group/index.vue +140 -0
- package/components/dynamic-group/types.ts +68 -0
- package/components/group/assist.ts +99 -0
- package/components/group/index.ts +7 -0
- package/components/group/index.vue +117 -0
- package/components/group/types.ts +57 -0
- package/components/group/virtual-group.vue +38 -0
- package/components/index.ts +10 -0
- package/components/input/index.ts +6 -0
- package/components/input/index.vue +83 -0
- package/components/input/types.ts +43 -0
- package/components/input-slot/index.ts +6 -0
- package/components/input-slot/index.vue +148 -0
- package/components/input-slot/types.ts +34 -0
- package/components/number-keyboard/index.ts +6 -0
- package/components/number-keyboard/index.vue +81 -0
- package/components/number-keyboard/types.ts +57 -0
- package/components/password-input/index.ts +6 -0
- package/components/password-input/index.vue +103 -0
- package/components/password-input/types.ts +64 -0
- package/components/picker/index.ts +6 -0
- package/components/picker/index.vue +136 -0
- package/components/picker/types.ts +94 -0
- package/components/radio/index.ts +6 -0
- package/components/radio/index.vue +68 -0
- package/components/radio/types.ts +58 -0
- package/components/radio-group/index.ts +6 -0
- package/components/radio-group/index.vue +74 -0
- package/components/radio-group/types.ts +65 -0
- package/components/rate/index.ts +6 -0
- package/components/rate/index.vue +63 -0
- package/components/rate/types.ts +47 -0
- package/components/share.ts +78 -0
- package/components/signature/index.ts +6 -0
- package/components/signature/index.vue +65 -0
- package/components/signature/instance.vue +161 -0
- package/components/signature/types.ts +79 -0
- package/components/slider/index.ts +6 -0
- package/components/slider/index.vue +63 -0
- package/components/slider/types.ts +53 -0
- package/components/stepper/index.ts +6 -0
- package/components/stepper/index.vue +62 -0
- package/components/stepper/types.ts +47 -0
- package/components/switch/index.ts +6 -0
- package/components/switch/index.vue +61 -0
- package/components/switch/types.ts +51 -0
- package/components/time-picker/index.ts +6 -0
- package/components/time-picker/index.vue +130 -0
- package/components/time-picker/types.ts +91 -0
- package/components/tree-select/index.ts +6 -0
- package/components/tree-select/index.vue +160 -0
- package/components/tree-select/types.ts +77 -0
- package/components/upload/index.ts +6 -0
- package/components/upload/index.vue +109 -0
- package/components/upload/types.ts +85 -0
- package/components/use.ts +45 -0
- package/components/utils.ts +52 -0
- package/components/wrapper/index.ts +6 -0
- package/components/wrapper/index.vue +117 -0
- package/components/wrapper/types.ts +94 -0
- package/dist/components/area/index.d.ts +5 -0
- package/dist/components/area/index.vue.d.ts +1843 -0
- package/dist/components/area/types.d.ts +1434 -0
- package/dist/components/cascader/index.d.ts +5 -0
- package/dist/components/cascader/index.vue.d.ts +2467 -0
- package/dist/components/cascader/types.d.ts +1419 -0
- package/dist/components/checkbox/index.d.ts +5 -0
- package/dist/components/checkbox/index.vue.d.ts +1550 -0
- package/dist/components/checkbox/types.d.ts +1313 -0
- package/dist/components/checkbox-group/index.d.ts +5 -0
- package/dist/components/checkbox-group/index.vue.d.ts +1643 -0
- package/dist/components/checkbox-group/types.d.ts +1372 -0
- package/dist/components/component-definition/components.d.ts +30 -0
- package/dist/components/component-definition/index.d.ts +4 -0
- package/dist/components/custom-render/index.d.ts +5 -0
- package/dist/components/custom-render/index.vue.d.ts +1473 -0
- package/dist/components/custom-render/types.d.ts +1175 -0
- package/dist/components/date-picker/index.d.ts +5 -0
- package/dist/components/date-picker/index.vue.d.ts +1888 -0
- package/dist/components/date-picker/types.d.ts +1458 -0
- package/dist/components/date-time-picker-group/index.d.ts +5 -0
- package/dist/components/date-time-picker-group/index.vue.d.ts +2181 -0
- package/dist/components/date-time-picker-group/types.d.ts +1549 -0
- package/dist/components/dynamic-group/index.d.ts +5 -0
- package/dist/components/dynamic-group/index.vue.d.ts +457 -0
- package/dist/components/dynamic-group/types.d.ts +403 -0
- package/dist/components/group/assist.d.ts +58 -0
- package/dist/components/group/index.d.ts +6 -0
- package/dist/components/group/index.vue.d.ts +139 -0
- package/dist/components/group/types.d.ts +189 -0
- package/dist/components/group/virtual-group.vue.d.ts +42 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/input/index.d.ts +5 -0
- package/dist/components/input/index.vue.d.ts +2229 -0
- package/dist/components/input/types.d.ts +1258 -0
- package/dist/components/input-slot/index.d.ts +5 -0
- package/dist/components/input-slot/index.vue.d.ts +626 -0
- package/dist/components/input-slot/types.d.ts +311 -0
- package/dist/components/number-keyboard/index.d.ts +5 -0
- package/dist/components/number-keyboard/index.vue.d.ts +1643 -0
- package/dist/components/number-keyboard/types.d.ts +1324 -0
- package/dist/components/password-input/index.d.ts +5 -0
- package/dist/components/password-input/index.vue.d.ts +1715 -0
- package/dist/components/password-input/types.d.ts +1357 -0
- package/dist/components/picker/index.d.ts +5 -0
- package/dist/components/picker/index.vue.d.ts +1868 -0
- package/dist/components/picker/types.d.ts +1466 -0
- package/dist/components/radio/index.d.ts +5 -0
- package/dist/components/radio/index.vue.d.ts +1563 -0
- package/dist/components/radio/types.d.ts +1327 -0
- package/dist/components/radio-group/index.d.ts +5 -0
- package/dist/components/radio-group/index.vue.d.ts +1617 -0
- package/dist/components/radio-group/types.d.ts +1383 -0
- package/dist/components/rate/index.d.ts +5 -0
- package/dist/components/rate/index.vue.d.ts +1557 -0
- package/dist/components/rate/types.d.ts +1281 -0
- package/dist/components/share.d.ts +679 -0
- package/dist/components/signature/index.d.ts +5 -0
- package/dist/components/signature/index.vue.d.ts +3017 -0
- package/dist/components/signature/instance.vue.d.ts +1614 -0
- package/dist/components/signature/types.d.ts +1369 -0
- package/dist/components/slider/index.d.ts +5 -0
- package/dist/components/slider/index.vue.d.ts +1563 -0
- package/dist/components/slider/types.d.ts +1302 -0
- package/dist/components/stepper/index.d.ts +5 -0
- package/dist/components/stepper/index.vue.d.ts +1620 -0
- package/dist/components/stepper/types.d.ts +1281 -0
- package/dist/components/switch/index.d.ts +5 -0
- package/dist/components/switch/index.vue.d.ts +1529 -0
- package/dist/components/switch/types.d.ts +1296 -0
- package/dist/components/time-picker/index.d.ts +5 -0
- package/dist/components/time-picker/index.vue.d.ts +1936 -0
- package/dist/components/time-picker/types.d.ts +1458 -0
- package/dist/components/tree-select/index.d.ts +5 -0
- package/dist/components/tree-select/index.vue.d.ts +1802 -0
- package/dist/components/tree-select/types.d.ts +1411 -0
- package/dist/components/upload/index.d.ts +5 -0
- package/dist/components/upload/index.vue.d.ts +1697 -0
- package/dist/components/upload/types.d.ts +1376 -0
- package/dist/components/use.d.ts +53 -0
- package/dist/components/utils.d.ts +15 -0
- package/dist/components/wrapper/index.d.ts +5 -0
- package/dist/components/wrapper/index.vue.d.ts +1085 -0
- package/dist/components/wrapper/types.d.ts +541 -0
- package/dist/docs/.vitepress/config.d.ts +3 -0
- package/dist/docs/.vitepress/theme/index.d.ts +2 -0
- package/dist/index.cjs.js +5459 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.cjs.min.js +3568 -0
- package/dist/index.cjs.min.js.map +1 -0
- package/dist/index.esm.js +5264 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.esm.min.js +3559 -0
- package/dist/index.esm.min.js.map +1 -0
- package/dist/index.umd.js +5465 -0
- package/dist/index.umd.js.map +1 -0
- package/dist/index.umd.min.js +3573 -0
- package/dist/index.umd.min.js.map +1 -0
- package/dist/src/assist.d.ts +32 -0
- package/dist/src/index.d.ts +5 -0
- package/dist/src/interface.d.ts +129 -0
- package/dist/src/utils.d.ts +9 -0
- package/dist/src/version.d.ts +2 -0
- package/docs/.vitepress/config.ts +99 -0
- package/docs/.vitepress/theme/index.ts +5 -0
- package/docs/README.md +20 -0
- package/docs/index.md +25 -0
- package/env.d.ts +8 -0
- package/package.json +71 -0
- package/scripts/generate-version.mjs +26 -0
- package/scripts/postinstall.cjs +13 -0
- package/scripts/utils.cjs +67 -0
- package/src/assist.ts +40 -0
- package/src/index.ts +5 -0
- package/src/interface.ts +293 -0
- package/src/utils.ts +22 -0
- package/src/version.ts +2 -0
- package/tsconfig.app.json +41 -0
- package/tsconfig.json +7 -0
- package/tsconfig.node.json +24 -0
- package/tsdown.config.ts +12 -0
- package/vite.config.ts +93 -0
|
@@ -0,0 +1,3559 @@
|
|
|
1
|
+
import * as e from "vue";
|
|
2
|
+
import { Fragment as t, computed as n, createBlock as o, createCommentVNode as l, createElementBlock as a, createSlots as r, createTextVNode as i, createVNode as s, defineComponent as u, guardReactiveProps as d, markRaw as c, mergeProps as p, nextTick as f, normalizeProps as y, onBeforeUnmount as h, onMounted as b, openBlock as m, ref as v, renderList as g, renderSlot as k, resolveComponent as O, resolveDynamicComponent as P, toDisplayString as V, toHandlers as w, useTemplateRef as j, watch as C, withCtx as S, withKeys as R, withModifiers as F } from "vue";
|
|
3
|
+
import { Area as H, Cascader as A, CellGroup as x, Checkbox as _, CheckboxGroup as I, DatePicker as N, Field as q, Form as D, NumberKeyboard as T, PasswordInput as U, Picker as B, PickerGroup as $, Popup as E, Radio as G, RadioGroup as K, Rate as L, Signature as M, Slider as W, Stepper as Q, Switch as Y, TimePicker as z, TreeSelect as J, Uploader as X } from "vant";
|
|
4
|
+
var Z, ee, te = Object.defineProperty, ne = Object.getOwnPropertyDescriptor, oe = Object.getOwnPropertyNames, le = Object.prototype.hasOwnProperty, ae = (e, t) => {
|
|
5
|
+
let n = {};
|
|
6
|
+
for (var o in e) te(n, o, {
|
|
7
|
+
get: e[o],
|
|
8
|
+
enumerable: !0
|
|
9
|
+
});
|
|
10
|
+
return t || te(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
11
|
+
}, re = (e, t, n, o) => {
|
|
12
|
+
if (t && "object" == typeof t || "function" == typeof t) for (var l, a = oe(t), r = 0, i = a.length; r < i; r++) l = a[r], le.call(e, l) || l === n || te(e, l, {
|
|
13
|
+
get: ((e) => t[e]).bind(null, l),
|
|
14
|
+
enumerable: !(o = ne(t, l)) || o.enumerable
|
|
15
|
+
});
|
|
16
|
+
return e;
|
|
17
|
+
}, ie = ae({
|
|
18
|
+
Vue: () => e,
|
|
19
|
+
Vue2: () => {},
|
|
20
|
+
del: () => ce,
|
|
21
|
+
install: () => ue,
|
|
22
|
+
isVue2: () => !1,
|
|
23
|
+
isVue3: () => !0,
|
|
24
|
+
set: () => de
|
|
25
|
+
});
|
|
26
|
+
import * as se from "vue";
|
|
27
|
+
re(ie, Z = se, "default"), ee && re(ee, Z, "default");
|
|
28
|
+
function ue() {}
|
|
29
|
+
function de(e, t, n) {
|
|
30
|
+
return Array.isArray(e) ? (e.length = Math.max(e.length, t), e.splice(t, 1, n), n) : (e[t] = n, n);
|
|
31
|
+
}
|
|
32
|
+
function ce(e, t) {
|
|
33
|
+
Array.isArray(e) ? e.splice(t, 1) : delete e[t];
|
|
34
|
+
}
|
|
35
|
+
function pe() {}
|
|
36
|
+
function fe(e) {
|
|
37
|
+
return Object.prototype.toString.call(e).slice(8, -1);
|
|
38
|
+
}
|
|
39
|
+
function ye(e) {
|
|
40
|
+
return "Array" === fe(e);
|
|
41
|
+
}
|
|
42
|
+
function he(e) {
|
|
43
|
+
return "Object" === fe(e);
|
|
44
|
+
}
|
|
45
|
+
function be(e) {
|
|
46
|
+
return !me(e);
|
|
47
|
+
}
|
|
48
|
+
function me(e) {
|
|
49
|
+
return void 0 === e || "" === e || null === e;
|
|
50
|
+
}
|
|
51
|
+
function ve(e) {
|
|
52
|
+
return e || 0 === e ? "function" == typeof e || "object" == typeof e ? e : () => e : null;
|
|
53
|
+
}
|
|
54
|
+
var ge = /\B([A-Z])/g, ke = function(e) {
|
|
55
|
+
const t = {};
|
|
56
|
+
return (n) => t[n] || (t[n] = e(n));
|
|
57
|
+
}((e) => e.replace(ge, "-$1").toLowerCase()), Oe = /[.[\]]/, Pe = /^\d+$/, Ve = /['"]/g;
|
|
58
|
+
function we(e, t, n) {
|
|
59
|
+
if (!e || !t) return n;
|
|
60
|
+
const o = t.split(Oe);
|
|
61
|
+
let l = e;
|
|
62
|
+
for (const e of o) {
|
|
63
|
+
if (null === l) return n;
|
|
64
|
+
if (void 0 === l) return n;
|
|
65
|
+
const t = e.replace(Ve, "");
|
|
66
|
+
"" !== t.trim() && (l = l[t]);
|
|
67
|
+
}
|
|
68
|
+
return void 0 === l ? n : l;
|
|
69
|
+
}
|
|
70
|
+
function je(e, t, n) {
|
|
71
|
+
(function(e, t, n, o) {
|
|
72
|
+
if (!e || !t) return;
|
|
73
|
+
const l = t.split(Oe).filter((e) => !!e.trim());
|
|
74
|
+
if (!l.length) return;
|
|
75
|
+
const a = (e) => {
|
|
76
|
+
if (l.length > 1) {
|
|
77
|
+
const t = l.shift();
|
|
78
|
+
void 0 === e[t] && (o ? o(e, t, Pe.test(l[0]) ? [] : {}) : e[t] = Pe.test(l[0]) ? [] : {}), a(e[t]);
|
|
79
|
+
} else o ? o(e, l[0], n) : e[l[0]] = n;
|
|
80
|
+
};
|
|
81
|
+
a(e);
|
|
82
|
+
})(e, t, n, de);
|
|
83
|
+
}
|
|
84
|
+
function Ce(e) {
|
|
85
|
+
const t = (0, ie.getCurrentInstance)();
|
|
86
|
+
return function(...n) {
|
|
87
|
+
return e(t, ...n);
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
function Se(e) {
|
|
91
|
+
const t = {
|
|
92
|
+
on: Ce(e?.emitterWithInstance.on || Re),
|
|
93
|
+
off: Ce(e?.emitterWithInstance.off || pe),
|
|
94
|
+
clear: Ce(e?.emitterWithInstance.clear || pe)
|
|
95
|
+
};
|
|
96
|
+
return (0, ie.onBeforeUnmount)(t.clear), t;
|
|
97
|
+
}
|
|
98
|
+
function Re() {
|
|
99
|
+
return pe;
|
|
100
|
+
}
|
|
101
|
+
var Fe = "2.7" === ie.version.slice(0, 3), He = "json-form-wrapper";
|
|
102
|
+
function Ae() {
|
|
103
|
+
return (0, ie.inject)(He);
|
|
104
|
+
}
|
|
105
|
+
function xe(e) {
|
|
106
|
+
const t = (0, ie.unref)(e), n = (0, ie.computed)(() => {
|
|
107
|
+
const { fields: t, field: n } = (0, ie.unref)(e), o = t || n, l = (t && t[0] || n).includes(".");
|
|
108
|
+
return {
|
|
109
|
+
field: o,
|
|
110
|
+
isFieldPath: l,
|
|
111
|
+
getValueFunc: l ? we : (e, t) => e[t],
|
|
112
|
+
setValueFunc: l ? je : (e, t, n) => de(e, t, n)
|
|
113
|
+
};
|
|
114
|
+
});
|
|
115
|
+
function o(t) {
|
|
116
|
+
const { fields: o } = (0, ie.unref)(e), { field: l, getValueFunc: a } = n.value;
|
|
117
|
+
return o ? o.map((e) => a(t, e)).filter(be) : a(t, l);
|
|
118
|
+
}
|
|
119
|
+
function l(t, o) {
|
|
120
|
+
const { fields: l } = (0, ie.unref)(e), { field: a, setValueFunc: r } = n.value;
|
|
121
|
+
return l ? l.forEach((e, n) => r(o, e, t?.[n])) : r(o, a, t), !0;
|
|
122
|
+
}
|
|
123
|
+
function a(t) {
|
|
124
|
+
const n = d.value;
|
|
125
|
+
let o;
|
|
126
|
+
const a = (me(t) || ye(t) && !t.length) && !me(o = u("defaultValue")) ? o : t;
|
|
127
|
+
return a === n ? (0, ie.unref)(e).defaultValueConflictCallback(a, d) : l(a, (0, ie.unref)(e).query), !0;
|
|
128
|
+
}
|
|
129
|
+
const r = [], i = Ae(), s = (0, ie.ref)({});
|
|
130
|
+
(0, ie.watch)(() => (0, ie.unref)(e).initialValue, (e) => s.value.initialValue = e, { immediate: !0 }), (0, ie.watch)(() => (0, ie.unref)(e).defaultValue, (e) => s.value.defaultValue = e, { immediate: !0 });
|
|
131
|
+
const u = (t) => {
|
|
132
|
+
const n = s.value[t], { query: o } = (0, ie.unref)(e);
|
|
133
|
+
return "function" == typeof n ? n({ query: o }) : n;
|
|
134
|
+
}, d = (0, ie.computed)({
|
|
135
|
+
get: function() {
|
|
136
|
+
return o((0, ie.unref)(e).query);
|
|
137
|
+
},
|
|
138
|
+
set: a
|
|
139
|
+
}), c = t.fields?.length ? (p = o(t.query)).length ? p : void 0 : o(t.query);
|
|
140
|
+
var p;
|
|
141
|
+
null == c && (void 0 !== t.defaultValue || void 0 !== t.initialValue) && a(u("initialValue"));
|
|
142
|
+
const f = (0, ie.ref)([]), y = (0, ie.ref)(!1), h = (0, ie.computed)(() => f.value.length ? f.value : (0, ie.unref)(e).options);
|
|
143
|
+
r.push((0, ie.watch)(h, (t) => i && (i.options[(0, ie.unref)(e).field] = t), { immediate: !0 }));
|
|
144
|
+
const b = {
|
|
145
|
+
get field() {
|
|
146
|
+
return (0, ie.unref)(e).field;
|
|
147
|
+
},
|
|
148
|
+
reset(e) {
|
|
149
|
+
const t = u("initialValue");
|
|
150
|
+
e ? l(void 0 === t ? u("defaultValue") : t, e) : d.value = t, g();
|
|
151
|
+
},
|
|
152
|
+
get validator() {
|
|
153
|
+
return (0, ie.unref)(e).validator;
|
|
154
|
+
},
|
|
155
|
+
onBackfillChange: (t, n, o) => {
|
|
156
|
+
o && (0, ie.unref)(e).hooks?.backfillChange?.(t, n, {
|
|
157
|
+
plain: V,
|
|
158
|
+
props: (0, ie.unref)(e)
|
|
159
|
+
});
|
|
160
|
+
},
|
|
161
|
+
onModelChange: (e, t) => {
|
|
162
|
+
g();
|
|
163
|
+
},
|
|
164
|
+
trySetDefaultValue(e) {
|
|
165
|
+
let t;
|
|
166
|
+
const n = o(e);
|
|
167
|
+
return !(!(me(n) || ye(n) && !n.length) || me(t = u("defaultValue"))) && (l(t, e), !0);
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
function m(e, t, n) {
|
|
171
|
+
if (!e.includes(".")) return void delete t[e];
|
|
172
|
+
if (!n) return;
|
|
173
|
+
const o = e.split(".");
|
|
174
|
+
we(t, o.slice(0, -1).join(".")) === n && delete n[o[o.length - 1]];
|
|
175
|
+
}
|
|
176
|
+
i?.register(b), (0, ie.onBeforeUnmount)(() => {
|
|
177
|
+
r.forEach((e) => e());
|
|
178
|
+
const { field: t } = n.value, { query: o, parentQuery: l } = (0, ie.unref)(e);
|
|
179
|
+
"string" == typeof t ? m(t, o, l) : t.forEach((e) => m(e, o, l));
|
|
180
|
+
});
|
|
181
|
+
const { flag: v, updateFlag: g } = function(e = !0) {
|
|
182
|
+
const t = (0, ie.ref)(e);
|
|
183
|
+
return {
|
|
184
|
+
flag: t,
|
|
185
|
+
updateFlag: () => {
|
|
186
|
+
t.value = !e, (0, ie.nextTick)(() => {
|
|
187
|
+
t.value = e;
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
}(!0);
|
|
192
|
+
async function k(t, n) {
|
|
193
|
+
const o = (0, ie.unref)(e);
|
|
194
|
+
if (!o.getOptions) return;
|
|
195
|
+
y.value = !0;
|
|
196
|
+
const l = o.getOptions((e) => {
|
|
197
|
+
n?.callback?.(e), f.value = e || [], y.value = !1;
|
|
198
|
+
}, o.query || {}, {
|
|
199
|
+
trigger: t,
|
|
200
|
+
...n,
|
|
201
|
+
options: (0, ie.toRaw)(i?.options) || {},
|
|
202
|
+
changeInitialValue(e) {
|
|
203
|
+
return s.value.initialValue = e, this;
|
|
204
|
+
},
|
|
205
|
+
changeDefaultValue(e) {
|
|
206
|
+
return s.value.defaultValue = e, this;
|
|
207
|
+
},
|
|
208
|
+
change(e, t) {
|
|
209
|
+
return t?.updateDefaultValue && (s.value.defaultValue = e), t?.updateInitialValue && (s.value.initialValue = e), g(), O(e), this;
|
|
210
|
+
},
|
|
211
|
+
search(e, t) {
|
|
212
|
+
return t?.updateDefaultValue && (s.value.defaultValue = e), t?.updateInitialValue && (s.value.initialValue = e), g(), O(e), !i?.realtime.value && i?.search(), this;
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
l && (await l, y.value = !1);
|
|
216
|
+
}
|
|
217
|
+
function O(e) {
|
|
218
|
+
d.value = e;
|
|
219
|
+
}
|
|
220
|
+
g(), r.push((0, ie.watch)(() => {
|
|
221
|
+
const t = (0, ie.unref)(e);
|
|
222
|
+
if (!t.depend) return [!1];
|
|
223
|
+
const n = t.dependFields;
|
|
224
|
+
if (!n?.length) return [!1];
|
|
225
|
+
const o = t.query, l = "string" == typeof n ? n : 1 === n.length ? n[0] : null;
|
|
226
|
+
return [
|
|
227
|
+
!0,
|
|
228
|
+
t.uniqueValue,
|
|
229
|
+
l ? we(o, l) : n.map((e) => we(o, e)),
|
|
230
|
+
l || n
|
|
231
|
+
];
|
|
232
|
+
}, ([t, n, o, l], a) => {
|
|
233
|
+
const [r, i, s] = a || [];
|
|
234
|
+
if (n !== i) return;
|
|
235
|
+
if (!t) return;
|
|
236
|
+
const u = (0, ie.unref)(e);
|
|
237
|
+
("string" == typeof l ? o === s : o.every((e, t) => e === s[t])) || (v.value && ("boolean" == typeof u.resetByDependValueChange ? u.resetByDependValueChange : u.resetByDependValueChange(u.query)) && O(void 0), (0, ie.nextTick)(k.bind(null, "depend")), u.hooks?.dependChange?.({
|
|
238
|
+
plain: V,
|
|
239
|
+
props: u
|
|
240
|
+
}));
|
|
241
|
+
}, t.dependWatchOption)), r.push((0, ie.watch)(() => {
|
|
242
|
+
const t = (0, ie.unref)(e);
|
|
243
|
+
if (!t.optionsDepend || !i) return [!1, t.uniqueValue];
|
|
244
|
+
let n = t.optionsDependFields || t.dependFields;
|
|
245
|
+
return "object" == typeof n && 1 === n.length && (n = n[0]), n?.length ? [
|
|
246
|
+
!0,
|
|
247
|
+
t.uniqueValue,
|
|
248
|
+
"string" == typeof n ? i.options[n] : n.map((e) => i.options[e]),
|
|
249
|
+
n
|
|
250
|
+
] : [!1, t.uniqueValue];
|
|
251
|
+
}, ([n, o, l, a], [r, i, s]) => {
|
|
252
|
+
o === i && n && ("string" == typeof a && l === s || l.length === s?.length && l.every((e, t) => e === s[t]) || ((0, ie.nextTick)(k.bind(null, "depend")), t.hooks?.optionsDependChange?.({
|
|
253
|
+
plain: V,
|
|
254
|
+
props: (0, ie.unref)(e)
|
|
255
|
+
})));
|
|
256
|
+
})), r.push((0, ie.watch)(() => (0, ie.unref)(e).getOptions, async () => k("initial"))), (0, ie.nextTick)(k.bind(null, "initial"));
|
|
257
|
+
const P = Se(i), V = {
|
|
258
|
+
coverProps: s,
|
|
259
|
+
wrapper: i,
|
|
260
|
+
option: b,
|
|
261
|
+
loading: y,
|
|
262
|
+
getOptions: k,
|
|
263
|
+
checked: d,
|
|
264
|
+
remoteOption: f,
|
|
265
|
+
finalOption: h,
|
|
266
|
+
change: O,
|
|
267
|
+
search: i?.search || pe,
|
|
268
|
+
reset: b.reset,
|
|
269
|
+
globalReadonly: i?.readonly || (0, ie.ref)(!1),
|
|
270
|
+
globalDisabled: i?.disabled || (0, ie.ref)(!1),
|
|
271
|
+
...P
|
|
272
|
+
};
|
|
273
|
+
return t.hooks?.created?.({
|
|
274
|
+
plain: V,
|
|
275
|
+
props: (0, ie.unref)(e),
|
|
276
|
+
wrapper: i,
|
|
277
|
+
...P
|
|
278
|
+
}), V;
|
|
279
|
+
}
|
|
280
|
+
var _e = {
|
|
281
|
+
field: {
|
|
282
|
+
type: String,
|
|
283
|
+
required: !0
|
|
284
|
+
},
|
|
285
|
+
fields: { type: [Array] },
|
|
286
|
+
query: {
|
|
287
|
+
type: Object,
|
|
288
|
+
required: !0
|
|
289
|
+
},
|
|
290
|
+
parentQuery: { type: Object },
|
|
291
|
+
depend: {
|
|
292
|
+
type: Boolean,
|
|
293
|
+
default: void 0
|
|
294
|
+
},
|
|
295
|
+
resetByDependValueChange: {
|
|
296
|
+
type: [Boolean, Function],
|
|
297
|
+
default: !0
|
|
298
|
+
},
|
|
299
|
+
dependFields: { type: [String, Array] },
|
|
300
|
+
dependWatchOption: { type: [Object] },
|
|
301
|
+
optionsDepend: { type: Boolean },
|
|
302
|
+
optionsDependFields: { type: [String, Array] },
|
|
303
|
+
validator: { type: [Function] },
|
|
304
|
+
initialValue: {
|
|
305
|
+
type: [
|
|
306
|
+
String,
|
|
307
|
+
Number,
|
|
308
|
+
Boolean,
|
|
309
|
+
Function,
|
|
310
|
+
Array,
|
|
311
|
+
Object
|
|
312
|
+
],
|
|
313
|
+
default: void 0
|
|
314
|
+
},
|
|
315
|
+
defaultValue: {
|
|
316
|
+
type: [
|
|
317
|
+
String,
|
|
318
|
+
Number,
|
|
319
|
+
Boolean,
|
|
320
|
+
Function,
|
|
321
|
+
Array,
|
|
322
|
+
Object
|
|
323
|
+
],
|
|
324
|
+
default: void 0
|
|
325
|
+
},
|
|
326
|
+
defaultValueConflictCallback: {
|
|
327
|
+
type: Function,
|
|
328
|
+
default: pe
|
|
329
|
+
},
|
|
330
|
+
options: {
|
|
331
|
+
type: Array,
|
|
332
|
+
default: () => []
|
|
333
|
+
},
|
|
334
|
+
getOptions: { type: Function },
|
|
335
|
+
uniqueValue: { type: [String, Number] },
|
|
336
|
+
hooks: {
|
|
337
|
+
type: [Object],
|
|
338
|
+
default: void 0
|
|
339
|
+
}
|
|
340
|
+
};
|
|
341
|
+
function Ie(e, t) {
|
|
342
|
+
const n = t?.modelField || "model", o = function() {
|
|
343
|
+
let e = {};
|
|
344
|
+
function t(t, n, o) {
|
|
345
|
+
e[n] && (o ? e[n] = e[n].filter(([e, n]) => e !== t && n !== o) : t ? e[n] = e[n].filter(([e]) => e !== t) : delete e[n]);
|
|
346
|
+
}
|
|
347
|
+
function n(n) {
|
|
348
|
+
n ? Object.keys(e).forEach((e) => t(n, e)) : e = {};
|
|
349
|
+
}
|
|
350
|
+
return (0, ie.onBeforeUnmount)(n), {
|
|
351
|
+
on: function(n, o, l) {
|
|
352
|
+
return e[o] || (e[o] = []), e[o].push([n, l]), () => t(n, o, l);
|
|
353
|
+
},
|
|
354
|
+
off: t,
|
|
355
|
+
emit: function(t, ...n) {
|
|
356
|
+
return e[t]?.map(([e, t]) => t(...n)) || [];
|
|
357
|
+
},
|
|
358
|
+
clear: n
|
|
359
|
+
};
|
|
360
|
+
}(), l = Se({ emitterWithInstance: o }), a = [];
|
|
361
|
+
(0, ie.onBeforeUnmount)(() => a.splice(0));
|
|
362
|
+
const r = /* @__PURE__ */ new Set(), i = (0, ie.reactive)({}), s = {
|
|
363
|
+
readonly: (0, ie.toRef)(e, "readonly", !1),
|
|
364
|
+
disabled: (0, ie.toRef)(e, "disabled", !1),
|
|
365
|
+
realtime: (0, ie.toRef)(e, "realtime", !1),
|
|
366
|
+
formRef: t?.formRef,
|
|
367
|
+
reset: b,
|
|
368
|
+
register(e) {
|
|
369
|
+
e.field && r.add(e.field), a.push(e);
|
|
370
|
+
const t = () => {
|
|
371
|
+
e.field && r.delete(e.field);
|
|
372
|
+
const t = a.indexOf(e);
|
|
373
|
+
-1 !== t && a.splice(t, 1);
|
|
374
|
+
}, n = (0, ie.getCurrentInstance)();
|
|
375
|
+
return n && (0, ie.onBeforeUnmount)(t, Fe ? n.proxy : n), t;
|
|
376
|
+
},
|
|
377
|
+
beforeUpdateQueryValue() {
|
|
378
|
+
d = !1;
|
|
379
|
+
},
|
|
380
|
+
afterUpdateQueryValue() {
|
|
381
|
+
(0, ie.nextTick)(() => {
|
|
382
|
+
d = !0;
|
|
383
|
+
});
|
|
384
|
+
},
|
|
385
|
+
search: h,
|
|
386
|
+
options: i,
|
|
387
|
+
emitterWithInstance: o,
|
|
388
|
+
emitter: l
|
|
389
|
+
};
|
|
390
|
+
(0, ie.provide)(He, s);
|
|
391
|
+
const u = (0, ie.ref)(e[n] || { ...e.backfill });
|
|
392
|
+
let d = !0;
|
|
393
|
+
(0, ie.onMounted)(() => {
|
|
394
|
+
(0, ie.watch)(() => e.realtime && !e[n] && { ...u.value }, (e) => {
|
|
395
|
+
e && d && s.search();
|
|
396
|
+
});
|
|
397
|
+
});
|
|
398
|
+
const c = () => ({ ...p = { ...u.value } });
|
|
399
|
+
let p = null, f = {};
|
|
400
|
+
(0, ie.watch)(() => {
|
|
401
|
+
const { backfill: t } = e;
|
|
402
|
+
if (!t) return [f = {}, !1];
|
|
403
|
+
const n = Object.entries(t);
|
|
404
|
+
let o = !!f && Object.keys(f).length === n.length && !!n.length, l = !!p && Object.keys(p).length === n.length;
|
|
405
|
+
return [
|
|
406
|
+
f = n.reduce((e, [t, n]) => (e[t] = n, o &&= e[t] === f[t], l &&= e[t] === p[t], e), {}),
|
|
407
|
+
o || l,
|
|
408
|
+
p = null
|
|
409
|
+
];
|
|
410
|
+
}, ([n, o], [l]) => {
|
|
411
|
+
if (o) return;
|
|
412
|
+
const r = Object.keys(n), i = Object.keys(u.value);
|
|
413
|
+
let d = i.length === r.length;
|
|
414
|
+
if (i.forEach((e) => {
|
|
415
|
+
var t, o;
|
|
416
|
+
d &&= u.value[e] === n[e], t = n, o = e, (Object.hasOwn ? Object.hasOwn(t, o) : t.hasOwnProperty(o)) || delete u.value[e];
|
|
417
|
+
}), !r.length) return b();
|
|
418
|
+
if (d) return;
|
|
419
|
+
const c = {};
|
|
420
|
+
let p = !1;
|
|
421
|
+
r.forEach((e) => {
|
|
422
|
+
n[e] !== u.value[e] && (c[e] = n[e], p = !0);
|
|
423
|
+
}), p && Object.assign(u.value, c);
|
|
424
|
+
let f, y = !1;
|
|
425
|
+
a.forEach((e) => {
|
|
426
|
+
e.onBackfillChange?.(n, l, p), f = e.trySetDefaultValue(u.value), y ||= f;
|
|
427
|
+
}), p && (e.onBackfillChange || t?.onBackfillChange) && Ne(e.onBackfillChange || t.onBackfillChange, n, l, g), y || (s.beforeUpdateQueryValue(), s.afterUpdateQueryValue());
|
|
428
|
+
}), (0, ie.watch)(() => e[n], (e, t) => {
|
|
429
|
+
if (e) {
|
|
430
|
+
if (u.value = e, !Object.keys(e).length) return b(u.value);
|
|
431
|
+
a.forEach((n) => {
|
|
432
|
+
n.onModelChange?.(e, t), n.trySetDefaultValue(u.value);
|
|
433
|
+
});
|
|
434
|
+
}
|
|
435
|
+
}), (0, ie.watch)([() => e.shallowWatchModel && e[n] && { ...e[n] }, () => e.shallowWatchModel && e[n]], ([e, t], [n, o]) => {
|
|
436
|
+
if (!e || !n || t !== o) return;
|
|
437
|
+
let l = 0, i = 0;
|
|
438
|
+
Object.keys(e).forEach((t) => {
|
|
439
|
+
e[t] !== n[t] && (r.has(t) ? ++l : i || (i = ++l));
|
|
440
|
+
}), l > 1 && a.forEach((t) => t.onModelChange?.(e, n));
|
|
441
|
+
});
|
|
442
|
+
let y = 0;
|
|
443
|
+
async function h() {
|
|
444
|
+
const n = ++y, o = m(), l = await ("function" == typeof o?.then ? o : Promise.resolve(o));
|
|
445
|
+
n === y && (l ? e.toast?.(l) : (e.onSearch || t?.onSearch) && Ne(e.onSearch || t.onSearch, c()));
|
|
446
|
+
}
|
|
447
|
+
function b(e) {
|
|
448
|
+
const t = o.emit("reset");
|
|
449
|
+
a.forEach((t, n, o) => o[o.length - 1 - n].reset(e)), t.forEach((e) => "function" == typeof e && e());
|
|
450
|
+
}
|
|
451
|
+
function m() {
|
|
452
|
+
let e, t = !1, n = a.map((n) => (e = n.validator?.(u.value), t || (t = "function" == typeof e?.then), e));
|
|
453
|
+
return t ? Promise.all(n).then(v) : v(n);
|
|
454
|
+
}
|
|
455
|
+
function v(t) {
|
|
456
|
+
return t.find((e) => e && "string" == typeof e) || e.validator?.(u.value);
|
|
457
|
+
}
|
|
458
|
+
const g = {
|
|
459
|
+
child: a,
|
|
460
|
+
wrapperInstance: s,
|
|
461
|
+
query: u,
|
|
462
|
+
getQuery: c,
|
|
463
|
+
search: h,
|
|
464
|
+
reset: b,
|
|
465
|
+
validateToast: m
|
|
466
|
+
};
|
|
467
|
+
return g;
|
|
468
|
+
}
|
|
469
|
+
function Ne(e, ...t) {
|
|
470
|
+
if (e) return "function" == typeof e ? e(...t) : e.forEach((e) => e(...t));
|
|
471
|
+
}
|
|
472
|
+
var qe = {
|
|
473
|
+
realtime: {
|
|
474
|
+
type: Boolean,
|
|
475
|
+
default: void 0
|
|
476
|
+
},
|
|
477
|
+
backfill: { type: Object },
|
|
478
|
+
onBackfillChange: { type: [Function, Array] },
|
|
479
|
+
model: { type: Object },
|
|
480
|
+
shallowWatchModel: {
|
|
481
|
+
type: Boolean,
|
|
482
|
+
default: void 0
|
|
483
|
+
},
|
|
484
|
+
validator: {
|
|
485
|
+
type: Function,
|
|
486
|
+
default: void 0
|
|
487
|
+
},
|
|
488
|
+
toast: {
|
|
489
|
+
type: Function,
|
|
490
|
+
default: void 0
|
|
491
|
+
},
|
|
492
|
+
readonly: {
|
|
493
|
+
type: Boolean,
|
|
494
|
+
default: void 0
|
|
495
|
+
},
|
|
496
|
+
disabled: {
|
|
497
|
+
type: Boolean,
|
|
498
|
+
default: void 0
|
|
499
|
+
},
|
|
500
|
+
onSearch: { type: [Function, Array] }
|
|
501
|
+
}, De = /-\w/g;
|
|
502
|
+
var Te = "0.2.8";
|
|
503
|
+
function Ue(e, t, o) {
|
|
504
|
+
return { slotProps: n(() => ({
|
|
505
|
+
props: e,
|
|
506
|
+
plain: o
|
|
507
|
+
})) };
|
|
508
|
+
}
|
|
509
|
+
function Be() {
|
|
510
|
+
return {
|
|
511
|
+
disabled: {
|
|
512
|
+
type: Boolean,
|
|
513
|
+
default: void 0
|
|
514
|
+
},
|
|
515
|
+
readonly: {
|
|
516
|
+
type: Boolean,
|
|
517
|
+
default: void 0
|
|
518
|
+
},
|
|
519
|
+
hide: {
|
|
520
|
+
type: Boolean,
|
|
521
|
+
default: void 0
|
|
522
|
+
},
|
|
523
|
+
slots: { type: Object }
|
|
524
|
+
};
|
|
525
|
+
}
|
|
526
|
+
q.props;
|
|
527
|
+
var $e = Be();
|
|
528
|
+
function Ee() {
|
|
529
|
+
return {
|
|
530
|
+
...$e,
|
|
531
|
+
..._e,
|
|
532
|
+
options: { type: [Object, Array] },
|
|
533
|
+
areaProps: { type: Object },
|
|
534
|
+
areaOn: {
|
|
535
|
+
type: Object,
|
|
536
|
+
default: () => ({})
|
|
537
|
+
},
|
|
538
|
+
areaSlots: { type: Object },
|
|
539
|
+
isLink: {
|
|
540
|
+
type: Boolean,
|
|
541
|
+
default: !0
|
|
542
|
+
},
|
|
543
|
+
onRowClick: { type: Function },
|
|
544
|
+
separator: {
|
|
545
|
+
type: String,
|
|
546
|
+
default: "/"
|
|
547
|
+
},
|
|
548
|
+
showAllLevels: {
|
|
549
|
+
type: Boolean,
|
|
550
|
+
default: !0
|
|
551
|
+
},
|
|
552
|
+
format: { type: Function },
|
|
553
|
+
valueTrigger: {
|
|
554
|
+
type: String,
|
|
555
|
+
default: "confirm"
|
|
556
|
+
},
|
|
557
|
+
popupProps: { type: Object },
|
|
558
|
+
popupOn: {
|
|
559
|
+
type: Object,
|
|
560
|
+
default: () => ({})
|
|
561
|
+
}
|
|
562
|
+
};
|
|
563
|
+
}
|
|
564
|
+
var Ge = Ee(), Ke = {
|
|
565
|
+
...q.props,
|
|
566
|
+
...Ge
|
|
567
|
+
};
|
|
568
|
+
function Le() {
|
|
569
|
+
return {};
|
|
570
|
+
}
|
|
571
|
+
var Me = {}, We = {
|
|
572
|
+
...q.emits,
|
|
573
|
+
...Me
|
|
574
|
+
}, Qe = (e, t) => {
|
|
575
|
+
const n = e.__vccOpts || e;
|
|
576
|
+
for (const [e, o] of t) n[e] = o;
|
|
577
|
+
return n;
|
|
578
|
+
};
|
|
579
|
+
var Ye = Qe(u({
|
|
580
|
+
name: "HArea",
|
|
581
|
+
components: {
|
|
582
|
+
VanArea: H,
|
|
583
|
+
VanField: q,
|
|
584
|
+
VanPopup: E
|
|
585
|
+
},
|
|
586
|
+
inheritAttrs: !1,
|
|
587
|
+
props: Ge,
|
|
588
|
+
emits: Me,
|
|
589
|
+
slots: Object,
|
|
590
|
+
setup(e, t) {
|
|
591
|
+
const o = xe(e), { slotProps: l } = Ue(e, 0, o), a = n(() => {
|
|
592
|
+
const t = o.checked.value;
|
|
593
|
+
if (!t) return "";
|
|
594
|
+
const { format: n, showAllLevels: l, separator: a } = e, r = e.areaProps?.areaList || o.finalOption.value;
|
|
595
|
+
if (n) return n({
|
|
596
|
+
source: r,
|
|
597
|
+
value: t,
|
|
598
|
+
showAllLevels: l,
|
|
599
|
+
separator: a
|
|
600
|
+
});
|
|
601
|
+
const i = [];
|
|
602
|
+
return r.province_list && i.push(r.province_list[`${t.slice(0, 2)}0000`]), t.length >= 4 && r.city_list && i.push(r.city_list[`${t.slice(0, 4)}00`]), t.length >= 6 && r.county_list && i.push(r.county_list[t]), i.filter(Boolean).join(a);
|
|
603
|
+
});
|
|
604
|
+
function r(t, n) {
|
|
605
|
+
switch ((e.valueTrigger === t || !1 === e.areaProps?.showToolbar) && o.change(n.selectedValues.slice(-1)[0]), t) {
|
|
606
|
+
case "confirm":
|
|
607
|
+
case "cancel": i.value.close();
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
const i = v({
|
|
611
|
+
visible: !1,
|
|
612
|
+
open() {
|
|
613
|
+
i.value.visible = !0;
|
|
614
|
+
},
|
|
615
|
+
close() {
|
|
616
|
+
i.value.visible = !1;
|
|
617
|
+
}
|
|
618
|
+
});
|
|
619
|
+
return {
|
|
620
|
+
hyphenate: ke,
|
|
621
|
+
getNode: ve,
|
|
622
|
+
...o,
|
|
623
|
+
slotProps: l,
|
|
624
|
+
showText: a,
|
|
625
|
+
clickHandle: function(t) {
|
|
626
|
+
o.globalDisabled.value || e.disabled || o.globalReadonly.value || e.readonly || (e.onRowClick ? e.onRowClick(i.value, t) : i.value.open());
|
|
627
|
+
},
|
|
628
|
+
changeHandle: r.bind(null, "change"),
|
|
629
|
+
confirmHandle: r.bind(null, "confirm"),
|
|
630
|
+
cancelHandle: r.bind(null, "cancel"),
|
|
631
|
+
popupInfo: i
|
|
632
|
+
};
|
|
633
|
+
}
|
|
634
|
+
}), [["render", function(e, t, n, a, i, u) {
|
|
635
|
+
const d = O("VanArea"), c = O("VanPopup"), f = O("VanField");
|
|
636
|
+
return e.hide ? l("", !0) : (m(), o(f, p({
|
|
637
|
+
key: 0,
|
|
638
|
+
name: e.field,
|
|
639
|
+
disabled: e.globalDisabled || e.disabled,
|
|
640
|
+
readonly: !0,
|
|
641
|
+
"is-link": e.isLink,
|
|
642
|
+
"model-value": e.showText
|
|
643
|
+
}, e.$attrs, { onClick: e.clickHandle }), r({
|
|
644
|
+
extra: S(() => [s(c, p({
|
|
645
|
+
show: e.popupInfo.visible,
|
|
646
|
+
"onUpdate:show": t[0] || (t[0] = (t) => e.popupInfo.visible = t),
|
|
647
|
+
teleport: "body",
|
|
648
|
+
round: "",
|
|
649
|
+
position: "bottom"
|
|
650
|
+
}, e.popupProps, w(e.popupOn), { onClose: e.popupInfo.close }), {
|
|
651
|
+
default: S(() => [s(d, p({
|
|
652
|
+
"model-value": e.checked,
|
|
653
|
+
"area-list": e.finalOption
|
|
654
|
+
}, e.areaProps, w(e.areaOn), {
|
|
655
|
+
onChange: e.changeHandle,
|
|
656
|
+
onConfirm: e.confirmHandle,
|
|
657
|
+
onCancel: e.cancelHandle
|
|
658
|
+
}), r({ _: 2 }, [g(e.areaSlots, (t, n) => ({
|
|
659
|
+
name: e.hyphenate(n),
|
|
660
|
+
fn: S((n) => [(m(), o(P(e.getNode(t)), p(e.slotProps, n), null, 16))])
|
|
661
|
+
}))]), 1040, [
|
|
662
|
+
"model-value",
|
|
663
|
+
"area-list",
|
|
664
|
+
"onChange",
|
|
665
|
+
"onConfirm",
|
|
666
|
+
"onCancel"
|
|
667
|
+
])]),
|
|
668
|
+
_: 1
|
|
669
|
+
}, 16, ["show", "onClose"])]),
|
|
670
|
+
_: 2
|
|
671
|
+
}, [g(e.slots, (t, n) => ({
|
|
672
|
+
name: e.hyphenate(n),
|
|
673
|
+
fn: S((n) => [(m(), o(P(e.getNode(t)), p(e.slotProps, n), null, 16))])
|
|
674
|
+
}))]), 1040, [
|
|
675
|
+
"name",
|
|
676
|
+
"disabled",
|
|
677
|
+
"is-link",
|
|
678
|
+
"model-value",
|
|
679
|
+
"onClick"
|
|
680
|
+
]));
|
|
681
|
+
}]]), ze = {
|
|
682
|
+
t: { type: String },
|
|
683
|
+
rules: { type: [Array, Object] },
|
|
684
|
+
name: { type: [String] },
|
|
685
|
+
type: { type: String },
|
|
686
|
+
rows: { type: [Number, String] },
|
|
687
|
+
disabled: { type: [Boolean] },
|
|
688
|
+
readonly: { type: [Boolean] },
|
|
689
|
+
label: { type: [String] }
|
|
690
|
+
}, Je = {};
|
|
691
|
+
var Xe = Qe(u({
|
|
692
|
+
name: "HInputSlot",
|
|
693
|
+
components: {},
|
|
694
|
+
inheritAttrs: !1,
|
|
695
|
+
props: ze,
|
|
696
|
+
emits: Je,
|
|
697
|
+
setup(e, t) {
|
|
698
|
+
const o = v(), l = n(() => {
|
|
699
|
+
const { rows: n, label: o, disabled: l, readonly: a } = e;
|
|
700
|
+
return {
|
|
701
|
+
...t.attrs,
|
|
702
|
+
rows: void 0 !== n ? +n : void 0,
|
|
703
|
+
"aria-labelledby": o ? "-label" : void 0,
|
|
704
|
+
"data-allow-mismatch": "attribute",
|
|
705
|
+
class: "van-field__control",
|
|
706
|
+
disabled: l,
|
|
707
|
+
readonly: a
|
|
708
|
+
};
|
|
709
|
+
});
|
|
710
|
+
const a = () => {
|
|
711
|
+
const t = o.value;
|
|
712
|
+
"textarea" === e.type && e.autosize && t && function(e, t) {
|
|
713
|
+
const n = s();
|
|
714
|
+
e.style.height = "auto";
|
|
715
|
+
let o = e.scrollHeight;
|
|
716
|
+
if (l = t, null !== l && "object" == typeof l) {
|
|
717
|
+
const { maxHeight: e, minHeight: n } = t;
|
|
718
|
+
void 0 !== e && (o = Math.min(o, e)), void 0 !== n && (o = Math.max(o, n));
|
|
719
|
+
}
|
|
720
|
+
var l;
|
|
721
|
+
o && (e.style.height = `${o}px`, u(n));
|
|
722
|
+
}(t, e.autosize);
|
|
723
|
+
};
|
|
724
|
+
const r = !!("undefined" != typeof window) && /ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase());
|
|
725
|
+
function i(e, t) {
|
|
726
|
+
"scrollTop" in e ? e.scrollTop = t : e.scrollTo(e.scrollX, t);
|
|
727
|
+
}
|
|
728
|
+
function s() {
|
|
729
|
+
return window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
|
|
730
|
+
}
|
|
731
|
+
function u(e) {
|
|
732
|
+
i(window, e), i(document.body, e);
|
|
733
|
+
}
|
|
734
|
+
return {
|
|
735
|
+
inputRef: o,
|
|
736
|
+
inputAttrs: l,
|
|
737
|
+
focusHandle: function(t) {
|
|
738
|
+
f(a), e.readonly && o.value?.blur();
|
|
739
|
+
},
|
|
740
|
+
blurHandle: function() {
|
|
741
|
+
e.readonly || (f(a), r && u(s()));
|
|
742
|
+
},
|
|
743
|
+
keypressHandle: function(e) {}
|
|
744
|
+
};
|
|
745
|
+
}
|
|
746
|
+
}), [["render", function(e, t, n, o, l, r) {
|
|
747
|
+
return "textarea" === e.type ? (m(), a("textarea", p({
|
|
748
|
+
key: 0,
|
|
749
|
+
ref: "inputRef"
|
|
750
|
+
}, e.inputAttrs, {
|
|
751
|
+
onFocus: t[0] || (t[0] = (...t) => e.focusHandle && e.focusHandle(...t)),
|
|
752
|
+
onBlur: t[1] || (t[1] = (...t) => e.blurHandle && e.blurHandle(...t)),
|
|
753
|
+
onKeypress: t[2] || (t[2] = (...t) => e.keypressHandle && e.keypressHandle(...t))
|
|
754
|
+
}), null, 16)) : (m(), a("input", p({
|
|
755
|
+
key: 1,
|
|
756
|
+
ref: "inputRef"
|
|
757
|
+
}, e.inputAttrs, {
|
|
758
|
+
onFocus: t[3] || (t[3] = (...t) => e.focusHandle && e.focusHandle(...t)),
|
|
759
|
+
onBlur: t[4] || (t[4] = (...t) => e.blurHandle && e.blurHandle(...t)),
|
|
760
|
+
onKeypress: t[5] || (t[5] = (...t) => e.keypressHandle && e.keypressHandle(...t))
|
|
761
|
+
}), null, 16));
|
|
762
|
+
}]]);
|
|
763
|
+
function Ze(e, t, n = "children") {
|
|
764
|
+
const o = [];
|
|
765
|
+
return et(e, t, (e) => {
|
|
766
|
+
o.unshift(e);
|
|
767
|
+
}, n), o;
|
|
768
|
+
}
|
|
769
|
+
function et(e, t, n, o = "children") {
|
|
770
|
+
const l = Object.entries(t);
|
|
771
|
+
for (const a of e) {
|
|
772
|
+
if (l.every(([e, t]) => t === a[e])) return n(a, !0), !0;
|
|
773
|
+
if (a[o] && a[o].length && et(a[o], t, n, o)) return n(a), !0;
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
function tt() {
|
|
777
|
+
return {
|
|
778
|
+
...$e,
|
|
779
|
+
..._e,
|
|
780
|
+
label: { type: String },
|
|
781
|
+
placeholder: { type: String },
|
|
782
|
+
isLink: {
|
|
783
|
+
type: Boolean,
|
|
784
|
+
default: !0
|
|
785
|
+
},
|
|
786
|
+
checkStrictly: {
|
|
787
|
+
type: Boolean,
|
|
788
|
+
default: void 0
|
|
789
|
+
},
|
|
790
|
+
showAllLevels: {
|
|
791
|
+
type: Boolean,
|
|
792
|
+
default: void 0
|
|
793
|
+
},
|
|
794
|
+
emitPath: {
|
|
795
|
+
type: Boolean,
|
|
796
|
+
default: void 0
|
|
797
|
+
},
|
|
798
|
+
onRowClick: { type: Function },
|
|
799
|
+
cascaderProps: {
|
|
800
|
+
type: Object,
|
|
801
|
+
default: () => ({})
|
|
802
|
+
},
|
|
803
|
+
cascaderOn: {
|
|
804
|
+
type: Object,
|
|
805
|
+
default: () => ({})
|
|
806
|
+
},
|
|
807
|
+
cascaderSlots: { type: Object },
|
|
808
|
+
popupProps: { type: Object },
|
|
809
|
+
popupOn: {
|
|
810
|
+
type: Object,
|
|
811
|
+
default: () => ({})
|
|
812
|
+
}
|
|
813
|
+
};
|
|
814
|
+
}
|
|
815
|
+
var nt = tt(), ot = {
|
|
816
|
+
...q.props,
|
|
817
|
+
...nt
|
|
818
|
+
};
|
|
819
|
+
function lt() {
|
|
820
|
+
return {};
|
|
821
|
+
}
|
|
822
|
+
var at = {}, rt = {
|
|
823
|
+
...q.emits,
|
|
824
|
+
...at
|
|
825
|
+
};
|
|
826
|
+
var it = Qe(u({
|
|
827
|
+
name: "HCascader",
|
|
828
|
+
components: {
|
|
829
|
+
VanCascader: A,
|
|
830
|
+
VanField: q,
|
|
831
|
+
VanPopup: E,
|
|
832
|
+
HInputSlot: Xe
|
|
833
|
+
},
|
|
834
|
+
inheritAttrs: !1,
|
|
835
|
+
props: nt,
|
|
836
|
+
emits: at,
|
|
837
|
+
slots: Object,
|
|
838
|
+
setup(e, t) {
|
|
839
|
+
const o = xe(e), l = n(() => {
|
|
840
|
+
const e = o.checked.value;
|
|
841
|
+
return Array.isArray(e) ? e[e.length - 1] : e;
|
|
842
|
+
}), a = n(() => {
|
|
843
|
+
const t = l.value, n = o.finalOption.value;
|
|
844
|
+
if (!t || !n.length) return "";
|
|
845
|
+
const { labelKey: a, valueKey: r, children: s } = i.value, u = Ze(n, { [r]: t }, s);
|
|
846
|
+
return u.length ? e.showAllLevels ? u.map((e) => e[a]).join("/") : u[u.length - 1][a] : "";
|
|
847
|
+
}), { slotProps: r } = Ue(e, 0, o), i = n(() => {
|
|
848
|
+
const t = e.cascaderProps?.fieldNames || {};
|
|
849
|
+
return {
|
|
850
|
+
labelKey: t.text || "text",
|
|
851
|
+
valueKey: t.value || "value",
|
|
852
|
+
children: t.children || "children"
|
|
853
|
+
};
|
|
854
|
+
});
|
|
855
|
+
function s(t) {
|
|
856
|
+
const { valueKey: n } = i.value;
|
|
857
|
+
e.emitPath ? o.change(t.selectedOptions.map((e) => e[n])) : o.change(t.value);
|
|
858
|
+
}
|
|
859
|
+
const u = v({
|
|
860
|
+
visible: !1,
|
|
861
|
+
open() {
|
|
862
|
+
u.value.visible = !0;
|
|
863
|
+
},
|
|
864
|
+
close() {
|
|
865
|
+
u.value.visible = !1;
|
|
866
|
+
}
|
|
867
|
+
});
|
|
868
|
+
return {
|
|
869
|
+
hyphenate: ke,
|
|
870
|
+
getNode: ve,
|
|
871
|
+
...o,
|
|
872
|
+
slotProps: r,
|
|
873
|
+
fieldInfo: i,
|
|
874
|
+
lastCheckedValue: l,
|
|
875
|
+
showText: a,
|
|
876
|
+
clickHandle: function(t) {
|
|
877
|
+
o.globalDisabled.value || e.disabled || o.globalReadonly.value || e.readonly || (e.onRowClick ? e.onRowClick(u.value, t) : u.value.open());
|
|
878
|
+
},
|
|
879
|
+
change: function(t) {
|
|
880
|
+
e.checkStrictly && s(t);
|
|
881
|
+
},
|
|
882
|
+
finish: function(t) {
|
|
883
|
+
e.checkStrictly || s(t);
|
|
884
|
+
},
|
|
885
|
+
setValue: s,
|
|
886
|
+
popupInfo: u
|
|
887
|
+
};
|
|
888
|
+
}
|
|
889
|
+
}), [["render", function(e, t, n, a, i, u) {
|
|
890
|
+
const d = O("HInputSlot"), c = O("VanCascader"), f = O("VanPopup"), y = O("VanField");
|
|
891
|
+
return e.hide ? l("", !0) : (m(), o(y, p({
|
|
892
|
+
key: 0,
|
|
893
|
+
name: e.field,
|
|
894
|
+
label: e.label,
|
|
895
|
+
disabled: e.globalDisabled || e.disabled,
|
|
896
|
+
readonly: !0,
|
|
897
|
+
placeholder: e.placeholder,
|
|
898
|
+
"model-value": e.lastCheckedValue,
|
|
899
|
+
"is-link": e.isLink
|
|
900
|
+
}, e.$attrs, { onClick: e.clickHandle }), r({
|
|
901
|
+
input: S(() => [s(d, p({
|
|
902
|
+
value: e.showText,
|
|
903
|
+
placeholder: e.placeholder,
|
|
904
|
+
disabled: e.globalDisabled || e.disabled,
|
|
905
|
+
readonly: e.globalReadonly || e.readonly
|
|
906
|
+
}, e.$attrs), null, 16, [
|
|
907
|
+
"value",
|
|
908
|
+
"placeholder",
|
|
909
|
+
"disabled",
|
|
910
|
+
"readonly"
|
|
911
|
+
])]),
|
|
912
|
+
extra: S(() => [s(f, p({
|
|
913
|
+
show: e.popupInfo.visible,
|
|
914
|
+
"onUpdate:show": t[0] || (t[0] = (t) => e.popupInfo.visible = t),
|
|
915
|
+
teleport: "body",
|
|
916
|
+
round: "",
|
|
917
|
+
position: "bottom"
|
|
918
|
+
}, e.popupProps, w(e.popupOn), { onClose: e.popupInfo.close }), {
|
|
919
|
+
default: S(() => [s(c, p({
|
|
920
|
+
title: e.cascaderProps.title || e.label,
|
|
921
|
+
placeholder: e.cascaderProps.placeholder || e.placeholder,
|
|
922
|
+
"model-value": e.lastCheckedValue,
|
|
923
|
+
options: e.finalOption
|
|
924
|
+
}, e.cascaderProps, w(e.cascaderOn), {
|
|
925
|
+
onChange: e.change,
|
|
926
|
+
onFinish: e.finish,
|
|
927
|
+
onClose: e.popupInfo.close
|
|
928
|
+
}), r({ _: 2 }, [g(e.cascaderSlots, (t, n) => ({
|
|
929
|
+
name: e.hyphenate(n),
|
|
930
|
+
fn: S((n) => [(m(), o(P(e.getNode(t)), p(e.slotProps, n), null, 16))])
|
|
931
|
+
}))]), 1040, [
|
|
932
|
+
"title",
|
|
933
|
+
"placeholder",
|
|
934
|
+
"model-value",
|
|
935
|
+
"options",
|
|
936
|
+
"onChange",
|
|
937
|
+
"onFinish",
|
|
938
|
+
"onClose"
|
|
939
|
+
])]),
|
|
940
|
+
_: 1
|
|
941
|
+
}, 16, ["show", "onClose"])]),
|
|
942
|
+
_: 2
|
|
943
|
+
}, [g(e.slots, (t, n) => ({
|
|
944
|
+
name: e.hyphenate(n),
|
|
945
|
+
fn: S((n) => [(m(), o(P(e.getNode(t)), p(e.slotProps, n), null, 16))])
|
|
946
|
+
}))]), 1040, [
|
|
947
|
+
"name",
|
|
948
|
+
"label",
|
|
949
|
+
"disabled",
|
|
950
|
+
"placeholder",
|
|
951
|
+
"model-value",
|
|
952
|
+
"is-link",
|
|
953
|
+
"onClick"
|
|
954
|
+
]));
|
|
955
|
+
}]]);
|
|
956
|
+
function st() {
|
|
957
|
+
return {
|
|
958
|
+
...$e,
|
|
959
|
+
..._e,
|
|
960
|
+
label: { type: String },
|
|
961
|
+
checkboxGroupProps: { type: Object },
|
|
962
|
+
checkboxGroupOn: {
|
|
963
|
+
type: Object,
|
|
964
|
+
default: () => ({})
|
|
965
|
+
},
|
|
966
|
+
labelKey: {
|
|
967
|
+
type: String,
|
|
968
|
+
default: "label"
|
|
969
|
+
},
|
|
970
|
+
valueKey: {
|
|
971
|
+
type: String,
|
|
972
|
+
default: "value"
|
|
973
|
+
},
|
|
974
|
+
checkboxProps: { type: Object },
|
|
975
|
+
checkboxOn: {
|
|
976
|
+
type: Object,
|
|
977
|
+
default: () => ({})
|
|
978
|
+
},
|
|
979
|
+
checkboxSlots: { type: Object }
|
|
980
|
+
};
|
|
981
|
+
}
|
|
982
|
+
var ut = st(), dt = {
|
|
983
|
+
...q.props,
|
|
984
|
+
...ut
|
|
985
|
+
};
|
|
986
|
+
function ct() {
|
|
987
|
+
return {};
|
|
988
|
+
}
|
|
989
|
+
var pt = {}, ft = {
|
|
990
|
+
...q.emits,
|
|
991
|
+
...pt
|
|
992
|
+
};
|
|
993
|
+
var yt = Qe(u({
|
|
994
|
+
name: "HCheckboxGroup",
|
|
995
|
+
components: {
|
|
996
|
+
VanCheckbox: _,
|
|
997
|
+
VanCheckboxGroup: I,
|
|
998
|
+
VanField: q
|
|
999
|
+
},
|
|
1000
|
+
inheritAttrs: !1,
|
|
1001
|
+
props: ut,
|
|
1002
|
+
emits: pt,
|
|
1003
|
+
slots: Object,
|
|
1004
|
+
setup(e, t) {
|
|
1005
|
+
const n = xe(e), { slotProps: o } = Ue(e, 0, n);
|
|
1006
|
+
return {
|
|
1007
|
+
hyphenate: ke,
|
|
1008
|
+
getNode: ve,
|
|
1009
|
+
...n,
|
|
1010
|
+
slotProps: o
|
|
1011
|
+
};
|
|
1012
|
+
}
|
|
1013
|
+
}), [["render", function(e, n, u, d, c, f) {
|
|
1014
|
+
const y = O("VanCheckbox"), h = O("VanCheckboxGroup"), b = O("VanField");
|
|
1015
|
+
return e.hide ? l("", !0) : (m(), o(b, p({
|
|
1016
|
+
key: 0,
|
|
1017
|
+
name: e.field,
|
|
1018
|
+
label: e.label,
|
|
1019
|
+
disabled: e.globalDisabled || e.disabled,
|
|
1020
|
+
readonly: e.globalReadonly || e.readonly
|
|
1021
|
+
}, e.$attrs), r({
|
|
1022
|
+
input: S(() => [s(h, p({
|
|
1023
|
+
name: e.field,
|
|
1024
|
+
"model-value": e.checked,
|
|
1025
|
+
disabled: e.globalDisabled || e.disabled || e.globalReadonly || e.readonly
|
|
1026
|
+
}, e.checkboxGroupProps, w(e.checkboxGroupOn), { "onUpdate:modelValue": e.change }), {
|
|
1027
|
+
default: S(() => [(m(!0), a(t, null, g(e.finalOption, (t) => (m(), o(y, p({
|
|
1028
|
+
key: t[e.valueKey],
|
|
1029
|
+
name: t[e.valueKey]
|
|
1030
|
+
}, { ref_for: !0 }, e.checkboxProps, w(e.checkboxOn)), r({
|
|
1031
|
+
default: S(() => [i(V(t[e.labelKey]) + " ", 1)]),
|
|
1032
|
+
_: 2
|
|
1033
|
+
}, [g(e.checkboxSlots, (n, l) => ({
|
|
1034
|
+
name: e.hyphenate(l),
|
|
1035
|
+
fn: S((l) => [(m(), o(P(e.getNode(n)), p({ ref_for: !0 }, e.slotProps, { item: t }, { ref_for: !0 }, l), null, 16, ["item"]))])
|
|
1036
|
+
}))]), 1040, ["name"]))), 128))]),
|
|
1037
|
+
_: 1
|
|
1038
|
+
}, 16, [
|
|
1039
|
+
"name",
|
|
1040
|
+
"model-value",
|
|
1041
|
+
"disabled",
|
|
1042
|
+
"onUpdate:modelValue"
|
|
1043
|
+
])]),
|
|
1044
|
+
_: 2
|
|
1045
|
+
}, [g(e.slots, (t, n) => ({
|
|
1046
|
+
name: e.hyphenate(n),
|
|
1047
|
+
fn: S((n) => [(m(), o(P(e.getNode(t)), p(e.slotProps, n), null, 16))])
|
|
1048
|
+
}))]), 1040, [
|
|
1049
|
+
"name",
|
|
1050
|
+
"label",
|
|
1051
|
+
"disabled",
|
|
1052
|
+
"readonly"
|
|
1053
|
+
]));
|
|
1054
|
+
}]]);
|
|
1055
|
+
function ht() {
|
|
1056
|
+
return {
|
|
1057
|
+
...$e,
|
|
1058
|
+
..._e,
|
|
1059
|
+
label: { type: String },
|
|
1060
|
+
checkboxProps: { type: Object },
|
|
1061
|
+
checkboxOn: {
|
|
1062
|
+
type: Object,
|
|
1063
|
+
default: () => ({})
|
|
1064
|
+
},
|
|
1065
|
+
checkboxSlots: { type: Object }
|
|
1066
|
+
};
|
|
1067
|
+
}
|
|
1068
|
+
var bt = ht(), mt = {
|
|
1069
|
+
...q.props,
|
|
1070
|
+
...bt
|
|
1071
|
+
};
|
|
1072
|
+
function vt() {
|
|
1073
|
+
return {};
|
|
1074
|
+
}
|
|
1075
|
+
var gt = {}, kt = {
|
|
1076
|
+
...q.emits,
|
|
1077
|
+
...gt
|
|
1078
|
+
};
|
|
1079
|
+
var Ot = Qe(u({
|
|
1080
|
+
name: "HCheckbox",
|
|
1081
|
+
components: {
|
|
1082
|
+
VanCheckbox: _,
|
|
1083
|
+
VanField: q
|
|
1084
|
+
},
|
|
1085
|
+
inheritAttrs: !1,
|
|
1086
|
+
props: bt,
|
|
1087
|
+
emits: gt,
|
|
1088
|
+
slots: Object,
|
|
1089
|
+
setup(e, t) {
|
|
1090
|
+
const n = xe(e), { slotProps: o } = Ue(e, 0, n);
|
|
1091
|
+
return {
|
|
1092
|
+
hyphenate: ke,
|
|
1093
|
+
getNode: ve,
|
|
1094
|
+
...n,
|
|
1095
|
+
slotProps: o
|
|
1096
|
+
};
|
|
1097
|
+
}
|
|
1098
|
+
}), [["render", function(e, t, n, a, i, u) {
|
|
1099
|
+
const d = O("VanCheckbox"), c = O("VanField");
|
|
1100
|
+
return e.hide ? l("", !0) : (m(), o(c, p({
|
|
1101
|
+
key: 0,
|
|
1102
|
+
name: e.field,
|
|
1103
|
+
label: e.label,
|
|
1104
|
+
disabled: e.globalDisabled || e.disabled,
|
|
1105
|
+
readonly: e.globalReadonly || e.readonly
|
|
1106
|
+
}, e.$attrs), {
|
|
1107
|
+
input: S(() => [s(d, p({
|
|
1108
|
+
name: e.field,
|
|
1109
|
+
"model-value": e.checked,
|
|
1110
|
+
disabled: e.globalDisabled || e.disabled || e.globalReadonly || e.readonly
|
|
1111
|
+
}, e.checkboxProps, w(e.checkboxOn), { "onUpdate:modelValue": e.change }), r({ _: 2 }, [g(e.checkboxSlots, (t, n) => ({
|
|
1112
|
+
name: e.hyphenate(n),
|
|
1113
|
+
fn: S((n) => [(m(), o(P(e.getNode(t)), p(e.slotProps, n), null, 16))])
|
|
1114
|
+
}))]), 1040, [
|
|
1115
|
+
"name",
|
|
1116
|
+
"model-value",
|
|
1117
|
+
"disabled",
|
|
1118
|
+
"onUpdate:modelValue"
|
|
1119
|
+
])]),
|
|
1120
|
+
_: 1
|
|
1121
|
+
}, 16, [
|
|
1122
|
+
"name",
|
|
1123
|
+
"label",
|
|
1124
|
+
"disabled",
|
|
1125
|
+
"readonly"
|
|
1126
|
+
]));
|
|
1127
|
+
}]]);
|
|
1128
|
+
function Pt() {
|
|
1129
|
+
return {
|
|
1130
|
+
...$e,
|
|
1131
|
+
..._e,
|
|
1132
|
+
renderField: {
|
|
1133
|
+
type: Boolean,
|
|
1134
|
+
default: !0
|
|
1135
|
+
},
|
|
1136
|
+
render: {
|
|
1137
|
+
type: [Function, Object],
|
|
1138
|
+
required: !0
|
|
1139
|
+
}
|
|
1140
|
+
};
|
|
1141
|
+
}
|
|
1142
|
+
var Vt = Pt(), wt = Vt;
|
|
1143
|
+
function jt() {
|
|
1144
|
+
return {};
|
|
1145
|
+
}
|
|
1146
|
+
var Ct = {}, St = Ct;
|
|
1147
|
+
var Rt = Qe(u({
|
|
1148
|
+
name: "HCustomRender",
|
|
1149
|
+
components: { VanField: q },
|
|
1150
|
+
inheritAttrs: !1,
|
|
1151
|
+
props: Vt,
|
|
1152
|
+
emits: Ct,
|
|
1153
|
+
slots: Object,
|
|
1154
|
+
setup(e, t) {
|
|
1155
|
+
const o = xe(e), { slotProps: l } = Ue(e, 0, o), a = n(() => "object" == typeof o.checked.value ? "" : o.checked.value), r = v();
|
|
1156
|
+
return C(() => e.render, (e) => {
|
|
1157
|
+
r.value = "function" == typeof e ? ve(e(l.value)) : e;
|
|
1158
|
+
}, { immediate: !0 }), {
|
|
1159
|
+
hyphenate: ke,
|
|
1160
|
+
getNode: ve,
|
|
1161
|
+
...o,
|
|
1162
|
+
slotProps: l,
|
|
1163
|
+
fieldModelValue: a,
|
|
1164
|
+
customRender: r
|
|
1165
|
+
};
|
|
1166
|
+
}
|
|
1167
|
+
}), [["render", function(e, n, i, s, u, c) {
|
|
1168
|
+
const f = O("VanField");
|
|
1169
|
+
return e.renderField ? (m(), a(t, { key: 0 }, [e.hide ? l("", !0) : (m(), o(f, p({
|
|
1170
|
+
key: 0,
|
|
1171
|
+
"model-value": e.fieldModelValue
|
|
1172
|
+
}, e.$attrs), r({
|
|
1173
|
+
input: S(() => [(m(), o(P(e.customRender), y(d(e.slotProps)), null, 16))]),
|
|
1174
|
+
_: 2
|
|
1175
|
+
}, [g(e.slots, (t, n) => ({
|
|
1176
|
+
name: e.hyphenate(n),
|
|
1177
|
+
fn: S((n) => [(m(), o(P(e.getNode(t)), p(e.slotProps, n), null, 16))])
|
|
1178
|
+
}))]), 1040, ["model-value"]))], 64)) : (m(), o(P(e.customRender), y(p({ key: 1 }, e.slotProps)), null, 16));
|
|
1179
|
+
}]]);
|
|
1180
|
+
function Ft() {
|
|
1181
|
+
return {
|
|
1182
|
+
...$e,
|
|
1183
|
+
..._e,
|
|
1184
|
+
datePickerProps: { type: Object },
|
|
1185
|
+
datePickerOn: {
|
|
1186
|
+
type: Object,
|
|
1187
|
+
default: () => ({})
|
|
1188
|
+
},
|
|
1189
|
+
datePickerSlots: { type: Object },
|
|
1190
|
+
isLink: {
|
|
1191
|
+
type: Boolean,
|
|
1192
|
+
default: !0
|
|
1193
|
+
},
|
|
1194
|
+
onRowClick: { type: Function },
|
|
1195
|
+
separator: {
|
|
1196
|
+
type: String,
|
|
1197
|
+
default: "-"
|
|
1198
|
+
},
|
|
1199
|
+
format: {
|
|
1200
|
+
type: Function,
|
|
1201
|
+
default: Nt
|
|
1202
|
+
},
|
|
1203
|
+
valueFormat: {
|
|
1204
|
+
type: Function,
|
|
1205
|
+
default: Nt
|
|
1206
|
+
},
|
|
1207
|
+
valueUnformat: {
|
|
1208
|
+
type: Function,
|
|
1209
|
+
default: qt
|
|
1210
|
+
},
|
|
1211
|
+
valueTrigger: {
|
|
1212
|
+
type: String,
|
|
1213
|
+
default: "confirm"
|
|
1214
|
+
},
|
|
1215
|
+
popupProps: { type: Object },
|
|
1216
|
+
popupOn: {
|
|
1217
|
+
type: Object,
|
|
1218
|
+
default: () => ({})
|
|
1219
|
+
}
|
|
1220
|
+
};
|
|
1221
|
+
}
|
|
1222
|
+
var Ht = Ft(), At = {
|
|
1223
|
+
...q.props,
|
|
1224
|
+
...Ht
|
|
1225
|
+
};
|
|
1226
|
+
function xt() {
|
|
1227
|
+
return {};
|
|
1228
|
+
}
|
|
1229
|
+
var _t = {}, It = {
|
|
1230
|
+
...q.emits,
|
|
1231
|
+
..._t
|
|
1232
|
+
};
|
|
1233
|
+
function Nt(e, t) {
|
|
1234
|
+
return e.join(t);
|
|
1235
|
+
}
|
|
1236
|
+
function qt(e, t) {
|
|
1237
|
+
return e ? Array.isArray(e) ? e : e.split(t) : [];
|
|
1238
|
+
}
|
|
1239
|
+
var Dt = Qe(u({
|
|
1240
|
+
name: "HDatePicker",
|
|
1241
|
+
components: {
|
|
1242
|
+
VanDatePicker: N,
|
|
1243
|
+
VanField: q,
|
|
1244
|
+
VanPopup: E
|
|
1245
|
+
},
|
|
1246
|
+
inheritAttrs: !1,
|
|
1247
|
+
props: Ht,
|
|
1248
|
+
emits: _t,
|
|
1249
|
+
slots: Object,
|
|
1250
|
+
setup(e, t) {
|
|
1251
|
+
const n = xe(e), { slotProps: o } = Ue(e, 0, n), l = v(""), a = v([]);
|
|
1252
|
+
let r;
|
|
1253
|
+
function i(t, o) {
|
|
1254
|
+
switch (e.valueTrigger !== t && !1 !== e.datePickerProps?.showToolbar || (a.value = o.selectedValues, n.change(e.valueFormat(o.selectedValues, e.separator)), l.value = e.format(o.selectedValues, e.separator), r = n.checked.value, f(() => r = null)), t) {
|
|
1255
|
+
case "confirm":
|
|
1256
|
+
case "cancel": s.value.close();
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
1259
|
+
C(n.checked, (t) => {
|
|
1260
|
+
if (t === r) return r = null;
|
|
1261
|
+
r = null, a.value = t ? e.valueUnformat(t, e.separator) : [], l.value = a.value.length ? e.format(a.value, e.separator) : "";
|
|
1262
|
+
}, { immediate: !0 });
|
|
1263
|
+
const s = v({
|
|
1264
|
+
visible: !1,
|
|
1265
|
+
open() {
|
|
1266
|
+
s.value.visible = !0;
|
|
1267
|
+
},
|
|
1268
|
+
close() {
|
|
1269
|
+
s.value.visible = !1;
|
|
1270
|
+
}
|
|
1271
|
+
});
|
|
1272
|
+
return {
|
|
1273
|
+
hyphenate: ke,
|
|
1274
|
+
getNode: ve,
|
|
1275
|
+
...n,
|
|
1276
|
+
slotProps: o,
|
|
1277
|
+
showText: l,
|
|
1278
|
+
checkedArr: a,
|
|
1279
|
+
clickHandle: function(t) {
|
|
1280
|
+
n.globalDisabled.value || e.disabled || n.globalReadonly.value || e.readonly || (e.onRowClick ? e.onRowClick(s.value, t) : s.value.open());
|
|
1281
|
+
},
|
|
1282
|
+
changeHandle: i.bind(null, "change"),
|
|
1283
|
+
confirmHandle: i.bind(null, "confirm"),
|
|
1284
|
+
cancelHandle: i.bind(null, "cancel"),
|
|
1285
|
+
popupInfo: s
|
|
1286
|
+
};
|
|
1287
|
+
}
|
|
1288
|
+
}), [["render", function(e, t, n, a, i, u) {
|
|
1289
|
+
const d = O("VanDatePicker"), c = O("VanPopup"), f = O("VanField");
|
|
1290
|
+
return e.hide ? l("", !0) : (m(), o(f, p({
|
|
1291
|
+
key: 0,
|
|
1292
|
+
name: e.field,
|
|
1293
|
+
disabled: e.globalDisabled || e.disabled,
|
|
1294
|
+
readonly: !0,
|
|
1295
|
+
"is-link": e.isLink,
|
|
1296
|
+
"model-value": e.showText
|
|
1297
|
+
}, e.$attrs, { onClick: e.clickHandle }), r({
|
|
1298
|
+
extra: S(() => [s(c, p({
|
|
1299
|
+
show: e.popupInfo.visible,
|
|
1300
|
+
"onUpdate:show": t[0] || (t[0] = (t) => e.popupInfo.visible = t),
|
|
1301
|
+
teleport: "body",
|
|
1302
|
+
round: "",
|
|
1303
|
+
position: "bottom"
|
|
1304
|
+
}, e.popupProps, w(e.popupOn), { onClose: e.popupInfo.close }), {
|
|
1305
|
+
default: S(() => [s(d, p({ "model-value": e.checkedArr }, e.datePickerProps, w(e.datePickerOn), {
|
|
1306
|
+
onChange: e.changeHandle,
|
|
1307
|
+
onConfirm: e.confirmHandle,
|
|
1308
|
+
onCancel: e.cancelHandle
|
|
1309
|
+
}), r({ _: 2 }, [g(e.datePickerSlots, (t, n) => ({
|
|
1310
|
+
name: e.hyphenate(n),
|
|
1311
|
+
fn: S((n) => [(m(), o(P(e.getNode(t)), p(e.slotProps, n), null, 16))])
|
|
1312
|
+
}))]), 1040, [
|
|
1313
|
+
"model-value",
|
|
1314
|
+
"onChange",
|
|
1315
|
+
"onConfirm",
|
|
1316
|
+
"onCancel"
|
|
1317
|
+
])]),
|
|
1318
|
+
_: 1
|
|
1319
|
+
}, 16, ["show", "onClose"])]),
|
|
1320
|
+
_: 2
|
|
1321
|
+
}, [g(e.slots, (t, n) => ({
|
|
1322
|
+
name: e.hyphenate(n),
|
|
1323
|
+
fn: S((n) => [(m(), o(P(e.getNode(t)), p(e.slotProps, n), null, 16))])
|
|
1324
|
+
}))]), 1040, [
|
|
1325
|
+
"name",
|
|
1326
|
+
"disabled",
|
|
1327
|
+
"is-link",
|
|
1328
|
+
"model-value",
|
|
1329
|
+
"onClick"
|
|
1330
|
+
]));
|
|
1331
|
+
}]]);
|
|
1332
|
+
function Tt() {
|
|
1333
|
+
return {
|
|
1334
|
+
...$e,
|
|
1335
|
+
..._e,
|
|
1336
|
+
pickerGroupProps: { type: Object },
|
|
1337
|
+
pickerGroupOn: {
|
|
1338
|
+
type: Object,
|
|
1339
|
+
default: () => ({})
|
|
1340
|
+
},
|
|
1341
|
+
pickerGroupSlots: { type: Object },
|
|
1342
|
+
isLink: {
|
|
1343
|
+
type: Boolean,
|
|
1344
|
+
default: !0
|
|
1345
|
+
},
|
|
1346
|
+
onRowClick: { type: Function },
|
|
1347
|
+
format: {
|
|
1348
|
+
type: Function,
|
|
1349
|
+
default: Kt
|
|
1350
|
+
},
|
|
1351
|
+
valueFormat: {
|
|
1352
|
+
type: Function,
|
|
1353
|
+
default: Kt
|
|
1354
|
+
},
|
|
1355
|
+
valueUnformat: {
|
|
1356
|
+
type: Function,
|
|
1357
|
+
default: Lt
|
|
1358
|
+
},
|
|
1359
|
+
valueTrigger: {
|
|
1360
|
+
type: String,
|
|
1361
|
+
default: "confirm"
|
|
1362
|
+
},
|
|
1363
|
+
datePickerProps: { type: Object },
|
|
1364
|
+
datePickerOn: {
|
|
1365
|
+
type: Object,
|
|
1366
|
+
default: () => ({})
|
|
1367
|
+
},
|
|
1368
|
+
datePickerSlots: { type: Object },
|
|
1369
|
+
timePickerProps: { type: Object },
|
|
1370
|
+
timePickerOn: {
|
|
1371
|
+
type: Object,
|
|
1372
|
+
default: () => ({})
|
|
1373
|
+
},
|
|
1374
|
+
timePickerSlots: { type: Object },
|
|
1375
|
+
popupProps: { type: Object },
|
|
1376
|
+
popupOn: {
|
|
1377
|
+
type: Object,
|
|
1378
|
+
default: () => ({})
|
|
1379
|
+
}
|
|
1380
|
+
};
|
|
1381
|
+
}
|
|
1382
|
+
var Ut = Tt(), Bt = {
|
|
1383
|
+
...q.props,
|
|
1384
|
+
...Ut
|
|
1385
|
+
};
|
|
1386
|
+
function $t() {
|
|
1387
|
+
return {};
|
|
1388
|
+
}
|
|
1389
|
+
var Et = {}, Gt = {
|
|
1390
|
+
...q.emits,
|
|
1391
|
+
...Et
|
|
1392
|
+
};
|
|
1393
|
+
function Kt(e) {
|
|
1394
|
+
const t = [];
|
|
1395
|
+
return e[0] && t.push(e[0].join("-")), e[1] && t.push(e[1].join(":")), t.join(" ");
|
|
1396
|
+
}
|
|
1397
|
+
function Lt(e) {
|
|
1398
|
+
if (!e) return [];
|
|
1399
|
+
const [t, n] = e.split(" ");
|
|
1400
|
+
return [t?.split("-"), n?.split(":")].filter(Boolean);
|
|
1401
|
+
}
|
|
1402
|
+
var Mt = Qe(u({
|
|
1403
|
+
name: "HDateTimePickerGroup",
|
|
1404
|
+
components: {
|
|
1405
|
+
VanPickerGroup: $,
|
|
1406
|
+
VanField: q,
|
|
1407
|
+
VanPopup: E,
|
|
1408
|
+
VanDatePicker: N,
|
|
1409
|
+
VanTimePicker: z
|
|
1410
|
+
},
|
|
1411
|
+
inheritAttrs: !1,
|
|
1412
|
+
props: Ut,
|
|
1413
|
+
emits: Et,
|
|
1414
|
+
slots: Object,
|
|
1415
|
+
setup(e, t) {
|
|
1416
|
+
const n = xe(e), { slotProps: o } = Ue(e, 0, n), l = v(""), a = v([]), r = v(), i = v();
|
|
1417
|
+
let s;
|
|
1418
|
+
function u(t, o) {
|
|
1419
|
+
switch ("change" !== t && o && (a.value = o.map((e) => e.selectedValues)), (e.valueTrigger === t || !1 === e.pickerGroupProps?.showToolbar) && a.value.length >= 2 && (n.change(e.valueFormat(a.value)), l.value = e.format(a.value), s = n.checked.value, f(() => s = null)), t) {
|
|
1420
|
+
case "confirm":
|
|
1421
|
+
case "cancel": d.value.close();
|
|
1422
|
+
}
|
|
1423
|
+
}
|
|
1424
|
+
C(n.checked, (t) => {
|
|
1425
|
+
if (t === s) return s = null;
|
|
1426
|
+
s = null, a.value = t ? e.valueUnformat(t) : [], l.value = a.value.length ? e.format(a.value) : "";
|
|
1427
|
+
}, { immediate: !0 });
|
|
1428
|
+
const d = v({
|
|
1429
|
+
visible: !1,
|
|
1430
|
+
open() {
|
|
1431
|
+
d.value.visible = !0;
|
|
1432
|
+
},
|
|
1433
|
+
close() {
|
|
1434
|
+
d.value.visible = !1;
|
|
1435
|
+
}
|
|
1436
|
+
});
|
|
1437
|
+
return {
|
|
1438
|
+
hyphenate: ke,
|
|
1439
|
+
getNode: ve,
|
|
1440
|
+
...n,
|
|
1441
|
+
slotProps: o,
|
|
1442
|
+
showText: l,
|
|
1443
|
+
checkedArr: a,
|
|
1444
|
+
datePickerRef: r,
|
|
1445
|
+
timePickerRef: i,
|
|
1446
|
+
clickHandle: function(t) {
|
|
1447
|
+
n.globalDisabled.value || e.disabled || n.globalReadonly.value || e.readonly || (e.onRowClick ? e.onRowClick(d.value, t) : d.value.open());
|
|
1448
|
+
},
|
|
1449
|
+
changeHandle: function(e, t) {
|
|
1450
|
+
a.value[t] = e.selectedValues, u("change");
|
|
1451
|
+
},
|
|
1452
|
+
pickerGroupHandle: u,
|
|
1453
|
+
popupInfo: d
|
|
1454
|
+
};
|
|
1455
|
+
}
|
|
1456
|
+
}), [["render", function(e, t, n, a, i, u) {
|
|
1457
|
+
const d = O("VanDatePicker"), c = O("VanTimePicker"), f = O("VanPickerGroup"), y = O("VanPopup"), h = O("VanField");
|
|
1458
|
+
return e.hide ? l("", !0) : (m(), o(h, p({
|
|
1459
|
+
key: 0,
|
|
1460
|
+
name: e.field,
|
|
1461
|
+
disabled: e.globalDisabled || e.disabled,
|
|
1462
|
+
readonly: !0,
|
|
1463
|
+
"is-link": e.isLink,
|
|
1464
|
+
"model-value": e.showText
|
|
1465
|
+
}, e.$attrs, { onClick: e.clickHandle }), r({
|
|
1466
|
+
extra: S(() => [s(y, p({
|
|
1467
|
+
show: e.popupInfo.visible,
|
|
1468
|
+
"onUpdate:show": t[4] || (t[4] = (t) => e.popupInfo.visible = t),
|
|
1469
|
+
teleport: "body",
|
|
1470
|
+
round: "",
|
|
1471
|
+
position: "bottom"
|
|
1472
|
+
}, e.popupProps, w(e.popupOn), { onClose: e.popupInfo.close }), {
|
|
1473
|
+
default: S(() => [s(f, p(e.pickerGroupProps, w(e.pickerGroupOn), {
|
|
1474
|
+
onConfirm: t[2] || (t[2] = (t) => e.pickerGroupHandle("confirm", t)),
|
|
1475
|
+
onCancel: t[3] || (t[3] = (t) => e.pickerGroupHandle("cancel", t))
|
|
1476
|
+
}), r({
|
|
1477
|
+
default: S(() => [s(d, p({
|
|
1478
|
+
ref: "datePickerRef",
|
|
1479
|
+
"model-value": e.checkedArr[0]
|
|
1480
|
+
}, e.datePickerProps, w(e.datePickerOn), { onChange: t[0] || (t[0] = (t) => e.changeHandle(t, 0)) }), r({ _: 2 }, [g(e.datePickerSlots, (t, n) => ({
|
|
1481
|
+
name: e.hyphenate(n),
|
|
1482
|
+
fn: S((n) => [(m(), o(P(e.getNode(t)), p(e.slotProps, n), null, 16))])
|
|
1483
|
+
}))]), 1040, ["model-value"]), s(c, p({
|
|
1484
|
+
ref: "timePickerRef",
|
|
1485
|
+
"model-value": e.checkedArr[1]
|
|
1486
|
+
}, e.timePickerProps, w(e.timePickerOn), { onChange: t[1] || (t[1] = (t) => e.changeHandle(t, 1)) }), r({ _: 2 }, [g(e.timePickerSlots, (t, n) => ({
|
|
1487
|
+
name: e.hyphenate(n),
|
|
1488
|
+
fn: S((n) => [(m(), o(P(e.getNode(t)), p(e.slotProps, n), null, 16))])
|
|
1489
|
+
}))]), 1040, ["model-value"])]),
|
|
1490
|
+
_: 2
|
|
1491
|
+
}, [g(e.pickerGroupSlots, (t, n) => ({
|
|
1492
|
+
name: e.hyphenate(n),
|
|
1493
|
+
fn: S((n) => [(m(), o(P(e.getNode(t)), p(e.slotProps, n), null, 16))])
|
|
1494
|
+
}))]), 1040)]),
|
|
1495
|
+
_: 1
|
|
1496
|
+
}, 16, ["show", "onClose"])]),
|
|
1497
|
+
_: 2
|
|
1498
|
+
}, [g(e.slots, (t, n) => ({
|
|
1499
|
+
name: e.hyphenate(n),
|
|
1500
|
+
fn: S((n) => [(m(), o(P(e.getNode(t)), p(e.slotProps, n), null, 16))])
|
|
1501
|
+
}))]), 1040, [
|
|
1502
|
+
"name",
|
|
1503
|
+
"disabled",
|
|
1504
|
+
"is-link",
|
|
1505
|
+
"model-value",
|
|
1506
|
+
"onClick"
|
|
1507
|
+
]));
|
|
1508
|
+
}]]);
|
|
1509
|
+
function Wt() {
|
|
1510
|
+
return {
|
|
1511
|
+
...$e,
|
|
1512
|
+
..._e,
|
|
1513
|
+
clearable: {
|
|
1514
|
+
type: Boolean,
|
|
1515
|
+
default: !0
|
|
1516
|
+
},
|
|
1517
|
+
debounceTime: {
|
|
1518
|
+
type: Number,
|
|
1519
|
+
default: 300
|
|
1520
|
+
}
|
|
1521
|
+
};
|
|
1522
|
+
}
|
|
1523
|
+
var Qt = Wt(), Yt = {
|
|
1524
|
+
...q.props,
|
|
1525
|
+
...Qt
|
|
1526
|
+
};
|
|
1527
|
+
function zt() {
|
|
1528
|
+
return {};
|
|
1529
|
+
}
|
|
1530
|
+
var Jt = {}, Xt = {
|
|
1531
|
+
...q.emits,
|
|
1532
|
+
...Jt
|
|
1533
|
+
};
|
|
1534
|
+
var Zt = Qe(u({
|
|
1535
|
+
name: "HInput",
|
|
1536
|
+
components: { VanField: q },
|
|
1537
|
+
inheritAttrs: !1,
|
|
1538
|
+
props: Qt,
|
|
1539
|
+
emits: Jt,
|
|
1540
|
+
slots: Object,
|
|
1541
|
+
setup(e, t) {
|
|
1542
|
+
const n = xe(e), { slotProps: o } = Ue(e, 0, n), { tempChecked: l, changeSync: a } = function(e) {
|
|
1543
|
+
const t = v(e.value);
|
|
1544
|
+
return C(e, (e) => t.value = e), {
|
|
1545
|
+
tempChecked: t,
|
|
1546
|
+
change: function(n) {
|
|
1547
|
+
e.value = t.value = n, t.value !== e.value && f(() => t.value = e.value);
|
|
1548
|
+
},
|
|
1549
|
+
changeSync: function(n) {
|
|
1550
|
+
e.value = n, t.value = e.value;
|
|
1551
|
+
}
|
|
1552
|
+
};
|
|
1553
|
+
}(n.checked), r = v();
|
|
1554
|
+
let i = 0;
|
|
1555
|
+
return {
|
|
1556
|
+
hyphenate: ke,
|
|
1557
|
+
getNode: ve,
|
|
1558
|
+
fieldRef: r,
|
|
1559
|
+
...n,
|
|
1560
|
+
slotProps: o,
|
|
1561
|
+
tempChecked: l,
|
|
1562
|
+
change: function(t) {
|
|
1563
|
+
if (t === l.value) return;
|
|
1564
|
+
const { debounceTime: n } = e;
|
|
1565
|
+
i && clearTimeout(i), l.value = t, n ? i = setTimeout(() => a(l.value), n) : a(t);
|
|
1566
|
+
},
|
|
1567
|
+
enterHandle: function(e) {
|
|
1568
|
+
i && clearTimeout(i), n.checked.value !== l.value && (n.checked.value = l.value), n.wrapper?.search();
|
|
1569
|
+
}
|
|
1570
|
+
};
|
|
1571
|
+
}
|
|
1572
|
+
}), [["render", function(e, t, n, a, i, s) {
|
|
1573
|
+
const u = O("VanField");
|
|
1574
|
+
return e.hide ? l("", !0) : (m(), o(u, p({ key: 0 }, e.$attrs, {
|
|
1575
|
+
ref: "fieldRef",
|
|
1576
|
+
name: e.field,
|
|
1577
|
+
disabled: e.globalDisabled || e.disabled,
|
|
1578
|
+
readonly: e.globalDisabled || e.readonly,
|
|
1579
|
+
clearable: e.clearable,
|
|
1580
|
+
"model-value": e.tempChecked,
|
|
1581
|
+
"onUpdate:modelValue": e.change,
|
|
1582
|
+
onKeydown: R(e.enterHandle, ["enter"])
|
|
1583
|
+
}), r({ _: 2 }, [g(e.slots, (t, n) => ({
|
|
1584
|
+
name: e.hyphenate(n),
|
|
1585
|
+
fn: S((n) => [(m(), o(P(e.getNode(t)), p(e.slotProps, n), null, 16))])
|
|
1586
|
+
}))]), 1040, [
|
|
1587
|
+
"name",
|
|
1588
|
+
"disabled",
|
|
1589
|
+
"readonly",
|
|
1590
|
+
"clearable",
|
|
1591
|
+
"model-value",
|
|
1592
|
+
"onUpdate:modelValue",
|
|
1593
|
+
"onKeydown"
|
|
1594
|
+
]));
|
|
1595
|
+
}]]);
|
|
1596
|
+
function en() {
|
|
1597
|
+
return {
|
|
1598
|
+
...$e,
|
|
1599
|
+
..._e,
|
|
1600
|
+
numberKeyboardProps: { type: Object },
|
|
1601
|
+
numberKeyboardOn: {
|
|
1602
|
+
type: Object,
|
|
1603
|
+
default: () => ({})
|
|
1604
|
+
},
|
|
1605
|
+
numberKeyboardSlots: { type: Object },
|
|
1606
|
+
isLink: {
|
|
1607
|
+
type: Boolean,
|
|
1608
|
+
default: !0
|
|
1609
|
+
},
|
|
1610
|
+
onRowClick: { type: Function }
|
|
1611
|
+
};
|
|
1612
|
+
}
|
|
1613
|
+
var tn = en(), nn = {
|
|
1614
|
+
...q.props,
|
|
1615
|
+
...tn
|
|
1616
|
+
};
|
|
1617
|
+
function on() {
|
|
1618
|
+
return {};
|
|
1619
|
+
}
|
|
1620
|
+
var ln = {}, an = {
|
|
1621
|
+
...q.emits,
|
|
1622
|
+
...ln
|
|
1623
|
+
};
|
|
1624
|
+
var rn = Qe(u({
|
|
1625
|
+
name: "HNumberKeyboard",
|
|
1626
|
+
components: {
|
|
1627
|
+
VanField: q,
|
|
1628
|
+
VanNumberKeyboard: T
|
|
1629
|
+
},
|
|
1630
|
+
inheritAttrs: !1,
|
|
1631
|
+
props: tn,
|
|
1632
|
+
emits: ln,
|
|
1633
|
+
slots: Object,
|
|
1634
|
+
setup(e, t) {
|
|
1635
|
+
const n = xe(e), { slotProps: o } = Ue(e, 0, n);
|
|
1636
|
+
const l = v({
|
|
1637
|
+
visible: !1,
|
|
1638
|
+
open() {
|
|
1639
|
+
l.value.visible = !0;
|
|
1640
|
+
},
|
|
1641
|
+
close() {
|
|
1642
|
+
l.value.visible = !1;
|
|
1643
|
+
}
|
|
1644
|
+
});
|
|
1645
|
+
return {
|
|
1646
|
+
hyphenate: ke,
|
|
1647
|
+
getNode: ve,
|
|
1648
|
+
...n,
|
|
1649
|
+
slotProps: o,
|
|
1650
|
+
clickHandle: function(t) {
|
|
1651
|
+
n.globalDisabled.value || e.disabled || n.globalReadonly.value || e.readonly || (e.onRowClick ? e.onRowClick(l.value, t) : l.value.open());
|
|
1652
|
+
},
|
|
1653
|
+
popupInfo: l
|
|
1654
|
+
};
|
|
1655
|
+
}
|
|
1656
|
+
}), [["render", function(e, t, n, a, i, u) {
|
|
1657
|
+
const d = O("VanNumberKeyboard"), c = O("VanField");
|
|
1658
|
+
return e.hide ? l("", !0) : (m(), o(c, p({
|
|
1659
|
+
key: 0,
|
|
1660
|
+
name: e.field,
|
|
1661
|
+
"model-value": e.checked,
|
|
1662
|
+
disabled: e.globalDisabled || e.disabled,
|
|
1663
|
+
readonly: !0,
|
|
1664
|
+
"is-link": e.isLink
|
|
1665
|
+
}, e.$attrs, { onClick: F(e.clickHandle, ["stop"]) }), r({
|
|
1666
|
+
extra: S(() => [s(d, p({
|
|
1667
|
+
"model-value": e.checked,
|
|
1668
|
+
show: e.popupInfo.visible
|
|
1669
|
+
}, e.numberKeyboardProps, w(e.numberKeyboardOn), {
|
|
1670
|
+
"onUpdate:modelValue": e.change,
|
|
1671
|
+
onBlur: e.popupInfo.close
|
|
1672
|
+
}), r({ _: 2 }, [g(e.numberKeyboardSlots, (t, n) => ({
|
|
1673
|
+
name: e.hyphenate(n),
|
|
1674
|
+
fn: S((n) => [(m(), o(P(e.getNode(t)), p(e.slotProps, n), null, 16))])
|
|
1675
|
+
}))]), 1040, [
|
|
1676
|
+
"model-value",
|
|
1677
|
+
"show",
|
|
1678
|
+
"onUpdate:modelValue",
|
|
1679
|
+
"onBlur"
|
|
1680
|
+
])]),
|
|
1681
|
+
_: 2
|
|
1682
|
+
}, [g(e.slots, (t, n) => ({
|
|
1683
|
+
name: e.hyphenate(n),
|
|
1684
|
+
fn: S((n) => [(m(), o(P(e.getNode(t)), p(e.slotProps, n), null, 16))])
|
|
1685
|
+
}))]), 1040, [
|
|
1686
|
+
"name",
|
|
1687
|
+
"model-value",
|
|
1688
|
+
"disabled",
|
|
1689
|
+
"is-link",
|
|
1690
|
+
"onClick"
|
|
1691
|
+
]));
|
|
1692
|
+
}]]);
|
|
1693
|
+
function sn() {
|
|
1694
|
+
return {
|
|
1695
|
+
...$e,
|
|
1696
|
+
..._e,
|
|
1697
|
+
label: { type: String },
|
|
1698
|
+
passwordInputProps: { type: Object },
|
|
1699
|
+
passwordInputOn: {
|
|
1700
|
+
type: Object,
|
|
1701
|
+
default: () => ({})
|
|
1702
|
+
},
|
|
1703
|
+
passwordInputSlots: { type: Object },
|
|
1704
|
+
onRowClick: { type: Function },
|
|
1705
|
+
numberKeyboardProps: { type: Object },
|
|
1706
|
+
numberKeyboardOn: {
|
|
1707
|
+
type: Object,
|
|
1708
|
+
default: () => ({})
|
|
1709
|
+
},
|
|
1710
|
+
numberKeyboardSlots: { type: Object }
|
|
1711
|
+
};
|
|
1712
|
+
}
|
|
1713
|
+
var un = sn(), dn = {
|
|
1714
|
+
...q.props,
|
|
1715
|
+
...un
|
|
1716
|
+
};
|
|
1717
|
+
function cn() {
|
|
1718
|
+
return {};
|
|
1719
|
+
}
|
|
1720
|
+
var pn = {}, fn = {
|
|
1721
|
+
...q.emits,
|
|
1722
|
+
...pn
|
|
1723
|
+
};
|
|
1724
|
+
var yn = Qe(u({
|
|
1725
|
+
name: "HPasswordInput",
|
|
1726
|
+
components: {
|
|
1727
|
+
VanField: q,
|
|
1728
|
+
VanNumberKeyboard: T,
|
|
1729
|
+
VanPasswordInput: U
|
|
1730
|
+
},
|
|
1731
|
+
inheritAttrs: !1,
|
|
1732
|
+
props: un,
|
|
1733
|
+
emits: pn,
|
|
1734
|
+
slots: Object,
|
|
1735
|
+
setup(e, t) {
|
|
1736
|
+
const n = xe(e), { slotProps: o } = Ue(e, 0, n);
|
|
1737
|
+
const l = v({
|
|
1738
|
+
visible: !1,
|
|
1739
|
+
open() {
|
|
1740
|
+
l.value.visible = !0;
|
|
1741
|
+
},
|
|
1742
|
+
close() {
|
|
1743
|
+
l.value.visible = !1;
|
|
1744
|
+
}
|
|
1745
|
+
});
|
|
1746
|
+
return {
|
|
1747
|
+
hyphenate: ke,
|
|
1748
|
+
getNode: ve,
|
|
1749
|
+
...n,
|
|
1750
|
+
slotProps: o,
|
|
1751
|
+
clickHandle: function(t) {
|
|
1752
|
+
n.globalDisabled.value || e.disabled || n.globalReadonly.value || e.readonly || (e.onRowClick ? e.onRowClick(l.value, t) : l.value.open());
|
|
1753
|
+
},
|
|
1754
|
+
customChange: function(t) {
|
|
1755
|
+
const o = Number(e.passwordInputProps?.length) || 6;
|
|
1756
|
+
t.length === o && l.value.close(), n.change(t);
|
|
1757
|
+
},
|
|
1758
|
+
popupInfo: l
|
|
1759
|
+
};
|
|
1760
|
+
}
|
|
1761
|
+
}), [["render", function(e, t, n, a, i, u) {
|
|
1762
|
+
const d = O("VanPasswordInput"), c = O("VanNumberKeyboard"), f = O("VanField");
|
|
1763
|
+
return e.hide ? l("", !0) : (m(), o(f, p({
|
|
1764
|
+
key: 0,
|
|
1765
|
+
name: e.field,
|
|
1766
|
+
label: e.label,
|
|
1767
|
+
"model-value": e.checked,
|
|
1768
|
+
disabled: e.globalDisabled || e.disabled,
|
|
1769
|
+
readonly: e.globalReadonly || e.readonly
|
|
1770
|
+
}, e.$attrs, { onClick: F(e.clickHandle, ["stop"]) }), r({
|
|
1771
|
+
input: S(() => [s(d, p({
|
|
1772
|
+
style: { width: "100%" },
|
|
1773
|
+
value: e.checked,
|
|
1774
|
+
focused: e.popupInfo.visible
|
|
1775
|
+
}, e.passwordInputProps, w(e.passwordInputOn), { onFocus: e.clickHandle }), r({ _: 2 }, [g(e.passwordInputSlots, (t, n) => ({
|
|
1776
|
+
name: e.hyphenate(n),
|
|
1777
|
+
fn: S((n) => [(m(), o(P(e.getNode(t)), p(e.slotProps, n), null, 16))])
|
|
1778
|
+
}))]), 1040, [
|
|
1779
|
+
"value",
|
|
1780
|
+
"focused",
|
|
1781
|
+
"onFocus"
|
|
1782
|
+
])]),
|
|
1783
|
+
extra: S(() => [s(c, p({
|
|
1784
|
+
"model-value": e.checked,
|
|
1785
|
+
show: e.popupInfo.visible
|
|
1786
|
+
}, e.numberKeyboardProps, w(e.numberKeyboardOn), {
|
|
1787
|
+
"onUpdate:modelValue": e.customChange,
|
|
1788
|
+
onBlur: e.popupInfo.close
|
|
1789
|
+
}), r({ _: 2 }, [g(e.numberKeyboardSlots, (t, n) => ({
|
|
1790
|
+
name: e.hyphenate(n),
|
|
1791
|
+
fn: S((n) => [(m(), o(P(e.getNode(t)), p(e.slotProps, n), null, 16))])
|
|
1792
|
+
}))]), 1040, [
|
|
1793
|
+
"model-value",
|
|
1794
|
+
"show",
|
|
1795
|
+
"onUpdate:modelValue",
|
|
1796
|
+
"onBlur"
|
|
1797
|
+
])]),
|
|
1798
|
+
_: 2
|
|
1799
|
+
}, [g(e.slots, (t, n) => ({
|
|
1800
|
+
name: e.hyphenate(n),
|
|
1801
|
+
fn: S((n) => [(m(), o(P(e.getNode(t)), p(e.slotProps, n), null, 16))])
|
|
1802
|
+
}))]), 1040, [
|
|
1803
|
+
"name",
|
|
1804
|
+
"label",
|
|
1805
|
+
"model-value",
|
|
1806
|
+
"disabled",
|
|
1807
|
+
"readonly",
|
|
1808
|
+
"onClick"
|
|
1809
|
+
]));
|
|
1810
|
+
}]]);
|
|
1811
|
+
function hn() {
|
|
1812
|
+
return {
|
|
1813
|
+
...$e,
|
|
1814
|
+
..._e,
|
|
1815
|
+
pickerProps: { type: Object },
|
|
1816
|
+
pickerOn: {
|
|
1817
|
+
type: Object,
|
|
1818
|
+
default: () => ({})
|
|
1819
|
+
},
|
|
1820
|
+
pickerSlots: { type: Object },
|
|
1821
|
+
isLink: {
|
|
1822
|
+
type: Boolean,
|
|
1823
|
+
default: !0
|
|
1824
|
+
},
|
|
1825
|
+
onRowClick: { type: Function },
|
|
1826
|
+
separator: {
|
|
1827
|
+
type: String,
|
|
1828
|
+
default: "/"
|
|
1829
|
+
},
|
|
1830
|
+
showAllLevels: {
|
|
1831
|
+
type: Boolean,
|
|
1832
|
+
default: !0
|
|
1833
|
+
},
|
|
1834
|
+
format: { type: Function },
|
|
1835
|
+
valueTrigger: {
|
|
1836
|
+
type: String,
|
|
1837
|
+
default: "confirm"
|
|
1838
|
+
},
|
|
1839
|
+
popupProps: { type: Object },
|
|
1840
|
+
popupOn: {
|
|
1841
|
+
type: Object,
|
|
1842
|
+
default: () => ({})
|
|
1843
|
+
}
|
|
1844
|
+
};
|
|
1845
|
+
}
|
|
1846
|
+
var bn = hn(), mn = {
|
|
1847
|
+
...q.props,
|
|
1848
|
+
...bn
|
|
1849
|
+
};
|
|
1850
|
+
function vn() {
|
|
1851
|
+
return {};
|
|
1852
|
+
}
|
|
1853
|
+
var gn = {}, kn = {
|
|
1854
|
+
...q.emits,
|
|
1855
|
+
...gn
|
|
1856
|
+
};
|
|
1857
|
+
var On = Qe(u({
|
|
1858
|
+
name: "HPicker",
|
|
1859
|
+
components: {
|
|
1860
|
+
VanPicker: B,
|
|
1861
|
+
VanField: q,
|
|
1862
|
+
VanPopup: E
|
|
1863
|
+
},
|
|
1864
|
+
inheritAttrs: !1,
|
|
1865
|
+
props: bn,
|
|
1866
|
+
emits: gn,
|
|
1867
|
+
slots: Object,
|
|
1868
|
+
setup(e, t) {
|
|
1869
|
+
const o = xe(e), { slotProps: l } = Ue(e, 0, o), a = n(() => {
|
|
1870
|
+
const t = o.checked.value;
|
|
1871
|
+
if (!t || !t.length) return "";
|
|
1872
|
+
const { format: n, showAllLevels: l, separator: a } = e, r = e.pickerProps?.columns || o.finalOption.value, i = (e.pickerProps || {}).columnsFieldNames || {}, s = {
|
|
1873
|
+
text: i.text || "text",
|
|
1874
|
+
value: i.value || "value",
|
|
1875
|
+
children: i.children || "children"
|
|
1876
|
+
};
|
|
1877
|
+
if (n) return n({
|
|
1878
|
+
source: r,
|
|
1879
|
+
value: t,
|
|
1880
|
+
columnsFieldNames: s,
|
|
1881
|
+
showAllLevels: l,
|
|
1882
|
+
separator: a
|
|
1883
|
+
});
|
|
1884
|
+
if (r.length > 0 && Array.isArray(r[0])) return t.map((e, t) => {
|
|
1885
|
+
const n = (r[t] || []).find((t) => t[s.value] === e);
|
|
1886
|
+
return n ? n[s.text] : "";
|
|
1887
|
+
}).filter(Boolean).join(a);
|
|
1888
|
+
const u = [];
|
|
1889
|
+
let d = r;
|
|
1890
|
+
for (const e of t) {
|
|
1891
|
+
const t = d.find((t) => t[s.value] === e);
|
|
1892
|
+
if (!t) break;
|
|
1893
|
+
u.push(t[s.text]), d = t[s.children] || [];
|
|
1894
|
+
}
|
|
1895
|
+
return l ? u.join(a) : u[u.length - 1];
|
|
1896
|
+
});
|
|
1897
|
+
const r = v({
|
|
1898
|
+
visible: !1,
|
|
1899
|
+
open() {
|
|
1900
|
+
r.value.visible = !0;
|
|
1901
|
+
},
|
|
1902
|
+
close() {
|
|
1903
|
+
r.value.visible = !1;
|
|
1904
|
+
}
|
|
1905
|
+
});
|
|
1906
|
+
return {
|
|
1907
|
+
hyphenate: ke,
|
|
1908
|
+
getNode: ve,
|
|
1909
|
+
...o,
|
|
1910
|
+
slotProps: l,
|
|
1911
|
+
showText: a,
|
|
1912
|
+
clickHandle: function(t) {
|
|
1913
|
+
o.globalDisabled.value || e.disabled || o.globalReadonly.value || e.readonly || (e.onRowClick ? e.onRowClick(r.value, t) : r.value.open());
|
|
1914
|
+
},
|
|
1915
|
+
pickerHandle: function(t, n) {
|
|
1916
|
+
switch ((e.valueTrigger === t || !1 === e.pickerProps?.showToolbar) && o.change(n.selectedValues), t) {
|
|
1917
|
+
case "confirm":
|
|
1918
|
+
case "cancel": r.value.close();
|
|
1919
|
+
}
|
|
1920
|
+
},
|
|
1921
|
+
popupInfo: r
|
|
1922
|
+
};
|
|
1923
|
+
}
|
|
1924
|
+
}), [["render", function(e, t, n, a, i, u) {
|
|
1925
|
+
const d = O("VanPicker"), c = O("VanPopup"), f = O("VanField");
|
|
1926
|
+
return e.hide ? l("", !0) : (m(), o(f, p({
|
|
1927
|
+
key: 0,
|
|
1928
|
+
name: e.field,
|
|
1929
|
+
disabled: e.globalDisabled || e.disabled,
|
|
1930
|
+
readonly: !0,
|
|
1931
|
+
"is-link": e.isLink,
|
|
1932
|
+
"model-value": e.showText
|
|
1933
|
+
}, e.$attrs, { onClick: e.clickHandle }), r({
|
|
1934
|
+
extra: S(() => [s(c, p({
|
|
1935
|
+
show: e.popupInfo.visible,
|
|
1936
|
+
"onUpdate:show": t[3] || (t[3] = (t) => e.popupInfo.visible = t),
|
|
1937
|
+
teleport: "body",
|
|
1938
|
+
round: "",
|
|
1939
|
+
position: "bottom"
|
|
1940
|
+
}, e.popupProps, w(e.popupOn), { onClose: e.popupInfo.close }), {
|
|
1941
|
+
default: S(() => [s(d, p({
|
|
1942
|
+
"model-value": e.checked,
|
|
1943
|
+
columns: e.finalOption
|
|
1944
|
+
}, e.pickerProps, w(e.pickerOn), {
|
|
1945
|
+
onChange: t[0] || (t[0] = (t) => e.pickerHandle("change", t)),
|
|
1946
|
+
onConfirm: t[1] || (t[1] = (t) => e.pickerHandle("confirm", t)),
|
|
1947
|
+
onCancel: t[2] || (t[2] = (t) => e.pickerHandle("cancel", t))
|
|
1948
|
+
}), r({ _: 2 }, [g(e.pickerSlots, (t, n) => ({
|
|
1949
|
+
name: e.hyphenate(n),
|
|
1950
|
+
fn: S((n) => [(m(), o(P(e.getNode(t)), p(e.slotProps, n), null, 16))])
|
|
1951
|
+
}))]), 1040, ["model-value", "columns"])]),
|
|
1952
|
+
_: 1
|
|
1953
|
+
}, 16, ["show", "onClose"])]),
|
|
1954
|
+
_: 2
|
|
1955
|
+
}, [g(e.slots, (t, n) => ({
|
|
1956
|
+
name: e.hyphenate(n),
|
|
1957
|
+
fn: S((n) => [(m(), o(P(e.getNode(t)), p(e.slotProps, n), null, 16))])
|
|
1958
|
+
}))]), 1040, [
|
|
1959
|
+
"name",
|
|
1960
|
+
"disabled",
|
|
1961
|
+
"is-link",
|
|
1962
|
+
"model-value",
|
|
1963
|
+
"onClick"
|
|
1964
|
+
]));
|
|
1965
|
+
}]]);
|
|
1966
|
+
function Pn() {
|
|
1967
|
+
return {
|
|
1968
|
+
...$e,
|
|
1969
|
+
..._e,
|
|
1970
|
+
label: { type: String },
|
|
1971
|
+
radioGroupProps: { type: Object },
|
|
1972
|
+
radioGroupOn: {
|
|
1973
|
+
type: Object,
|
|
1974
|
+
default: () => ({})
|
|
1975
|
+
},
|
|
1976
|
+
labelKey: {
|
|
1977
|
+
type: String,
|
|
1978
|
+
default: "label"
|
|
1979
|
+
},
|
|
1980
|
+
valueKey: {
|
|
1981
|
+
type: String,
|
|
1982
|
+
default: "value"
|
|
1983
|
+
},
|
|
1984
|
+
cancelable: { type: Boolean },
|
|
1985
|
+
radioProps: { type: Object },
|
|
1986
|
+
radioOn: {
|
|
1987
|
+
type: Object,
|
|
1988
|
+
default: () => ({})
|
|
1989
|
+
},
|
|
1990
|
+
radioSlots: { type: Object }
|
|
1991
|
+
};
|
|
1992
|
+
}
|
|
1993
|
+
var Vn = Pn(), wn = {
|
|
1994
|
+
...q.props,
|
|
1995
|
+
...Vn
|
|
1996
|
+
};
|
|
1997
|
+
function jn() {
|
|
1998
|
+
return {};
|
|
1999
|
+
}
|
|
2000
|
+
var Cn = {}, Sn = {
|
|
2001
|
+
...q.emits,
|
|
2002
|
+
...Cn
|
|
2003
|
+
};
|
|
2004
|
+
var Rn = Qe(u({
|
|
2005
|
+
name: "HRadioGroup",
|
|
2006
|
+
components: {
|
|
2007
|
+
VanField: q,
|
|
2008
|
+
VanRadio: G,
|
|
2009
|
+
VanRadioGroup: K
|
|
2010
|
+
},
|
|
2011
|
+
inheritAttrs: !1,
|
|
2012
|
+
props: Vn,
|
|
2013
|
+
emits: Cn,
|
|
2014
|
+
slots: Object,
|
|
2015
|
+
setup(e, t) {
|
|
2016
|
+
const n = xe(e), { slotProps: o } = Ue(e, 0, n);
|
|
2017
|
+
return {
|
|
2018
|
+
hyphenate: ke,
|
|
2019
|
+
getNode: ve,
|
|
2020
|
+
...n,
|
|
2021
|
+
slotProps: o,
|
|
2022
|
+
change: function(t) {
|
|
2023
|
+
e.cancelable ? n.change(n.checked.value === t ? void 0 : t) : n.change(t);
|
|
2024
|
+
}
|
|
2025
|
+
};
|
|
2026
|
+
}
|
|
2027
|
+
}), [["render", function(e, n, u, d, c, f) {
|
|
2028
|
+
const y = O("VanRadio"), h = O("VanRadioGroup"), b = O("VanField");
|
|
2029
|
+
return e.hide ? l("", !0) : (m(), o(b, p({
|
|
2030
|
+
key: 0,
|
|
2031
|
+
name: e.field,
|
|
2032
|
+
label: e.label,
|
|
2033
|
+
"model-value": e.checked,
|
|
2034
|
+
disabled: e.globalDisabled || e.disabled,
|
|
2035
|
+
readonly: e.globalReadonly || e.readonly
|
|
2036
|
+
}, e.$attrs), r({
|
|
2037
|
+
input: S(() => [s(h, p({
|
|
2038
|
+
name: e.field,
|
|
2039
|
+
"model-value": e.checked,
|
|
2040
|
+
disabled: e.globalDisabled || e.disabled || e.globalReadonly || e.readonly
|
|
2041
|
+
}, e.radioGroupProps, w(e.radioGroupOn), { "onUpdate:modelValue": e.change }), {
|
|
2042
|
+
default: S(() => [(m(!0), a(t, null, g(e.finalOption, (t) => (m(), o(y, p({
|
|
2043
|
+
key: t[e.valueKey],
|
|
2044
|
+
name: t[e.valueKey]
|
|
2045
|
+
}, { ref_for: !0 }, e.radioProps, w(e.radioOn)), r({
|
|
2046
|
+
default: S(() => [i(V(t[e.labelKey]) + " ", 1)]),
|
|
2047
|
+
_: 2
|
|
2048
|
+
}, [g(e.radioSlots, (n, l) => ({
|
|
2049
|
+
name: e.hyphenate(l),
|
|
2050
|
+
fn: S((l) => [(m(), o(P(e.getNode(n)), p({ ref_for: !0 }, e.slotProps, { item: t }, { ref_for: !0 }, l), null, 16, ["item"]))])
|
|
2051
|
+
}))]), 1040, ["name"]))), 128))]),
|
|
2052
|
+
_: 1
|
|
2053
|
+
}, 16, [
|
|
2054
|
+
"name",
|
|
2055
|
+
"model-value",
|
|
2056
|
+
"disabled",
|
|
2057
|
+
"onUpdate:modelValue"
|
|
2058
|
+
])]),
|
|
2059
|
+
_: 2
|
|
2060
|
+
}, [g(e.slots, (t, n) => ({
|
|
2061
|
+
name: e.hyphenate(n),
|
|
2062
|
+
fn: S((n) => [(m(), o(P(e.getNode(t)), p(e.slotProps, n), null, 16))])
|
|
2063
|
+
}))]), 1040, [
|
|
2064
|
+
"name",
|
|
2065
|
+
"label",
|
|
2066
|
+
"model-value",
|
|
2067
|
+
"disabled",
|
|
2068
|
+
"readonly"
|
|
2069
|
+
]));
|
|
2070
|
+
}]]);
|
|
2071
|
+
function Fn() {
|
|
2072
|
+
return {
|
|
2073
|
+
...$e,
|
|
2074
|
+
..._e,
|
|
2075
|
+
label: { type: String },
|
|
2076
|
+
radioProps: { type: Object },
|
|
2077
|
+
radioOn: {
|
|
2078
|
+
type: Object,
|
|
2079
|
+
default: () => ({})
|
|
2080
|
+
},
|
|
2081
|
+
radioSlots: { type: Object },
|
|
2082
|
+
cancelable: {
|
|
2083
|
+
type: Boolean,
|
|
2084
|
+
default: !0
|
|
2085
|
+
}
|
|
2086
|
+
};
|
|
2087
|
+
}
|
|
2088
|
+
var Hn = Fn(), An = {
|
|
2089
|
+
...q.props,
|
|
2090
|
+
...Hn
|
|
2091
|
+
};
|
|
2092
|
+
function xn() {
|
|
2093
|
+
return {};
|
|
2094
|
+
}
|
|
2095
|
+
var _n = {}, In = {
|
|
2096
|
+
...q.emits,
|
|
2097
|
+
..._n
|
|
2098
|
+
};
|
|
2099
|
+
var Nn = Qe(u({
|
|
2100
|
+
name: "HRadio",
|
|
2101
|
+
components: {
|
|
2102
|
+
VanField: q,
|
|
2103
|
+
VanRadio: G,
|
|
2104
|
+
VanRadioGroup: K
|
|
2105
|
+
},
|
|
2106
|
+
inheritAttrs: !1,
|
|
2107
|
+
props: Hn,
|
|
2108
|
+
emits: _n,
|
|
2109
|
+
slots: Object,
|
|
2110
|
+
setup(e, t) {
|
|
2111
|
+
const n = xe(e), { slotProps: o } = Ue(e, 0, n);
|
|
2112
|
+
return {
|
|
2113
|
+
hyphenate: ke,
|
|
2114
|
+
getNode: ve,
|
|
2115
|
+
...n,
|
|
2116
|
+
slotProps: o,
|
|
2117
|
+
change: function(t) {
|
|
2118
|
+
e.cancelable ? n.change(n.checked.value === t ? void 0 : t) : n.change(t);
|
|
2119
|
+
}
|
|
2120
|
+
};
|
|
2121
|
+
}
|
|
2122
|
+
}), [["render", function(e, t, n, a, i, u) {
|
|
2123
|
+
const d = O("VanRadio"), c = O("VanField");
|
|
2124
|
+
return e.hide ? l("", !0) : (m(), o(c, p({
|
|
2125
|
+
key: 0,
|
|
2126
|
+
name: e.field,
|
|
2127
|
+
label: e.label,
|
|
2128
|
+
disabled: e.globalDisabled || e.disabled,
|
|
2129
|
+
readonly: e.globalReadonly || e.readonly
|
|
2130
|
+
}, e.$attrs), r({
|
|
2131
|
+
input: S(() => [s(d, p({
|
|
2132
|
+
name: e.field,
|
|
2133
|
+
"model-value": e.checked,
|
|
2134
|
+
disabled: e.globalDisabled || e.disabled || e.globalReadonly || e.readonly
|
|
2135
|
+
}, e.radioProps, w(e.radioOn), { "onUpdate:modelValue": e.change }), r({ _: 2 }, [g(e.radioSlots, (t, n) => ({
|
|
2136
|
+
name: e.hyphenate(n),
|
|
2137
|
+
fn: S((n) => [(m(), o(P(e.getNode(t)), p(e.slotProps, n), null, 16))])
|
|
2138
|
+
}))]), 1040, [
|
|
2139
|
+
"name",
|
|
2140
|
+
"model-value",
|
|
2141
|
+
"disabled",
|
|
2142
|
+
"onUpdate:modelValue"
|
|
2143
|
+
])]),
|
|
2144
|
+
_: 2
|
|
2145
|
+
}, [g(e.slots, (t, n) => ({
|
|
2146
|
+
name: e.hyphenate(n),
|
|
2147
|
+
fn: S((n) => [(m(), o(P(e.getNode(t)), p(e.slotProps, n), null, 16))])
|
|
2148
|
+
}))]), 1040, [
|
|
2149
|
+
"name",
|
|
2150
|
+
"label",
|
|
2151
|
+
"disabled",
|
|
2152
|
+
"readonly"
|
|
2153
|
+
]));
|
|
2154
|
+
}]]);
|
|
2155
|
+
function qn() {
|
|
2156
|
+
return {
|
|
2157
|
+
...$e,
|
|
2158
|
+
..._e,
|
|
2159
|
+
rateProps: { type: Object },
|
|
2160
|
+
rateOn: {
|
|
2161
|
+
type: Object,
|
|
2162
|
+
default: () => ({})
|
|
2163
|
+
},
|
|
2164
|
+
rateSlots: { type: Object }
|
|
2165
|
+
};
|
|
2166
|
+
}
|
|
2167
|
+
var Dn = qn(), Tn = {
|
|
2168
|
+
...q.props,
|
|
2169
|
+
...Dn
|
|
2170
|
+
};
|
|
2171
|
+
function Un() {
|
|
2172
|
+
return {};
|
|
2173
|
+
}
|
|
2174
|
+
var Bn = {}, $n = {
|
|
2175
|
+
...q.emits,
|
|
2176
|
+
...Bn
|
|
2177
|
+
};
|
|
2178
|
+
var En = Qe(u({
|
|
2179
|
+
name: "HRate",
|
|
2180
|
+
components: {
|
|
2181
|
+
VanField: q,
|
|
2182
|
+
VanRate: L
|
|
2183
|
+
},
|
|
2184
|
+
inheritAttrs: !1,
|
|
2185
|
+
props: Dn,
|
|
2186
|
+
emits: Bn,
|
|
2187
|
+
slots: Object,
|
|
2188
|
+
setup(e, t) {
|
|
2189
|
+
const n = xe(e), { slotProps: o } = Ue(e, 0, n);
|
|
2190
|
+
return {
|
|
2191
|
+
hyphenate: ke,
|
|
2192
|
+
getNode: ve,
|
|
2193
|
+
...n,
|
|
2194
|
+
slotProps: o
|
|
2195
|
+
};
|
|
2196
|
+
}
|
|
2197
|
+
}), [["render", function(e, t, n, a, i, u) {
|
|
2198
|
+
const d = O("VanRate"), c = O("VanField");
|
|
2199
|
+
return e.hide ? l("", !0) : (m(), o(c, p({
|
|
2200
|
+
key: 0,
|
|
2201
|
+
name: e.field,
|
|
2202
|
+
"model-value": e.checked,
|
|
2203
|
+
disabled: e.globalDisabled || e.disabled,
|
|
2204
|
+
readonly: e.globalReadonly || e.readonly
|
|
2205
|
+
}, e.$attrs), r({
|
|
2206
|
+
input: S(() => [s(d, p({
|
|
2207
|
+
disabled: e.globalDisabled || e.disabled,
|
|
2208
|
+
readonly: e.globalReadonly || e.readonly,
|
|
2209
|
+
"model-value": e.checked
|
|
2210
|
+
}, e.rateProps, w(e.rateOn), { "onUpdate:modelValue": e.change }), r({ _: 2 }, [g(e.rateSlots, (t, n) => ({
|
|
2211
|
+
name: e.hyphenate(n),
|
|
2212
|
+
fn: S((n) => [(m(), o(P(e.getNode(t)), p(e.slotProps, n), null, 16))])
|
|
2213
|
+
}))]), 1040, [
|
|
2214
|
+
"disabled",
|
|
2215
|
+
"readonly",
|
|
2216
|
+
"model-value",
|
|
2217
|
+
"onUpdate:modelValue"
|
|
2218
|
+
])]),
|
|
2219
|
+
_: 2
|
|
2220
|
+
}, [g(e.slots, (t, n) => ({
|
|
2221
|
+
name: e.hyphenate(n),
|
|
2222
|
+
fn: S((n) => [(m(), o(P(e.getNode(t)), p(e.slotProps, n), null, 16))])
|
|
2223
|
+
}))]), 1040, [
|
|
2224
|
+
"name",
|
|
2225
|
+
"model-value",
|
|
2226
|
+
"disabled",
|
|
2227
|
+
"readonly"
|
|
2228
|
+
]));
|
|
2229
|
+
}]]);
|
|
2230
|
+
function Gn() {
|
|
2231
|
+
return {
|
|
2232
|
+
...$e,
|
|
2233
|
+
..._e,
|
|
2234
|
+
renderField: {
|
|
2235
|
+
type: Boolean,
|
|
2236
|
+
default: !0
|
|
2237
|
+
},
|
|
2238
|
+
signatureProps: { type: Object },
|
|
2239
|
+
signatureOn: {
|
|
2240
|
+
type: Object,
|
|
2241
|
+
default: () => ({})
|
|
2242
|
+
},
|
|
2243
|
+
signatureSlots: { type: Object },
|
|
2244
|
+
submitAtEnd: {
|
|
2245
|
+
type: Boolean,
|
|
2246
|
+
default: !0
|
|
2247
|
+
},
|
|
2248
|
+
valueFormat: {
|
|
2249
|
+
type: Function,
|
|
2250
|
+
default: (e) => e
|
|
2251
|
+
},
|
|
2252
|
+
format: {
|
|
2253
|
+
type: Function,
|
|
2254
|
+
default: Yn
|
|
2255
|
+
}
|
|
2256
|
+
};
|
|
2257
|
+
}
|
|
2258
|
+
var Kn = Gn(), Ln = {
|
|
2259
|
+
...q.props,
|
|
2260
|
+
...Kn
|
|
2261
|
+
};
|
|
2262
|
+
function Mn() {
|
|
2263
|
+
return { load: (e) => !0 };
|
|
2264
|
+
}
|
|
2265
|
+
var Wn = { load: (e) => !0 }, Qn = {
|
|
2266
|
+
...q.emits,
|
|
2267
|
+
...Wn
|
|
2268
|
+
};
|
|
2269
|
+
function Yn(e) {
|
|
2270
|
+
return e ? "string" == typeof e ? e : e instanceof Blob ? URL.createObjectURL(e) : e.image : "";
|
|
2271
|
+
}
|
|
2272
|
+
var zn = "undefined" != typeof window ? window.devicePixelRatio : 1;
|
|
2273
|
+
function Jn(e) {
|
|
2274
|
+
return {
|
|
2275
|
+
width: e.offsetWidth * zn,
|
|
2276
|
+
height: e.offsetHeight * zn
|
|
2277
|
+
};
|
|
2278
|
+
}
|
|
2279
|
+
function Xn(e) {
|
|
2280
|
+
"string" == typeof e && "blob:" === e.slice(0, 5) && URL.revokeObjectURL(e);
|
|
2281
|
+
}
|
|
2282
|
+
var Zn = u({
|
|
2283
|
+
name: "HSignaturePure",
|
|
2284
|
+
components: {
|
|
2285
|
+
VanField: q,
|
|
2286
|
+
VanSignature: M
|
|
2287
|
+
},
|
|
2288
|
+
inheritAttrs: !1,
|
|
2289
|
+
props: Kn,
|
|
2290
|
+
emits: Wn,
|
|
2291
|
+
slots: Object,
|
|
2292
|
+
setup(e, t) {
|
|
2293
|
+
const o = j("signatureRef"), l = xe(e);
|
|
2294
|
+
l.on("reset", () => d);
|
|
2295
|
+
const a = n(() => e.format(l.checked.value));
|
|
2296
|
+
C(a, (e, t) => t && Xn(t)), h(() => a.value && Xn(a.value));
|
|
2297
|
+
const r = v(!1);
|
|
2298
|
+
function i(e) {
|
|
2299
|
+
r.value || function(e) {
|
|
2300
|
+
const t = e.canvas;
|
|
2301
|
+
if (!t || !e.src) return;
|
|
2302
|
+
const n = e.ctx || t.getContext("2d");
|
|
2303
|
+
if (!n) return;
|
|
2304
|
+
const o = new Image();
|
|
2305
|
+
o.onload = () => {
|
|
2306
|
+
if (!1 === e.allowPaint?.()) return;
|
|
2307
|
+
const { width: l, height: a } = Jn(t);
|
|
2308
|
+
n.clearRect(0, 0, l, a), n.drawImage(o, 0, 0, l / zn, a / zn);
|
|
2309
|
+
}, o.src = e.src;
|
|
2310
|
+
}({
|
|
2311
|
+
...c(),
|
|
2312
|
+
src: e,
|
|
2313
|
+
allowPaint: () => e === a.value
|
|
2314
|
+
});
|
|
2315
|
+
}
|
|
2316
|
+
b(() => i(a.value)), C(a, i);
|
|
2317
|
+
const { slotProps: s } = Ue(e, 0, l), u = v(!1);
|
|
2318
|
+
function d() {
|
|
2319
|
+
if (!o.value) return;
|
|
2320
|
+
let t = a.value;
|
|
2321
|
+
if (o.value.clear) u.value = !0, f(() => u.value = !1), o.value.clear();
|
|
2322
|
+
else {
|
|
2323
|
+
const { canvas: t, ctx: n } = c();
|
|
2324
|
+
if (!t || !n) return;
|
|
2325
|
+
const { width: o, height: l } = Jn(t);
|
|
2326
|
+
n.clearRect(0, 0, o, l), n.closePath();
|
|
2327
|
+
const a = e.signatureProps?.backgroundColor;
|
|
2328
|
+
a && (n.fillStyle = a, n.fillRect(0, 0, o, l));
|
|
2329
|
+
}
|
|
2330
|
+
f(() => t === a.value && i(t));
|
|
2331
|
+
}
|
|
2332
|
+
function c() {
|
|
2333
|
+
const e = o.value?.$el?.getElementsByTagName("canvas")[0];
|
|
2334
|
+
return {
|
|
2335
|
+
canvas: e,
|
|
2336
|
+
ctx: e?.getContext("2d")
|
|
2337
|
+
};
|
|
2338
|
+
}
|
|
2339
|
+
return t.emit("load", l), {
|
|
2340
|
+
hyphenate: ke,
|
|
2341
|
+
getNode: ve,
|
|
2342
|
+
...l,
|
|
2343
|
+
change: function(t) {
|
|
2344
|
+
r.value = !0, l.change(e.valueFormat(t)), f(() => r.value = !1);
|
|
2345
|
+
},
|
|
2346
|
+
slotProps: s,
|
|
2347
|
+
signatureRef: o,
|
|
2348
|
+
imgSrc: a,
|
|
2349
|
+
clear: function() {
|
|
2350
|
+
u.value || l.change(void 0);
|
|
2351
|
+
},
|
|
2352
|
+
end: function() {
|
|
2353
|
+
e.submitAtEnd && o.value?.submit?.();
|
|
2354
|
+
}
|
|
2355
|
+
};
|
|
2356
|
+
}
|
|
2357
|
+
}), eo = ["src"], to = { key: 2 };
|
|
2358
|
+
var no = Qe(u({
|
|
2359
|
+
name: "HSignature",
|
|
2360
|
+
components: {
|
|
2361
|
+
VanField: q,
|
|
2362
|
+
VanSignature: M,
|
|
2363
|
+
HSignaturePure: Qe(Zn, [["render", function(e, t, n, l, i, s) {
|
|
2364
|
+
const u = O("VanSignature");
|
|
2365
|
+
return e.globalDisabled || e.disabled || e.globalReadonly || e.readonly ? e.imgSrc ? (m(), a("img", {
|
|
2366
|
+
key: 1,
|
|
2367
|
+
src: e.imgSrc,
|
|
2368
|
+
style: { padding: "var(--van-signature-padding)" }
|
|
2369
|
+
}, null, 8, eo)) : (m(), a("i", to)) : (m(), o(u, p({
|
|
2370
|
+
key: 0,
|
|
2371
|
+
ref: "signatureRef"
|
|
2372
|
+
}, e.signatureProps, w(e.signatureOn), {
|
|
2373
|
+
onEnd: e.end,
|
|
2374
|
+
onSubmit: e.change,
|
|
2375
|
+
onClear: e.clear
|
|
2376
|
+
}), r({ _: 2 }, [g(e.signatureSlots, (t, n) => ({
|
|
2377
|
+
name: e.hyphenate(n),
|
|
2378
|
+
fn: S((n) => [(m(), o(P(e.getNode(t)), p(e.slotProps, n), null, 16))])
|
|
2379
|
+
}))]), 1040, [
|
|
2380
|
+
"onEnd",
|
|
2381
|
+
"onSubmit",
|
|
2382
|
+
"onClear"
|
|
2383
|
+
]));
|
|
2384
|
+
}]])
|
|
2385
|
+
},
|
|
2386
|
+
inheritAttrs: !1,
|
|
2387
|
+
props: Kn,
|
|
2388
|
+
emits: Wn,
|
|
2389
|
+
setup(e, t) {
|
|
2390
|
+
const o = n(() => ({
|
|
2391
|
+
...e,
|
|
2392
|
+
...t.attrs
|
|
2393
|
+
})), l = Ae(), a = n(() => e.disabled || l?.disabled?.value), r = n(() => e.readonly || l?.readonly?.value), i = v(null);
|
|
2394
|
+
return {
|
|
2395
|
+
hyphenate: ke,
|
|
2396
|
+
getNode: ve,
|
|
2397
|
+
allAttrs: o,
|
|
2398
|
+
finalDisabled: a,
|
|
2399
|
+
finalReadonly: r,
|
|
2400
|
+
plain: i,
|
|
2401
|
+
load: function(e) {
|
|
2402
|
+
i.value = e;
|
|
2403
|
+
}
|
|
2404
|
+
};
|
|
2405
|
+
}
|
|
2406
|
+
}), [["render", function(e, t, n, a, i, u) {
|
|
2407
|
+
const d = O("HSignaturePure"), c = O("VanField");
|
|
2408
|
+
return e.renderField && !e.hide ? (m(), o(c, p({
|
|
2409
|
+
key: 0,
|
|
2410
|
+
name: e.field,
|
|
2411
|
+
disabled: e.finalDisabled,
|
|
2412
|
+
readonly: e.finalReadonly
|
|
2413
|
+
}, e.$attrs), r({
|
|
2414
|
+
input: S(() => [s(d, p(e.allAttrs, { onLoad: e.load }), null, 16, ["onLoad"])]),
|
|
2415
|
+
_: 2
|
|
2416
|
+
}, [g(e.slots, (t, n) => ({
|
|
2417
|
+
name: e.hyphenate(n),
|
|
2418
|
+
fn: S((n) => [e.plain ? (m(), o(P(e.getNode(t)), p({
|
|
2419
|
+
key: 0,
|
|
2420
|
+
plain: e.plain,
|
|
2421
|
+
props: e.$props
|
|
2422
|
+
}, n), null, 16, ["plain", "props"])) : l("", !0)])
|
|
2423
|
+
}))]), 1040, [
|
|
2424
|
+
"name",
|
|
2425
|
+
"disabled",
|
|
2426
|
+
"readonly"
|
|
2427
|
+
])) : e.hide ? l("", !0) : (m(), o(d, y(p({ key: 1 }, e.allAttrs)), null, 16));
|
|
2428
|
+
}]]);
|
|
2429
|
+
function oo() {
|
|
2430
|
+
return {
|
|
2431
|
+
...$e,
|
|
2432
|
+
..._e,
|
|
2433
|
+
sliderProps: { type: Object },
|
|
2434
|
+
sliderOn: {
|
|
2435
|
+
type: Object,
|
|
2436
|
+
default: () => ({})
|
|
2437
|
+
},
|
|
2438
|
+
sliderSlots: { type: Object }
|
|
2439
|
+
};
|
|
2440
|
+
}
|
|
2441
|
+
var lo = oo(), ao = {
|
|
2442
|
+
...q.props,
|
|
2443
|
+
...lo
|
|
2444
|
+
};
|
|
2445
|
+
function ro() {
|
|
2446
|
+
return {};
|
|
2447
|
+
}
|
|
2448
|
+
var io = {}, so = {
|
|
2449
|
+
...q.emits,
|
|
2450
|
+
...io
|
|
2451
|
+
};
|
|
2452
|
+
var uo = Qe(u({
|
|
2453
|
+
name: "HSlider",
|
|
2454
|
+
components: {
|
|
2455
|
+
VanField: q,
|
|
2456
|
+
VanSlider: W
|
|
2457
|
+
},
|
|
2458
|
+
inheritAttrs: !1,
|
|
2459
|
+
props: lo,
|
|
2460
|
+
emits: io,
|
|
2461
|
+
slots: Object,
|
|
2462
|
+
setup(e, t) {
|
|
2463
|
+
const n = xe(e), { slotProps: o } = Ue(e, 0, n);
|
|
2464
|
+
return {
|
|
2465
|
+
hyphenate: ke,
|
|
2466
|
+
getNode: ve,
|
|
2467
|
+
...n,
|
|
2468
|
+
slotProps: o
|
|
2469
|
+
};
|
|
2470
|
+
}
|
|
2471
|
+
}), [["render", function(e, t, n, a, i, u) {
|
|
2472
|
+
const d = O("VanSlider"), c = O("VanField");
|
|
2473
|
+
return e.hide ? l("", !0) : (m(), o(c, p({
|
|
2474
|
+
key: 0,
|
|
2475
|
+
name: e.field,
|
|
2476
|
+
"model-value": e.checked,
|
|
2477
|
+
disabled: e.globalDisabled || e.disabled,
|
|
2478
|
+
readonly: e.globalReadonly || e.readonly
|
|
2479
|
+
}, e.$attrs), r({
|
|
2480
|
+
input: S(() => [s(d, p({
|
|
2481
|
+
disabled: e.globalDisabled || e.disabled,
|
|
2482
|
+
readonly: e.globalReadonly || e.readonly,
|
|
2483
|
+
"model-value": e.checked
|
|
2484
|
+
}, e.sliderProps, w(e.sliderOn), { "onUpdate:modelValue": e.change }), r({ _: 2 }, [g(e.sliderSlots, (t, n) => ({
|
|
2485
|
+
name: e.hyphenate(n),
|
|
2486
|
+
fn: S((n) => [(m(), o(P(e.getNode(t)), p(e.slotProps, n), null, 16))])
|
|
2487
|
+
}))]), 1040, [
|
|
2488
|
+
"disabled",
|
|
2489
|
+
"readonly",
|
|
2490
|
+
"model-value",
|
|
2491
|
+
"onUpdate:modelValue"
|
|
2492
|
+
])]),
|
|
2493
|
+
_: 2
|
|
2494
|
+
}, [g(e.slots, (t, n) => ({
|
|
2495
|
+
name: e.hyphenate(n),
|
|
2496
|
+
fn: S((n) => [(m(), o(P(e.getNode(t)), p(e.slotProps, n), null, 16))])
|
|
2497
|
+
}))]), 1040, [
|
|
2498
|
+
"name",
|
|
2499
|
+
"model-value",
|
|
2500
|
+
"disabled",
|
|
2501
|
+
"readonly"
|
|
2502
|
+
]));
|
|
2503
|
+
}]]);
|
|
2504
|
+
function co() {
|
|
2505
|
+
return {
|
|
2506
|
+
...$e,
|
|
2507
|
+
..._e,
|
|
2508
|
+
stepperProps: { type: Object },
|
|
2509
|
+
stepperOn: {
|
|
2510
|
+
type: Object,
|
|
2511
|
+
default: () => ({})
|
|
2512
|
+
},
|
|
2513
|
+
stepperSlots: { type: Object }
|
|
2514
|
+
};
|
|
2515
|
+
}
|
|
2516
|
+
var po = co(), fo = {
|
|
2517
|
+
...q.props,
|
|
2518
|
+
...po
|
|
2519
|
+
};
|
|
2520
|
+
function yo() {
|
|
2521
|
+
return {};
|
|
2522
|
+
}
|
|
2523
|
+
var ho = {}, bo = {
|
|
2524
|
+
...q.emits,
|
|
2525
|
+
...ho
|
|
2526
|
+
};
|
|
2527
|
+
var mo = Qe(u({
|
|
2528
|
+
name: "HStepper",
|
|
2529
|
+
components: {
|
|
2530
|
+
VanField: q,
|
|
2531
|
+
VanStepper: Q
|
|
2532
|
+
},
|
|
2533
|
+
inheritAttrs: !1,
|
|
2534
|
+
props: po,
|
|
2535
|
+
emits: ho,
|
|
2536
|
+
slots: Object,
|
|
2537
|
+
setup(e, t) {
|
|
2538
|
+
const n = xe(e), { slotProps: o } = Ue(e, 0, n);
|
|
2539
|
+
return {
|
|
2540
|
+
hyphenate: ke,
|
|
2541
|
+
getNode: ve,
|
|
2542
|
+
...n,
|
|
2543
|
+
slotProps: o
|
|
2544
|
+
};
|
|
2545
|
+
}
|
|
2546
|
+
}), [["render", function(e, t, n, a, i, u) {
|
|
2547
|
+
const d = O("VanStepper"), c = O("VanField");
|
|
2548
|
+
return e.hide ? l("", !0) : (m(), o(c, p({
|
|
2549
|
+
key: 0,
|
|
2550
|
+
name: e.field,
|
|
2551
|
+
"model-value": e.checked,
|
|
2552
|
+
disabled: e.globalDisabled || e.disabled,
|
|
2553
|
+
readonly: e.globalReadonly || e.readonly
|
|
2554
|
+
}, e.$attrs), r({
|
|
2555
|
+
input: S(() => [s(d, p({
|
|
2556
|
+
disabled: e.globalDisabled || e.disabled || e.globalReadonly || e.readonly,
|
|
2557
|
+
"model-value": e.checked
|
|
2558
|
+
}, e.stepperProps, w(e.stepperOn), { "onUpdate:modelValue": e.change }), r({ _: 2 }, [g(e.stepperSlots, (t, n) => ({
|
|
2559
|
+
name: e.hyphenate(n),
|
|
2560
|
+
fn: S((n) => [(m(), o(P(e.getNode(t)), p(e.slotProps, n), null, 16))])
|
|
2561
|
+
}))]), 1040, [
|
|
2562
|
+
"disabled",
|
|
2563
|
+
"model-value",
|
|
2564
|
+
"onUpdate:modelValue"
|
|
2565
|
+
])]),
|
|
2566
|
+
_: 2
|
|
2567
|
+
}, [g(e.slots, (t, n) => ({
|
|
2568
|
+
name: e.hyphenate(n),
|
|
2569
|
+
fn: S((n) => [(m(), o(P(e.getNode(t)), p(e.slotProps, n), null, 16))])
|
|
2570
|
+
}))]), 1040, [
|
|
2571
|
+
"name",
|
|
2572
|
+
"model-value",
|
|
2573
|
+
"disabled",
|
|
2574
|
+
"readonly"
|
|
2575
|
+
]));
|
|
2576
|
+
}]]);
|
|
2577
|
+
function vo() {
|
|
2578
|
+
return {
|
|
2579
|
+
...$e,
|
|
2580
|
+
..._e,
|
|
2581
|
+
switchProps: { type: Object },
|
|
2582
|
+
switchOn: {
|
|
2583
|
+
type: Object,
|
|
2584
|
+
default: () => ({})
|
|
2585
|
+
},
|
|
2586
|
+
switchSlots: { type: Object }
|
|
2587
|
+
};
|
|
2588
|
+
}
|
|
2589
|
+
var go = vo(), ko = {
|
|
2590
|
+
...q.props,
|
|
2591
|
+
...go
|
|
2592
|
+
};
|
|
2593
|
+
function Oo() {
|
|
2594
|
+
return {};
|
|
2595
|
+
}
|
|
2596
|
+
var Po = {}, Vo = {
|
|
2597
|
+
...q.emits,
|
|
2598
|
+
...Po
|
|
2599
|
+
};
|
|
2600
|
+
var wo = Qe(u({
|
|
2601
|
+
name: "HSwitch",
|
|
2602
|
+
components: {
|
|
2603
|
+
VanField: q,
|
|
2604
|
+
VanSwitch: Y
|
|
2605
|
+
},
|
|
2606
|
+
inheritAttrs: !1,
|
|
2607
|
+
props: go,
|
|
2608
|
+
emits: Po,
|
|
2609
|
+
slots: Object,
|
|
2610
|
+
setup(e, t) {
|
|
2611
|
+
const n = xe(e), { slotProps: o } = Ue(e, 0, n);
|
|
2612
|
+
return {
|
|
2613
|
+
hyphenate: ke,
|
|
2614
|
+
getNode: ve,
|
|
2615
|
+
...n,
|
|
2616
|
+
slotProps: o
|
|
2617
|
+
};
|
|
2618
|
+
}
|
|
2619
|
+
}), [["render", function(e, t, n, a, i, u) {
|
|
2620
|
+
const d = O("VanSwitch"), c = O("VanField");
|
|
2621
|
+
return e.hide ? l("", !0) : (m(), o(c, p({
|
|
2622
|
+
key: 0,
|
|
2623
|
+
name: e.field,
|
|
2624
|
+
disabled: e.globalDisabled || e.disabled,
|
|
2625
|
+
readonly: e.globalReadonly || e.readonly
|
|
2626
|
+
}, e.$attrs), r({
|
|
2627
|
+
input: S(() => [s(d, p({
|
|
2628
|
+
disabled: e.globalDisabled || e.disabled || e.globalReadonly || e.readonly,
|
|
2629
|
+
"model-value": e.checked
|
|
2630
|
+
}, e.switchProps, w(e.switchOn), { "onUpdate:modelValue": e.change }), r({ _: 2 }, [g(e.switchSlots, (t, n) => ({
|
|
2631
|
+
name: e.hyphenate(n),
|
|
2632
|
+
fn: S((n) => [(m(), o(P(e.getNode(t)), p(e.slotProps, n), null, 16))])
|
|
2633
|
+
}))]), 1040, [
|
|
2634
|
+
"disabled",
|
|
2635
|
+
"model-value",
|
|
2636
|
+
"onUpdate:modelValue"
|
|
2637
|
+
])]),
|
|
2638
|
+
_: 2
|
|
2639
|
+
}, [g(e.slots, (t, n) => ({
|
|
2640
|
+
name: e.hyphenate(n),
|
|
2641
|
+
fn: S((n) => [(m(), o(P(e.getNode(t)), p(e.slotProps, n), null, 16))])
|
|
2642
|
+
}))]), 1040, [
|
|
2643
|
+
"name",
|
|
2644
|
+
"disabled",
|
|
2645
|
+
"readonly"
|
|
2646
|
+
]));
|
|
2647
|
+
}]]);
|
|
2648
|
+
function jo() {
|
|
2649
|
+
return {
|
|
2650
|
+
...$e,
|
|
2651
|
+
..._e,
|
|
2652
|
+
timePickerProps: { type: Object },
|
|
2653
|
+
timePickerOn: {
|
|
2654
|
+
type: Object,
|
|
2655
|
+
default: () => ({})
|
|
2656
|
+
},
|
|
2657
|
+
timePickerSlots: { type: Object },
|
|
2658
|
+
isLink: {
|
|
2659
|
+
type: Boolean,
|
|
2660
|
+
default: !0
|
|
2661
|
+
},
|
|
2662
|
+
onRowClick: { type: Function },
|
|
2663
|
+
separator: {
|
|
2664
|
+
type: String,
|
|
2665
|
+
default: ":"
|
|
2666
|
+
},
|
|
2667
|
+
format: {
|
|
2668
|
+
type: Function,
|
|
2669
|
+
default: Ao
|
|
2670
|
+
},
|
|
2671
|
+
valueFormat: {
|
|
2672
|
+
type: Function,
|
|
2673
|
+
default: Ao
|
|
2674
|
+
},
|
|
2675
|
+
valueUnformat: {
|
|
2676
|
+
type: Function,
|
|
2677
|
+
default: xo
|
|
2678
|
+
},
|
|
2679
|
+
valueTrigger: {
|
|
2680
|
+
type: String,
|
|
2681
|
+
default: "confirm"
|
|
2682
|
+
},
|
|
2683
|
+
popupProps: { type: Object },
|
|
2684
|
+
popupOn: {
|
|
2685
|
+
type: Object,
|
|
2686
|
+
default: () => ({})
|
|
2687
|
+
}
|
|
2688
|
+
};
|
|
2689
|
+
}
|
|
2690
|
+
var Co = jo(), So = {
|
|
2691
|
+
...q.props,
|
|
2692
|
+
...Co
|
|
2693
|
+
};
|
|
2694
|
+
function Ro() {
|
|
2695
|
+
return {};
|
|
2696
|
+
}
|
|
2697
|
+
var Fo = {}, Ho = {
|
|
2698
|
+
...q.emits,
|
|
2699
|
+
...Fo
|
|
2700
|
+
};
|
|
2701
|
+
function Ao(e, t) {
|
|
2702
|
+
return e.join(t);
|
|
2703
|
+
}
|
|
2704
|
+
function xo(e, t) {
|
|
2705
|
+
return e ? Array.isArray(e) ? e : e.split(t) : [];
|
|
2706
|
+
}
|
|
2707
|
+
var _o = Qe(u({
|
|
2708
|
+
name: "HTimePicker",
|
|
2709
|
+
components: {
|
|
2710
|
+
VanField: q,
|
|
2711
|
+
VanPopup: E,
|
|
2712
|
+
VanTimePicker: z
|
|
2713
|
+
},
|
|
2714
|
+
inheritAttrs: !1,
|
|
2715
|
+
props: Co,
|
|
2716
|
+
emits: Fo,
|
|
2717
|
+
slots: Object,
|
|
2718
|
+
setup(e, t) {
|
|
2719
|
+
const n = xe(e), { slotProps: o } = Ue(e, 0, n), l = v(""), a = v([]);
|
|
2720
|
+
let r;
|
|
2721
|
+
function i(t, o) {
|
|
2722
|
+
switch (e.valueTrigger !== t && !1 !== e.timePickerProps?.showToolbar || (a.value = o.selectedValues, n.change(e.valueFormat(o.selectedValues, e.separator)), l.value = e.format(o.selectedValues, e.separator), r = n.checked.value, f(() => r = null)), t) {
|
|
2723
|
+
case "confirm":
|
|
2724
|
+
case "cancel": s.value.close();
|
|
2725
|
+
}
|
|
2726
|
+
}
|
|
2727
|
+
C(n.checked, (t) => {
|
|
2728
|
+
if (t === r) return r = null;
|
|
2729
|
+
r = null, a.value = t ? e.valueUnformat(t, e.separator) : [], l.value = a.value.length ? e.format(a.value, e.separator) : "";
|
|
2730
|
+
}, { immediate: !0 });
|
|
2731
|
+
const s = v({
|
|
2732
|
+
visible: !1,
|
|
2733
|
+
open() {
|
|
2734
|
+
s.value.visible = !0;
|
|
2735
|
+
},
|
|
2736
|
+
close() {
|
|
2737
|
+
s.value.visible = !1;
|
|
2738
|
+
}
|
|
2739
|
+
});
|
|
2740
|
+
return {
|
|
2741
|
+
hyphenate: ke,
|
|
2742
|
+
getNode: ve,
|
|
2743
|
+
...n,
|
|
2744
|
+
slotProps: o,
|
|
2745
|
+
showText: l,
|
|
2746
|
+
checkedArr: a,
|
|
2747
|
+
clickHandle: function(t) {
|
|
2748
|
+
n.globalDisabled.value || e.disabled || n.globalReadonly.value || e.readonly || (e.onRowClick ? e.onRowClick(s.value, t) : s.value.open());
|
|
2749
|
+
},
|
|
2750
|
+
changeHandle: i.bind(null, "change"),
|
|
2751
|
+
confirmHandle: i.bind(null, "confirm"),
|
|
2752
|
+
cancelHandle: i.bind(null, "cancel"),
|
|
2753
|
+
popupInfo: s
|
|
2754
|
+
};
|
|
2755
|
+
}
|
|
2756
|
+
}), [["render", function(e, t, n, a, i, u) {
|
|
2757
|
+
const d = O("VanTimePicker"), c = O("VanPopup"), f = O("VanField");
|
|
2758
|
+
return e.hide ? l("", !0) : (m(), o(f, p({
|
|
2759
|
+
key: 0,
|
|
2760
|
+
name: e.field,
|
|
2761
|
+
disabled: e.globalDisabled || e.disabled,
|
|
2762
|
+
readonly: !0,
|
|
2763
|
+
"is-link": e.isLink,
|
|
2764
|
+
"model-value": e.showText
|
|
2765
|
+
}, e.$attrs, { onClick: e.clickHandle }), r({
|
|
2766
|
+
extra: S(() => [s(c, p({
|
|
2767
|
+
show: e.popupInfo.visible,
|
|
2768
|
+
"onUpdate:show": t[0] || (t[0] = (t) => e.popupInfo.visible = t),
|
|
2769
|
+
teleport: "body",
|
|
2770
|
+
round: "",
|
|
2771
|
+
position: "bottom"
|
|
2772
|
+
}, e.popupProps, w(e.popupOn), { onClose: e.popupInfo.close }), {
|
|
2773
|
+
default: S(() => [s(d, p({ "model-value": e.checkedArr }, e.timePickerProps, w(e.timePickerOn), {
|
|
2774
|
+
onChange: e.changeHandle,
|
|
2775
|
+
onConfirm: e.confirmHandle,
|
|
2776
|
+
onCancel: e.cancelHandle
|
|
2777
|
+
}), r({ _: 2 }, [g(e.timePickerSlots, (t, n) => ({
|
|
2778
|
+
name: e.hyphenate(n),
|
|
2779
|
+
fn: S((n) => [(m(), o(P(e.getNode(t)), p(e.slotProps, n), null, 16))])
|
|
2780
|
+
}))]), 1040, [
|
|
2781
|
+
"model-value",
|
|
2782
|
+
"onChange",
|
|
2783
|
+
"onConfirm",
|
|
2784
|
+
"onCancel"
|
|
2785
|
+
])]),
|
|
2786
|
+
_: 1
|
|
2787
|
+
}, 16, ["show", "onClose"])]),
|
|
2788
|
+
_: 2
|
|
2789
|
+
}, [g(e.slots, (t, n) => ({
|
|
2790
|
+
name: e.hyphenate(n),
|
|
2791
|
+
fn: S((n) => [(m(), o(P(e.getNode(t)), p(e.slotProps, n), null, 16))])
|
|
2792
|
+
}))]), 1040, [
|
|
2793
|
+
"name",
|
|
2794
|
+
"disabled",
|
|
2795
|
+
"is-link",
|
|
2796
|
+
"model-value",
|
|
2797
|
+
"onClick"
|
|
2798
|
+
]));
|
|
2799
|
+
}]]);
|
|
2800
|
+
function Io() {
|
|
2801
|
+
return {
|
|
2802
|
+
...$e,
|
|
2803
|
+
..._e,
|
|
2804
|
+
treeSelectProps: { type: Object },
|
|
2805
|
+
treeSelectOn: {
|
|
2806
|
+
type: Object,
|
|
2807
|
+
default: () => ({})
|
|
2808
|
+
},
|
|
2809
|
+
treeSelectSlots: { type: Object },
|
|
2810
|
+
isLink: {
|
|
2811
|
+
type: Boolean,
|
|
2812
|
+
default: !0
|
|
2813
|
+
},
|
|
2814
|
+
onRowClick: { type: Function },
|
|
2815
|
+
separator: {
|
|
2816
|
+
type: String,
|
|
2817
|
+
default: ","
|
|
2818
|
+
},
|
|
2819
|
+
format: { type: Function },
|
|
2820
|
+
valueTrigger: {
|
|
2821
|
+
type: String,
|
|
2822
|
+
default: "confirm"
|
|
2823
|
+
},
|
|
2824
|
+
popupProps: { type: Object },
|
|
2825
|
+
popupOn: {
|
|
2826
|
+
type: Object,
|
|
2827
|
+
default: () => ({})
|
|
2828
|
+
}
|
|
2829
|
+
};
|
|
2830
|
+
}
|
|
2831
|
+
var No = Io(), qo = {
|
|
2832
|
+
...q.props,
|
|
2833
|
+
...No
|
|
2834
|
+
};
|
|
2835
|
+
function Do() {
|
|
2836
|
+
return {};
|
|
2837
|
+
}
|
|
2838
|
+
var To = {}, Uo = {
|
|
2839
|
+
...q.emits,
|
|
2840
|
+
...To
|
|
2841
|
+
};
|
|
2842
|
+
var Bo = Qe(u({
|
|
2843
|
+
name: "HTreeSelect",
|
|
2844
|
+
components: {
|
|
2845
|
+
VanTreeSelect: J,
|
|
2846
|
+
VanField: q,
|
|
2847
|
+
VanPopup: E
|
|
2848
|
+
},
|
|
2849
|
+
inheritAttrs: !1,
|
|
2850
|
+
props: No,
|
|
2851
|
+
emits: To,
|
|
2852
|
+
slots: Object,
|
|
2853
|
+
setup(e, t) {
|
|
2854
|
+
const o = xe(e), { slotProps: l } = Ue(e, 0, o), a = n(() => {
|
|
2855
|
+
const t = o.checked.value;
|
|
2856
|
+
if (!t) return "";
|
|
2857
|
+
const { format: n, separator: l } = e, a = e.treeSelectProps?.items || o.finalOption.value;
|
|
2858
|
+
if (n) return n({
|
|
2859
|
+
source: a,
|
|
2860
|
+
value: t,
|
|
2861
|
+
separator: l
|
|
2862
|
+
});
|
|
2863
|
+
const r = [];
|
|
2864
|
+
let i;
|
|
2865
|
+
return "string" == typeof t ? a.some((e) => (i = e.children.find((e) => e.id === t), i && r.push(i.text), !!i)) : t.forEach((e) => a.some((t) => (i = t.children.find((t) => t.id === e), i && r.push(i.text), !!i))), r.filter(Boolean).join(l);
|
|
2866
|
+
});
|
|
2867
|
+
const r = v(0);
|
|
2868
|
+
let i;
|
|
2869
|
+
C([o.checked, o.finalOption], ([e, t]) => {
|
|
2870
|
+
if (t?.length) if (i !== e) {
|
|
2871
|
+
if (i = null, r.value = 0, e && e.length) if ("string" == typeof e) {
|
|
2872
|
+
let n;
|
|
2873
|
+
t.some((t, o) => (n = t.children.some((t) => t.id === e), n && (r.value = o), n));
|
|
2874
|
+
} else {
|
|
2875
|
+
const n = e.map((e) => t.findIndex((t) => t.children.some((t) => t.id === e)));
|
|
2876
|
+
r.value = Math.max(0, Math.min(...n));
|
|
2877
|
+
}
|
|
2878
|
+
} else i = null;
|
|
2879
|
+
}, { immediate: !0 });
|
|
2880
|
+
const s = v({
|
|
2881
|
+
visible: !1,
|
|
2882
|
+
open() {
|
|
2883
|
+
s.value.visible = !0;
|
|
2884
|
+
},
|
|
2885
|
+
close() {
|
|
2886
|
+
s.value.visible = !1;
|
|
2887
|
+
}
|
|
2888
|
+
});
|
|
2889
|
+
return {
|
|
2890
|
+
hyphenate: ke,
|
|
2891
|
+
getNode: ve,
|
|
2892
|
+
...o,
|
|
2893
|
+
slotProps: l,
|
|
2894
|
+
showText: a,
|
|
2895
|
+
clickHandle: function(t) {
|
|
2896
|
+
o.globalDisabled.value || e.disabled || o.globalReadonly.value || e.readonly || (e.onRowClick ? e.onRowClick(s.value, t) : s.value.open());
|
|
2897
|
+
},
|
|
2898
|
+
mainActiveIndex: r,
|
|
2899
|
+
mainActiveIndexChange: function(e) {
|
|
2900
|
+
r.value = e;
|
|
2901
|
+
},
|
|
2902
|
+
activeIdChange: function(e) {
|
|
2903
|
+
o.change(e), i = o.checked.value, f(() => i = null);
|
|
2904
|
+
},
|
|
2905
|
+
popupInfo: s
|
|
2906
|
+
};
|
|
2907
|
+
}
|
|
2908
|
+
}), [["render", function(e, t, n, a, i, u) {
|
|
2909
|
+
const d = O("VanTreeSelect"), c = O("VanPopup"), f = O("VanField");
|
|
2910
|
+
return e.hide ? l("", !0) : (m(), o(f, p({
|
|
2911
|
+
key: 0,
|
|
2912
|
+
name: e.field,
|
|
2913
|
+
disabled: e.globalDisabled || e.disabled,
|
|
2914
|
+
readonly: !0,
|
|
2915
|
+
"is-link": e.isLink,
|
|
2916
|
+
"model-value": e.showText
|
|
2917
|
+
}, e.$attrs, { onClick: e.clickHandle }), r({
|
|
2918
|
+
extra: S(() => [s(c, p({
|
|
2919
|
+
show: e.popupInfo.visible,
|
|
2920
|
+
"onUpdate:show": t[0] || (t[0] = (t) => e.popupInfo.visible = t),
|
|
2921
|
+
teleport: "body",
|
|
2922
|
+
round: "",
|
|
2923
|
+
position: "bottom"
|
|
2924
|
+
}, e.popupProps, w(e.popupOn), { onClose: e.popupInfo.close }), {
|
|
2925
|
+
default: S(() => [s(d, p({
|
|
2926
|
+
"main-active-index": e.mainActiveIndex,
|
|
2927
|
+
"active-id": e.checked,
|
|
2928
|
+
items: e.finalOption
|
|
2929
|
+
}, e.treeSelectProps, w(e.treeSelectOn), {
|
|
2930
|
+
"onUpdate:mainActiveIndex": e.mainActiveIndexChange,
|
|
2931
|
+
"onUpdate:activeId": e.activeIdChange
|
|
2932
|
+
}), r({ _: 2 }, [g(e.treeSelectSlots, (t, n) => ({
|
|
2933
|
+
name: e.hyphenate(n),
|
|
2934
|
+
fn: S((n) => [(m(), o(P(e.getNode(t)), p(e.slotProps, n, { options: e.finalOption }), null, 16, ["options"]))])
|
|
2935
|
+
}))]), 1040, [
|
|
2936
|
+
"main-active-index",
|
|
2937
|
+
"active-id",
|
|
2938
|
+
"items",
|
|
2939
|
+
"onUpdate:mainActiveIndex",
|
|
2940
|
+
"onUpdate:activeId"
|
|
2941
|
+
])]),
|
|
2942
|
+
_: 1
|
|
2943
|
+
}, 16, ["show", "onClose"])]),
|
|
2944
|
+
_: 2
|
|
2945
|
+
}, [g(e.slots, (t, n) => ({
|
|
2946
|
+
name: e.hyphenate(n),
|
|
2947
|
+
fn: S((n) => [(m(), o(P(e.getNode(t)), p(e.slotProps, n), null, 16))])
|
|
2948
|
+
}))]), 1040, [
|
|
2949
|
+
"name",
|
|
2950
|
+
"disabled",
|
|
2951
|
+
"is-link",
|
|
2952
|
+
"model-value",
|
|
2953
|
+
"onClick"
|
|
2954
|
+
]));
|
|
2955
|
+
}]]);
|
|
2956
|
+
function $o() {
|
|
2957
|
+
return {
|
|
2958
|
+
...$e,
|
|
2959
|
+
..._e,
|
|
2960
|
+
uploadProps: { type: Object },
|
|
2961
|
+
uploadOn: {
|
|
2962
|
+
type: Object,
|
|
2963
|
+
default: () => ({})
|
|
2964
|
+
},
|
|
2965
|
+
uploadSlots: { type: Object },
|
|
2966
|
+
afterRead: { type: Function },
|
|
2967
|
+
uploadRequest: { type: Function },
|
|
2968
|
+
uploadingMessage: {
|
|
2969
|
+
type: [String, Function],
|
|
2970
|
+
default: "上传中"
|
|
2971
|
+
},
|
|
2972
|
+
failedMessage: { type: [String, Function] }
|
|
2973
|
+
};
|
|
2974
|
+
}
|
|
2975
|
+
var Eo = $o(), Go = {
|
|
2976
|
+
...q.props,
|
|
2977
|
+
...Eo
|
|
2978
|
+
};
|
|
2979
|
+
function Ko() {
|
|
2980
|
+
return {};
|
|
2981
|
+
}
|
|
2982
|
+
var Lo = {}, Mo = {
|
|
2983
|
+
...q.emits,
|
|
2984
|
+
...Lo
|
|
2985
|
+
};
|
|
2986
|
+
var Wo = Qe(u({
|
|
2987
|
+
name: "HUploader",
|
|
2988
|
+
components: {
|
|
2989
|
+
VanField: q,
|
|
2990
|
+
VanUploader: X
|
|
2991
|
+
},
|
|
2992
|
+
inheritAttrs: !1,
|
|
2993
|
+
props: Eo,
|
|
2994
|
+
emits: Lo,
|
|
2995
|
+
slots: Object,
|
|
2996
|
+
setup(e, t) {
|
|
2997
|
+
const n = xe(e), { slotProps: o } = Ue(e, 0, n);
|
|
2998
|
+
function l(e, t) {
|
|
2999
|
+
return {
|
|
3000
|
+
file: Array.isArray(e) ? e[0] : e,
|
|
3001
|
+
files: Array.isArray(e) ? e : [e],
|
|
3002
|
+
success: a,
|
|
3003
|
+
fail: r
|
|
3004
|
+
};
|
|
3005
|
+
}
|
|
3006
|
+
function a(e, t) {
|
|
3007
|
+
(Array.isArray(e) ? e : [e]).some((e) => ("uploading" !== e.status || (e.status = "done", e.message = "", e.response = t), !1));
|
|
3008
|
+
}
|
|
3009
|
+
function r(t, n) {
|
|
3010
|
+
(Array.isArray(t) ? t : [t]).some((t) => ("uploading" !== t.status || (t.status = "failed", t.message = "function" == typeof e.failedMessage ? e.failedMessage(t, n) : e.failedMessage, t.response = n), !1));
|
|
3011
|
+
}
|
|
3012
|
+
return {
|
|
3013
|
+
hyphenate: ke,
|
|
3014
|
+
getNode: ve,
|
|
3015
|
+
...n,
|
|
3016
|
+
slotProps: o,
|
|
3017
|
+
rewriteAfterRead: function(t, n) {
|
|
3018
|
+
const o = l(t, n);
|
|
3019
|
+
if (e.afterRead) return e.afterRead(t, n, o);
|
|
3020
|
+
if (!e.uploadRequest) return;
|
|
3021
|
+
o.files.forEach((t) => {
|
|
3022
|
+
t.status = "uploading", t.message = "function" == typeof e.uploadingMessage ? e.uploadingMessage(t) : e.uploadingMessage;
|
|
3023
|
+
});
|
|
3024
|
+
const a = e.uploadRequest(o);
|
|
3025
|
+
"object" == typeof a && (a.then ? a.then(o.success.bind(null, o.files)) : a.catch(o.fail.bind(null, o.files)));
|
|
3026
|
+
},
|
|
3027
|
+
getUploadOption: l,
|
|
3028
|
+
successCallback: a,
|
|
3029
|
+
failCallback: r
|
|
3030
|
+
};
|
|
3031
|
+
}
|
|
3032
|
+
}), [["render", function(e, t, n, a, i, u) {
|
|
3033
|
+
const d = O("VanUploader"), c = O("VanField");
|
|
3034
|
+
return e.hide ? l("", !0) : (m(), o(c, p({
|
|
3035
|
+
key: 0,
|
|
3036
|
+
name: e.field,
|
|
3037
|
+
disabled: e.globalDisabled || e.disabled,
|
|
3038
|
+
readonly: e.globalReadonly || e.readonly
|
|
3039
|
+
}, e.$attrs), r({
|
|
3040
|
+
input: S(() => [s(d, p({
|
|
3041
|
+
disabled: e.globalDisabled || e.disabled,
|
|
3042
|
+
readonly: e.globalReadonly || e.readonly,
|
|
3043
|
+
afterRead: e.rewriteAfterRead,
|
|
3044
|
+
"model-value": e.checked
|
|
3045
|
+
}, e.uploadProps, w(e.uploadOn), { "onUpdate:modelValue": e.change }), r({ _: 2 }, [g(e.uploadSlots, (t, n) => ({
|
|
3046
|
+
name: e.hyphenate(n),
|
|
3047
|
+
fn: S((n) => [(m(), o(P(e.getNode(t)), p(e.slotProps, n), null, 16))])
|
|
3048
|
+
}))]), 1040, [
|
|
3049
|
+
"disabled",
|
|
3050
|
+
"readonly",
|
|
3051
|
+
"afterRead",
|
|
3052
|
+
"model-value",
|
|
3053
|
+
"onUpdate:modelValue"
|
|
3054
|
+
])]),
|
|
3055
|
+
_: 2
|
|
3056
|
+
}, [g(e.slots, (t, n) => ({
|
|
3057
|
+
name: e.hyphenate(n),
|
|
3058
|
+
fn: S((n) => [(m(), o(P(e.getNode(t)), p(e.slotProps, n), null, 16))])
|
|
3059
|
+
}))]), 1040, [
|
|
3060
|
+
"name",
|
|
3061
|
+
"disabled",
|
|
3062
|
+
"readonly"
|
|
3063
|
+
]));
|
|
3064
|
+
}]]), Qo = { render: () => null }, Yo = {
|
|
3065
|
+
area: c(Ye),
|
|
3066
|
+
cascader: c(it),
|
|
3067
|
+
checkbox: c(Ot),
|
|
3068
|
+
"checkbox-group": c(yt),
|
|
3069
|
+
"custom-render": c(Rt),
|
|
3070
|
+
datepicker: c(Dt),
|
|
3071
|
+
"date-picker": c(Dt),
|
|
3072
|
+
"date-time-picker-group": c(Mt),
|
|
3073
|
+
"datetime-picker": c(Qo),
|
|
3074
|
+
input: c(Zt),
|
|
3075
|
+
"number-keyboard": c(rn),
|
|
3076
|
+
"password-input": c(yn),
|
|
3077
|
+
picker: c(On),
|
|
3078
|
+
select: c(On),
|
|
3079
|
+
radio: c(Nn),
|
|
3080
|
+
"radio-group": c(Rn),
|
|
3081
|
+
rate: c(En),
|
|
3082
|
+
signature: c(no),
|
|
3083
|
+
slider: c(uo),
|
|
3084
|
+
stepper: c(mo),
|
|
3085
|
+
switch: c(wo),
|
|
3086
|
+
"time-picker": c(_o),
|
|
3087
|
+
timepicker: c(_o),
|
|
3088
|
+
"tree-select": c(Bo),
|
|
3089
|
+
upload: c(Wo)
|
|
3090
|
+
}, zo = {};
|
|
3091
|
+
function Jo(e, t) {
|
|
3092
|
+
zo[e] = c(t);
|
|
3093
|
+
}
|
|
3094
|
+
function Xo(e) {
|
|
3095
|
+
delete zo[e];
|
|
3096
|
+
}
|
|
3097
|
+
function Zo(e) {
|
|
3098
|
+
return zo[e] || Yo[e] || (console.warn("未找到该组件类型: ", e), null);
|
|
3099
|
+
}
|
|
3100
|
+
function el(e) {
|
|
3101
|
+
return e ? "user" === e ? { ...zo } : { ...Yo } : {
|
|
3102
|
+
...Yo,
|
|
3103
|
+
...zo
|
|
3104
|
+
};
|
|
3105
|
+
}
|
|
3106
|
+
function tl() {
|
|
3107
|
+
return {
|
|
3108
|
+
t: { type: String },
|
|
3109
|
+
field: { type: String },
|
|
3110
|
+
query: {
|
|
3111
|
+
type: Object,
|
|
3112
|
+
required: !0
|
|
3113
|
+
},
|
|
3114
|
+
tag: {
|
|
3115
|
+
type: [
|
|
3116
|
+
Object,
|
|
3117
|
+
String,
|
|
3118
|
+
Array,
|
|
3119
|
+
Function
|
|
3120
|
+
],
|
|
3121
|
+
default: "div"
|
|
3122
|
+
},
|
|
3123
|
+
tagSlots: { type: Object },
|
|
3124
|
+
config: { type: [
|
|
3125
|
+
Object,
|
|
3126
|
+
Array,
|
|
3127
|
+
Function
|
|
3128
|
+
] },
|
|
3129
|
+
slots: { type: Object },
|
|
3130
|
+
hooks: {
|
|
3131
|
+
type: [Object],
|
|
3132
|
+
default: void 0
|
|
3133
|
+
},
|
|
3134
|
+
getFormRef: { type: Function }
|
|
3135
|
+
};
|
|
3136
|
+
}
|
|
3137
|
+
var nl = tl(), ol = nl;
|
|
3138
|
+
function ll() {
|
|
3139
|
+
return {};
|
|
3140
|
+
}
|
|
3141
|
+
var al = {}, rl = al;
|
|
3142
|
+
var il = Qe(u({
|
|
3143
|
+
name: "VirtualGroup",
|
|
3144
|
+
inheritAttrs: !1,
|
|
3145
|
+
props: {
|
|
3146
|
+
tag: {
|
|
3147
|
+
type: [
|
|
3148
|
+
Object,
|
|
3149
|
+
String,
|
|
3150
|
+
Array,
|
|
3151
|
+
Function
|
|
3152
|
+
],
|
|
3153
|
+
default: "div"
|
|
3154
|
+
},
|
|
3155
|
+
slots: { type: [Object] },
|
|
3156
|
+
wrapper: { type: [Object] },
|
|
3157
|
+
query: { type: [Object] }
|
|
3158
|
+
},
|
|
3159
|
+
setup(e, t) {
|
|
3160
|
+
const o = n(() => t.listeners || {});
|
|
3161
|
+
return {
|
|
3162
|
+
getNode: ve,
|
|
3163
|
+
tagRef: v(),
|
|
3164
|
+
events: o
|
|
3165
|
+
};
|
|
3166
|
+
}
|
|
3167
|
+
}), [["render", function(e, t, n, l, a, i) {
|
|
3168
|
+
return e.tag ? (m(), o(P(e.tag), p({ key: 0 }, e.$attrs, { ref: "tagRef" }, w(e.events)), r({
|
|
3169
|
+
default: S(() => [k(e.$slots, "default")]),
|
|
3170
|
+
_: 2
|
|
3171
|
+
}, [g(e.slots, (t, n) => ({
|
|
3172
|
+
name: n,
|
|
3173
|
+
fn: S((n) => [(m(), o(P(e.getNode(t)), p(n, {
|
|
3174
|
+
wrapper: e.wrapper,
|
|
3175
|
+
query: e.query
|
|
3176
|
+
}), null, 16, ["wrapper", "query"]))])
|
|
3177
|
+
}))]), 1040)) : k(e.$slots, "default", { key: 1 });
|
|
3178
|
+
}]]), sl = "__field__", ul = { "cell-group": {
|
|
3179
|
+
tag: c(x),
|
|
3180
|
+
slots: (e) => e?.title ? { title: e.title } : void 0
|
|
3181
|
+
} };
|
|
3182
|
+
var dl = Qe(u({
|
|
3183
|
+
name: "HGroup",
|
|
3184
|
+
components: { VirtualGroup: il },
|
|
3185
|
+
inheritAttrs: !1,
|
|
3186
|
+
props: nl,
|
|
3187
|
+
emits: al,
|
|
3188
|
+
slots: Object,
|
|
3189
|
+
setup(e, t) {
|
|
3190
|
+
const o = v(), l = n(() => {
|
|
3191
|
+
const { tag: t, t: n } = e;
|
|
3192
|
+
return ul[n]?.tag || t;
|
|
3193
|
+
}), a = n(() => {
|
|
3194
|
+
const { t, slots: n } = e;
|
|
3195
|
+
return ul[t]?.slots?.(n);
|
|
3196
|
+
}), r = n(() => o.value?.tagRef), i = Ae(), s = n(() => {
|
|
3197
|
+
const { config: t } = e;
|
|
3198
|
+
return "function" == typeof t && e.getFormRef && !e.getFormRef?.() ? [] : u("function" == typeof t ? t({
|
|
3199
|
+
query: e.query,
|
|
3200
|
+
wrapper: i,
|
|
3201
|
+
formRef: e.getFormRef?.()
|
|
3202
|
+
}) : t);
|
|
3203
|
+
});
|
|
3204
|
+
function u(e) {
|
|
3205
|
+
if (he(e)) {
|
|
3206
|
+
const t = [];
|
|
3207
|
+
return Object.entries(e).forEach(([e, n]) => {
|
|
3208
|
+
n.field = e, t.push(n);
|
|
3209
|
+
}), t;
|
|
3210
|
+
}
|
|
3211
|
+
return e.forEach((e) => !e.field && e.fields && (e[sl] = e.fields.join(","))), e;
|
|
3212
|
+
}
|
|
3213
|
+
const d = Se(i);
|
|
3214
|
+
return e.hooks?.created?.({
|
|
3215
|
+
props: e,
|
|
3216
|
+
wrapper: i,
|
|
3217
|
+
...d
|
|
3218
|
+
}), {
|
|
3219
|
+
hyphenate: ke,
|
|
3220
|
+
getNode: ve,
|
|
3221
|
+
REWRITE_FIELD_KEY: sl,
|
|
3222
|
+
virtualGroupRef: o,
|
|
3223
|
+
virtualTag: l,
|
|
3224
|
+
virtualSlots: a,
|
|
3225
|
+
tagRef: r,
|
|
3226
|
+
wrapper: i,
|
|
3227
|
+
finalConfig: s,
|
|
3228
|
+
getComponent2: function(e) {
|
|
3229
|
+
return "group" === e || ul[e] ? "HGroup" : Zo(e);
|
|
3230
|
+
}
|
|
3231
|
+
};
|
|
3232
|
+
}
|
|
3233
|
+
}), [["render", function(e, n, r, i, s, u) {
|
|
3234
|
+
const d = O("VirtualGroup");
|
|
3235
|
+
return m(), o(d, p({ ref: "virtualGroupRef" }, e.$attrs, {
|
|
3236
|
+
tag: e.virtualTag,
|
|
3237
|
+
slots: e.virtualSlots || e.tagSlots,
|
|
3238
|
+
query: e.query,
|
|
3239
|
+
wrapper: e.wrapper
|
|
3240
|
+
}), {
|
|
3241
|
+
default: S(() => [
|
|
3242
|
+
e.slots?.prepend || e.$slots.prepend ? (m(), o(P(e.getNode(e.slots?.prepend || e.$slots.prepend)), {
|
|
3243
|
+
key: 0,
|
|
3244
|
+
query: e.query,
|
|
3245
|
+
wrapper: e.wrapper
|
|
3246
|
+
}, null, 8, ["query", "wrapper"])) : l("", !0),
|
|
3247
|
+
e.slots?.default ? (m(), o(P(e.slots.default), {
|
|
3248
|
+
key: 1,
|
|
3249
|
+
config: e.finalConfig,
|
|
3250
|
+
query: e.query,
|
|
3251
|
+
wrapper: e.wrapper
|
|
3252
|
+
}, null, 8, [
|
|
3253
|
+
"config",
|
|
3254
|
+
"query",
|
|
3255
|
+
"wrapper"
|
|
3256
|
+
])) : e.$slots.default ? k(e.$slots, "default", {
|
|
3257
|
+
key: 2,
|
|
3258
|
+
config: e.finalConfig,
|
|
3259
|
+
query: e.query
|
|
3260
|
+
}) : (m(!0), a(t, { key: 3 }, g(e.finalConfig, (n, r) => (m(), a(t, { key: n.as || n.field || n[e.REWRITE_FIELD_KEY] || r }, [n ? (m(), o(P(e.getComponent2(n.t)), p({
|
|
3261
|
+
key: 0,
|
|
3262
|
+
ref_for: !0
|
|
3263
|
+
}, n, {
|
|
3264
|
+
field: n.as || n.field || n[e.REWRITE_FIELD_KEY] || r,
|
|
3265
|
+
query: e.query
|
|
3266
|
+
}), null, 16, ["field", "query"])) : l("", !0)], 64))), 128)),
|
|
3267
|
+
e.slots?.append || e.$slots.append ? (m(), o(P(e.getNode(e.slots?.append || e.$slots.append)), {
|
|
3268
|
+
key: 4,
|
|
3269
|
+
query: e.query,
|
|
3270
|
+
wrapper: e.wrapper
|
|
3271
|
+
}, null, 8, ["query", "wrapper"])) : l("", !0)
|
|
3272
|
+
]),
|
|
3273
|
+
_: 3
|
|
3274
|
+
}, 16, [
|
|
3275
|
+
"tag",
|
|
3276
|
+
"slots",
|
|
3277
|
+
"query",
|
|
3278
|
+
"wrapper"
|
|
3279
|
+
]);
|
|
3280
|
+
}]]);
|
|
3281
|
+
function cl() {
|
|
3282
|
+
return {
|
|
3283
|
+
..._e,
|
|
3284
|
+
t: { type: String },
|
|
3285
|
+
tag: {
|
|
3286
|
+
type: [
|
|
3287
|
+
Object,
|
|
3288
|
+
String,
|
|
3289
|
+
Array,
|
|
3290
|
+
Function
|
|
3291
|
+
],
|
|
3292
|
+
default: "div"
|
|
3293
|
+
},
|
|
3294
|
+
config: { type: [
|
|
3295
|
+
Object,
|
|
3296
|
+
Array,
|
|
3297
|
+
Function
|
|
3298
|
+
] },
|
|
3299
|
+
uniqueKey: { type: String },
|
|
3300
|
+
contentProps: { type: Object },
|
|
3301
|
+
slots: { type: Object },
|
|
3302
|
+
itemSlots: {
|
|
3303
|
+
type: Object,
|
|
3304
|
+
default: () => ({})
|
|
3305
|
+
}
|
|
3306
|
+
};
|
|
3307
|
+
}
|
|
3308
|
+
var pl = cl(), fl = pl;
|
|
3309
|
+
function yl() {
|
|
3310
|
+
return {};
|
|
3311
|
+
}
|
|
3312
|
+
var hl = {}, bl = hl, ml = 0, vl = "__field__";
|
|
3313
|
+
var gl = Qe(u({
|
|
3314
|
+
name: "HDynamicGroup",
|
|
3315
|
+
components: { VirtualGroup: il },
|
|
3316
|
+
props: pl,
|
|
3317
|
+
emits: hl,
|
|
3318
|
+
slots: Object,
|
|
3319
|
+
setup(e, t) {
|
|
3320
|
+
const o = v(), l = n(() => o.value?.tagRef), a = xe(e), r = a.checked;
|
|
3321
|
+
let i = {
|
|
3322
|
+
configUniqueValue: [],
|
|
3323
|
+
checkedValue: []
|
|
3324
|
+
};
|
|
3325
|
+
const s = n(() => {
|
|
3326
|
+
const { config: t } = e;
|
|
3327
|
+
if (!t) return [];
|
|
3328
|
+
const n = r.value;
|
|
3329
|
+
if (!n?.length) return [];
|
|
3330
|
+
const o = "function" == typeof t, l = !o && u(t), { uniqueKey: s } = e, d = n.map((r, d) => {
|
|
3331
|
+
return {
|
|
3332
|
+
uniqueValue: s ? r[s] : (c = r, p = d, i.checkedValue[p] === c ? i.configUniqueValue[p] : ++ml),
|
|
3333
|
+
options: o ? u(t({
|
|
3334
|
+
item: r,
|
|
3335
|
+
index: d,
|
|
3336
|
+
checked: n,
|
|
3337
|
+
query: e.query,
|
|
3338
|
+
plain: a
|
|
3339
|
+
})) : l
|
|
3340
|
+
};
|
|
3341
|
+
var c, p;
|
|
3342
|
+
});
|
|
3343
|
+
return i.configUniqueValue = d.map((e) => e.uniqueValue), i.checkedValue = [...n], d;
|
|
3344
|
+
});
|
|
3345
|
+
function u(e) {
|
|
3346
|
+
if (he(e)) {
|
|
3347
|
+
const t = [];
|
|
3348
|
+
return Object.entries(e).forEach(([e, n]) => {
|
|
3349
|
+
n.field = e, t.push(n);
|
|
3350
|
+
}), t;
|
|
3351
|
+
}
|
|
3352
|
+
return e.forEach((e) => !e.field && e.fields && (e[vl] = e.fields.join(","))), e;
|
|
3353
|
+
}
|
|
3354
|
+
return {
|
|
3355
|
+
hyphenate: ke,
|
|
3356
|
+
getNode: ve,
|
|
3357
|
+
REWRITE_FIELD_KEY: vl,
|
|
3358
|
+
virtualGroupRef: o,
|
|
3359
|
+
tagRef: l,
|
|
3360
|
+
plain: a,
|
|
3361
|
+
finalConfig: s,
|
|
3362
|
+
getComponent2: function(e) {
|
|
3363
|
+
return "dynamic-group" === e ? "HDynamicGroup" : "group" === e ? dl : Zo(e);
|
|
3364
|
+
}
|
|
3365
|
+
};
|
|
3366
|
+
}
|
|
3367
|
+
}), [["render", function(e, n, r, i, s, u) {
|
|
3368
|
+
const d = O("VirtualGroup");
|
|
3369
|
+
return m(), o(d, {
|
|
3370
|
+
ref: "virtualGroupRef",
|
|
3371
|
+
tag: e.tag
|
|
3372
|
+
}, {
|
|
3373
|
+
default: S(() => [
|
|
3374
|
+
e.slots?.prepend || e.$slots.prepend ? (m(), o(P(e.getNode(e.slots?.prepend || e.$slots.prepend)), {
|
|
3375
|
+
key: 0,
|
|
3376
|
+
query: e.query,
|
|
3377
|
+
checked: e.plain.checked.value,
|
|
3378
|
+
plain: e.plain
|
|
3379
|
+
}, null, 8, [
|
|
3380
|
+
"query",
|
|
3381
|
+
"checked",
|
|
3382
|
+
"plain"
|
|
3383
|
+
])) : l("", !0),
|
|
3384
|
+
(m(!0), a(t, null, g(e.finalConfig, (n, r) => (m(), a("div", p({
|
|
3385
|
+
key: n.uniqueValue,
|
|
3386
|
+
ref_for: !0
|
|
3387
|
+
}, e.contentProps), [
|
|
3388
|
+
(m(), o(P(e.itemSlots.prepend), {
|
|
3389
|
+
query: e.query,
|
|
3390
|
+
checked: e.plain.checked.value,
|
|
3391
|
+
index: r,
|
|
3392
|
+
plain: e.plain
|
|
3393
|
+
}, null, 8, [
|
|
3394
|
+
"query",
|
|
3395
|
+
"checked",
|
|
3396
|
+
"index",
|
|
3397
|
+
"plain"
|
|
3398
|
+
])),
|
|
3399
|
+
(m(!0), a(t, null, g(n.options, (i) => (m(), a(t, { key: `${e.field}.${r}.${i.field || i[e.REWRITE_FIELD_KEY]}` }, [i ? (m(), o(P(e.getComponent2(i.t)), p({
|
|
3400
|
+
key: 0,
|
|
3401
|
+
ref_for: !0
|
|
3402
|
+
}, i, {
|
|
3403
|
+
"unique-value": n.uniqueValue,
|
|
3404
|
+
field: `${e.field}.${r}.${i.field || i[e.REWRITE_FIELD_KEY]}`,
|
|
3405
|
+
query: e.query,
|
|
3406
|
+
"parent-query": e.plain.checked.value[r]
|
|
3407
|
+
}), null, 16, [
|
|
3408
|
+
"unique-value",
|
|
3409
|
+
"field",
|
|
3410
|
+
"query",
|
|
3411
|
+
"parent-query"
|
|
3412
|
+
])) : l("", !0)], 64))), 128)),
|
|
3413
|
+
(m(), o(P(e.itemSlots.append), {
|
|
3414
|
+
query: e.query,
|
|
3415
|
+
checked: e.plain.checked.value,
|
|
3416
|
+
index: r,
|
|
3417
|
+
plain: e.plain
|
|
3418
|
+
}, null, 8, [
|
|
3419
|
+
"query",
|
|
3420
|
+
"checked",
|
|
3421
|
+
"index",
|
|
3422
|
+
"plain"
|
|
3423
|
+
]))
|
|
3424
|
+
], 16))), 128)),
|
|
3425
|
+
e.slots?.append || e.$slots.append ? (m(), o(P(e.getNode(e.slots?.append || e.$slots.append)), {
|
|
3426
|
+
key: 1,
|
|
3427
|
+
query: e.query,
|
|
3428
|
+
checked: e.plain.checked.value,
|
|
3429
|
+
plain: e.plain
|
|
3430
|
+
}, null, 8, [
|
|
3431
|
+
"query",
|
|
3432
|
+
"checked",
|
|
3433
|
+
"plain"
|
|
3434
|
+
])) : l("", !0)
|
|
3435
|
+
]),
|
|
3436
|
+
_: 1
|
|
3437
|
+
}, 8, ["tag"]);
|
|
3438
|
+
}]]);
|
|
3439
|
+
Jo("dynamic-group", gl);
|
|
3440
|
+
var kl = D.props, Ol = function(e) {
|
|
3441
|
+
if (!Array.isArray(e)) return e || {};
|
|
3442
|
+
const t = {}, n = () => !0;
|
|
3443
|
+
return e.forEach((e) => {
|
|
3444
|
+
return t[o = e, o.replace(De, (e) => e.slice(1).toUpperCase())] = n;
|
|
3445
|
+
var o;
|
|
3446
|
+
}), t;
|
|
3447
|
+
}(D.emits);
|
|
3448
|
+
function Pl() {
|
|
3449
|
+
return {
|
|
3450
|
+
...qe,
|
|
3451
|
+
config: { type: [
|
|
3452
|
+
Object,
|
|
3453
|
+
Array,
|
|
3454
|
+
Function
|
|
3455
|
+
] }
|
|
3456
|
+
};
|
|
3457
|
+
}
|
|
3458
|
+
var Vl = Pl(), wl = {
|
|
3459
|
+
...kl,
|
|
3460
|
+
...Vl
|
|
3461
|
+
};
|
|
3462
|
+
function jl() {
|
|
3463
|
+
return { submit: (e) => !0 };
|
|
3464
|
+
}
|
|
3465
|
+
var Cl = { submit: (e) => !0 }, Sl = {
|
|
3466
|
+
...Ol,
|
|
3467
|
+
...Cl
|
|
3468
|
+
};
|
|
3469
|
+
var Rl = Qe(u({
|
|
3470
|
+
name: "HForm",
|
|
3471
|
+
components: { HGroup: dl },
|
|
3472
|
+
inheritAttrs: !1,
|
|
3473
|
+
props: Vl,
|
|
3474
|
+
emits: Cl,
|
|
3475
|
+
slots: Object,
|
|
3476
|
+
setup(e, t) {
|
|
3477
|
+
const o = v(), l = n(() => o.value?.tagRef), a = n(() => t.listeners || {});
|
|
3478
|
+
function r(...e) {
|
|
3479
|
+
return l.value.resetValidation(...e);
|
|
3480
|
+
}
|
|
3481
|
+
const i = Ie(e, { formRef: l });
|
|
3482
|
+
const s = n(() => ({
|
|
3483
|
+
props: e,
|
|
3484
|
+
wrapper: i
|
|
3485
|
+
}));
|
|
3486
|
+
return {
|
|
3487
|
+
groupRef: o,
|
|
3488
|
+
VanForm: c(D),
|
|
3489
|
+
formRef: l,
|
|
3490
|
+
events: a,
|
|
3491
|
+
submitHandle: function(e) {
|
|
3492
|
+
t.emit("submit", i.getQuery());
|
|
3493
|
+
},
|
|
3494
|
+
...i,
|
|
3495
|
+
validate: function(...e) {
|
|
3496
|
+
return l.value.validate(...e);
|
|
3497
|
+
},
|
|
3498
|
+
validateField: function(...e) {
|
|
3499
|
+
return l.value.validate(...e);
|
|
3500
|
+
},
|
|
3501
|
+
clearValidate: r,
|
|
3502
|
+
resetValidation: function(...e) {
|
|
3503
|
+
return l.value.resetValidation(...e);
|
|
3504
|
+
},
|
|
3505
|
+
submit: function() {
|
|
3506
|
+
l.value?.submit();
|
|
3507
|
+
},
|
|
3508
|
+
reset: function() {
|
|
3509
|
+
i.reset(), setTimeout(r);
|
|
3510
|
+
},
|
|
3511
|
+
getValues: function(...e) {
|
|
3512
|
+
return l.value.getValues(...e);
|
|
3513
|
+
},
|
|
3514
|
+
getValidationStatus: function(...e) {
|
|
3515
|
+
return l.value.getValidationStatus(...e);
|
|
3516
|
+
},
|
|
3517
|
+
scrollToField: function(...e) {
|
|
3518
|
+
return l.value.scrollToField(...e);
|
|
3519
|
+
},
|
|
3520
|
+
getFormRef: function() {
|
|
3521
|
+
return l.value;
|
|
3522
|
+
},
|
|
3523
|
+
slotProps: s
|
|
3524
|
+
};
|
|
3525
|
+
}
|
|
3526
|
+
}), [["render", function(e, t, n, l, a, i) {
|
|
3527
|
+
const s = O("HGroup");
|
|
3528
|
+
return m(), o(s, p(e.$attrs, {
|
|
3529
|
+
ref: "groupRef",
|
|
3530
|
+
disabled: e.disabled,
|
|
3531
|
+
config: e.config,
|
|
3532
|
+
model: e.query,
|
|
3533
|
+
query: e.query,
|
|
3534
|
+
"get-form-ref": e.getFormRef,
|
|
3535
|
+
tag: e.VanForm
|
|
3536
|
+
}, w(e.events), { onSubmit: e.submitHandle }), r({
|
|
3537
|
+
append: S(() => [k(e.$slots, "default", y(d(e.slotProps)))]),
|
|
3538
|
+
_: 2
|
|
3539
|
+
}, [e.$slots.prepend ? {
|
|
3540
|
+
name: "prepend",
|
|
3541
|
+
fn: S(() => [k(e.$slots, "prepend", y(d(e.slotProps)))]),
|
|
3542
|
+
key: "0"
|
|
3543
|
+
} : void 0]), 1040, [
|
|
3544
|
+
"disabled",
|
|
3545
|
+
"config",
|
|
3546
|
+
"model",
|
|
3547
|
+
"query",
|
|
3548
|
+
"get-form-ref",
|
|
3549
|
+
"tag",
|
|
3550
|
+
"onSubmit"
|
|
3551
|
+
]);
|
|
3552
|
+
}]]);
|
|
3553
|
+
function Fl(e) {
|
|
3554
|
+
return e;
|
|
3555
|
+
}
|
|
3556
|
+
var Hl = ae({}), Al = "0.0.1";
|
|
3557
|
+
export { Ye as HArea, it as HCascader, Ot as HCheckbox, yt as HCheckboxGroup, Rt as HCustomRender, Dt as HDatePicker, Mt as HDateTimePickerGroup, Qo as HDatetimePicker, gl as HDynamicGroup, Rl as HForm, dl as HGroup, Zt as HInput, Xe as HInputSlot, rn as HNumberKeyboard, yn as HPasswordInput, On as HPicker, Nn as HRadio, Rn as HRadioGroup, En as HRate, no as HSignature, uo as HSlider, mo as HStepper, wo as HSwitch, _o as HTimePicker, Bo as HTreeSelect, Wo as HUpload, Hl as JSONFormTs, We as areaEmits, Le as areaEmitsGeneric, Me as areaEmitsPrivate, Ke as areaProps, Ee as areaPropsGeneric, Ge as areaPropsPrivate, rt as cascaderEmits, lt as cascaderEmitsGeneric, at as cascaderEmitsPrivate, ot as cascaderProps, tt as cascaderPropsGeneric, nt as cascaderPropsPrivate, kt as checkboxEmits, vt as checkboxEmitsGeneric, gt as checkboxEmitsPrivate, ft as checkboxGroupEmits, ct as checkboxGroupEmitsGeneric, pt as checkboxGroupEmitsPrivate, dt as checkboxGroupProps, st as checkboxGroupPropsGeneric, ut as checkboxGroupPropsPrivate, mt as checkboxProps, ht as checkboxPropsGeneric, bt as checkboxPropsPrivate, $e as commonProps, Be as commonPropsGeneric, Te as coreVersion, St as customRenderEmits, jt as customRenderEmitsGeneric, Ct as customRenderEmitsPrivate, wt as customRenderProps, Pt as customRenderPropsGeneric, Vt as customRenderPropsPrivate, It as datePickerEmits, xt as datePickerEmitsGeneric, _t as datePickerEmitsPrivate, At as datePickerProps, Ft as datePickerPropsGeneric, Ht as datePickerPropsPrivate, Gt as dateTimePickerGroupEmits, $t as dateTimePickerGroupEmitsGeneric, Et as dateTimePickerGroupEmitsPrivate, Bt as dateTimePickerGroupProps, Tt as dateTimePickerGroupPropsGeneric, Ut as dateTimePickerGroupPropsPrivate, Fl as defineOption, bl as dynamicGroupEmits, yl as dynamicGroupEmitsGeneric, hl as dynamicGroupEmitsPrivate, fl as dynamicGroupProps, cl as dynamicGroupPropsGeneric, pl as dynamicGroupPropsPrivate, Sl as formEmits, jl as formEmitsGeneric, Cl as formEmitsPrivate, wl as formProps, Pl as formPropsGeneric, Vl as formPropsPrivate, el as getAllComponent, Zo as getComponent, rl as groupEmits, ll as groupEmitsGeneric, al as groupEmitsPrivate, ol as groupProps, tl as groupPropsGeneric, nl as groupPropsPrivate, Xt as inputEmits, zt as inputEmitsGeneric, Jt as inputEmitsPrivate, Yt as inputProps, Wt as inputPropsGeneric, Qt as inputPropsPrivate, Je as inputSlotEmits, ze as inputSlotProps, an as numberKeyboardEmits, on as numberKeyboardEmitsGeneric, ln as numberKeyboardEmitsPrivate, nn as numberKeyboardProps, en as numberKeyboardPropsGeneric, tn as numberKeyboardPropsPrivate, fn as passwordInputEmits, cn as passwordInputEmitsGeneric, pn as passwordInputEmitsPrivate, dn as passwordInputProps, sn as passwordInputPropsGeneric, un as passwordInputPropsPrivate, kn as pickerEmits, vn as pickerEmitsGeneric, gn as pickerEmitsPrivate, mn as pickerProps, hn as pickerPropsGeneric, bn as pickerPropsPrivate, He as provideKey, In as radioEmits, xn as radioEmitsGeneric, _n as radioEmitsPrivate, Sn as radioGroupEmits, jn as radioGroupEmitsGeneric, Cn as radioGroupEmitsPrivate, wn as radioGroupProps, Pn as radioGroupPropsGeneric, Vn as radioGroupPropsPrivate, An as radioProps, Fn as radioPropsGeneric, Hn as radioPropsPrivate, $n as rateEmits, Un as rateEmitsGeneric, Bn as rateEmitsPrivate, Tn as rateProps, qn as ratePropsGeneric, Dn as ratePropsPrivate, Jo as registerComponent, Qn as signatureEmits, Mn as signatureEmitsGeneric, Wn as signatureEmitsPrivate, Yn as signatureFormat, Ln as signatureProps, Gn as signaturePropsGeneric, Kn as signaturePropsPrivate, so as sliderEmits, ro as sliderEmitsGeneric, io as sliderEmitsPrivate, ao as sliderProps, oo as sliderPropsGeneric, lo as sliderPropsPrivate, bo as stepperEmits, yo as stepperEmitsGeneric, ho as stepperEmitsPrivate, fo as stepperProps, co as stepperPropsGeneric, po as stepperPropsPrivate, Vo as switchEmits, Oo as switchEmitsGeneric, Po as switchEmitsPrivate, ko as switchProps, vo as switchPropsGeneric, go as switchPropsPrivate, Ho as timePickerEmits, Ro as timePickerEmitsGeneric, Fo as timePickerEmitsPrivate, So as timePickerProps, jo as timePickerPropsGeneric, Co as timePickerPropsPrivate, Uo as treeSelectEmits, Do as treeSelectEmitsGeneric, To as treeSelectEmitsPrivate, qo as treeSelectProps, Io as treeSelectPropsGeneric, No as treeSelectPropsPrivate, Xo as unregisterComponent, Mo as uploadEmits, Ko as uploadEmitsGeneric, Lo as uploadEmitsPrivate, Go as uploadProps, $o as uploadPropsGeneric, Eo as uploadPropsPrivate, Al as version };
|
|
3558
|
+
|
|
3559
|
+
//# sourceMappingURL=index.esm.min.js.map
|