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