yh-mobile-components 1.6.4 → 1.6.6
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/index.es.js +946 -904
- package/index.es.js.map +1 -1
- package/package.json +1 -1
- package/style.css +1 -1
package/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as Z, ref as D, reactive as we, computed as F, watch as de, onMounted as _e, onActivated as Ce, resolveComponent as M, openBlock as c, createElementBlock as x, createElementVNode as w, Fragment as P, renderList as X, unref as U, createBlock as q, createCommentVNode as te, withCtx as j, createVNode as R, renderSlot as he, normalizeClass as se, toDisplayString as G, nextTick as fe, useCssVars as ke, createTextVNode as oe, resolveDynamicComponent as Se, mergeProps as ae, withDirectives as re, vShow as $e, createStaticVNode as Ye, vModelText as ue, createSlots as Ve } from "vue";
|
|
2
|
+
const Oe = { class: "yhm-list-container" }, Le = { class: "list-condition-container" }, Te = ["onClick"], He = /* @__PURE__ */ Z({
|
|
3
3
|
__name: "yhmList",
|
|
4
4
|
props: {
|
|
5
5
|
hasSearch: { type: Boolean, default: !1 },
|
|
@@ -13,110 +13,110 @@ const Te = { class: "yhm-list-container" }, He = { class: "list-condition-contai
|
|
|
13
13
|
listConfig: null,
|
|
14
14
|
getData: null
|
|
15
15
|
},
|
|
16
|
-
setup(e, { expose:
|
|
17
|
-
const a = e, t = D(),
|
|
18
|
-
function
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
setup(e, { expose: y }) {
|
|
17
|
+
const a = e, t = D(), m = D("");
|
|
18
|
+
function i(h) {
|
|
19
|
+
m.value = h, fe(() => {
|
|
20
|
+
Y(!0);
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
|
-
const l =
|
|
24
|
-
var
|
|
25
|
-
return (
|
|
26
|
-
}),
|
|
27
|
-
var
|
|
28
|
-
return (
|
|
29
|
-
}),
|
|
30
|
-
var
|
|
31
|
-
return (
|
|
23
|
+
const l = we({}), o = D([]), g = D(!1), s = D(!1), u = D(1), _ = D(15), C = D(!1), k = D(!1), S = F(() => {
|
|
24
|
+
var h;
|
|
25
|
+
return (h = a.paramConfig) == null ? void 0 : h.filter(($) => $.type === "tabs");
|
|
26
|
+
}), H = F(() => {
|
|
27
|
+
var h;
|
|
28
|
+
return (h = a.paramConfig) == null ? void 0 : h.filter(($) => $.type === "dropdown");
|
|
29
|
+
}), z = F(() => {
|
|
30
|
+
var h;
|
|
31
|
+
return (h = a.paramConfig) == null ? void 0 : h.filter(($) => $.type === "custom").map(($) => $.custom);
|
|
32
32
|
});
|
|
33
|
-
let
|
|
34
|
-
async function
|
|
35
|
-
|
|
36
|
-
var
|
|
37
|
-
|
|
38
|
-
let { data:
|
|
33
|
+
let p = null;
|
|
34
|
+
async function Y(h = !1) {
|
|
35
|
+
p && clearTimeout(p), s.value = !1, p = setTimeout(async () => {
|
|
36
|
+
var W;
|
|
37
|
+
g.value = !0, h && (o.value = [], k.value = !1, C.value = !0, u.value = 1);
|
|
38
|
+
let { data: $, total: I } = await a.getData(u.value, _.value, l, m);
|
|
39
39
|
try {
|
|
40
|
-
|
|
40
|
+
h ? o.value = $ : o.value = o.value.concat($), o.value.length >= I && (k.value = !0), p = null, u.value++, C.value = !1, g.value = !1;
|
|
41
41
|
} catch {
|
|
42
|
-
|
|
42
|
+
p = null, s.value = !0, C.value = !1, g.value = !1;
|
|
43
43
|
}
|
|
44
|
-
!
|
|
44
|
+
!k.value && !s.value && ((W = t.value) == null || W.check());
|
|
45
45
|
}, 500);
|
|
46
46
|
}
|
|
47
|
-
function
|
|
48
|
-
a.searchType ==
|
|
47
|
+
function O(h) {
|
|
48
|
+
a.searchType == h && Y(!0);
|
|
49
49
|
}
|
|
50
50
|
de(
|
|
51
51
|
() => l,
|
|
52
52
|
() => {
|
|
53
|
-
|
|
53
|
+
Y(!0);
|
|
54
54
|
},
|
|
55
55
|
{
|
|
56
56
|
deep: !0,
|
|
57
57
|
immediate: !0
|
|
58
58
|
}
|
|
59
59
|
);
|
|
60
|
-
const
|
|
61
|
-
cols: a.listConfig.items.filter((
|
|
62
|
-
label:
|
|
63
|
-
span:
|
|
64
|
-
align:
|
|
65
|
-
descAlign:
|
|
60
|
+
const A = F(() => o.value.map((h) => ({
|
|
61
|
+
cols: a.listConfig.items.filter((I) => !I.show || I.show && I.show(h)).map(({ label: I, span: W, align: K, descAlign: V, fontSize: n, status: N, description: B, defaultDescription: b, slot: d, value: f, defaultValue: v }) => ({
|
|
62
|
+
label: I,
|
|
63
|
+
span: W,
|
|
64
|
+
align: K,
|
|
65
|
+
descAlign: V || a.descAlign,
|
|
66
66
|
fontSize: n || a.fontSize,
|
|
67
|
-
status: N ? N(
|
|
68
|
-
description:
|
|
69
|
-
value: f ?
|
|
70
|
-
slot:
|
|
67
|
+
status: N ? N(h) : "",
|
|
68
|
+
description: B ? h[B] || b : "",
|
|
69
|
+
value: f ? h[f] || v : "",
|
|
70
|
+
slot: d
|
|
71
71
|
})),
|
|
72
|
-
data:
|
|
72
|
+
data: h
|
|
73
73
|
})));
|
|
74
74
|
return _e(() => {
|
|
75
75
|
if (a.paramConfig && a.paramConfig.length)
|
|
76
|
-
for (let
|
|
77
|
-
const
|
|
78
|
-
l[
|
|
76
|
+
for (let h = 0; h < a.paramConfig.length; h++) {
|
|
77
|
+
const $ = a.paramConfig[h];
|
|
78
|
+
l[$.value] = $.defaultValue;
|
|
79
79
|
}
|
|
80
80
|
}), Ce(() => {
|
|
81
|
-
}),
|
|
82
|
-
getList:
|
|
83
|
-
setKeyowrd:
|
|
84
|
-
}), (
|
|
85
|
-
const
|
|
86
|
-
return
|
|
87
|
-
|
|
88
|
-
(
|
|
81
|
+
}), y({
|
|
82
|
+
getList: Y,
|
|
83
|
+
setKeyowrd: i
|
|
84
|
+
}), (h, $) => {
|
|
85
|
+
const I = M("yhm-tabs"), W = M("van-search"), K = M("yhm-dropdown-item"), V = M("yhm-form"), n = M("van-dropdown-item"), N = M("van-dropdown-menu"), B = M("yhm-info-item"), b = M("yhm-info"), d = M("van-list"), f = M("van-pull-refresh");
|
|
86
|
+
return c(), x("section", Oe, [
|
|
87
|
+
w("section", Le, [
|
|
88
|
+
(c(!0), x(P, null, X(U(S), (v) => (c(), q(I, {
|
|
89
89
|
valueObj: l,
|
|
90
|
-
value:
|
|
91
|
-
optionData:
|
|
90
|
+
value: v.value,
|
|
91
|
+
optionData: v.optionData
|
|
92
92
|
}, null, 8, ["valueObj", "value", "optionData"]))), 256)),
|
|
93
|
-
e.hasSearch ? (
|
|
93
|
+
e.hasSearch ? (c(), q(W, {
|
|
94
94
|
key: 0,
|
|
95
|
-
modelValue:
|
|
95
|
+
modelValue: m.value,
|
|
96
96
|
"onUpdate:modelValue": [
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
$[0] || ($[0] = (v) => m.value = v),
|
|
98
|
+
$[1] || ($[1] = (v) => O("update"))
|
|
99
99
|
],
|
|
100
100
|
placeholder: e.searchPlaceholder,
|
|
101
|
-
onSearch:
|
|
101
|
+
onSearch: $[2] || ($[2] = (v) => O("search")),
|
|
102
102
|
clearable: !1
|
|
103
103
|
}, null, 8, ["modelValue", "placeholder"])) : te("", !0),
|
|
104
|
-
|
|
105
|
-
default:
|
|
106
|
-
(
|
|
104
|
+
U(H) && U(H).length || U(z) && U(z).length ? (c(), q(N, { key: 1 }, {
|
|
105
|
+
default: j(() => [
|
|
106
|
+
(c(!0), x(P, null, X(U(H), (v) => (c(), q(K, {
|
|
107
107
|
valueObj: l,
|
|
108
|
-
value:
|
|
109
|
-
optionData:
|
|
108
|
+
value: v.value,
|
|
109
|
+
optionData: v.optionData
|
|
110
110
|
}, null, 8, ["valueObj", "value", "optionData"]))), 256)),
|
|
111
|
-
|
|
111
|
+
U(z) && U(z).length ? (c(), q(n, {
|
|
112
112
|
key: 0,
|
|
113
113
|
title: "筛选",
|
|
114
114
|
class: "custom-param-container"
|
|
115
115
|
}, {
|
|
116
|
-
default:
|
|
117
|
-
|
|
116
|
+
default: j(() => [
|
|
117
|
+
R(V, {
|
|
118
118
|
formData: l,
|
|
119
|
-
options:
|
|
119
|
+
options: U(z)
|
|
120
120
|
}, null, 8, ["formData", "options"])
|
|
121
121
|
]),
|
|
122
122
|
_: 1
|
|
@@ -125,32 +125,32 @@ const Te = { class: "yhm-list-container" }, He = { class: "list-condition-contai
|
|
|
125
125
|
_: 1
|
|
126
126
|
})) : te("", !0)
|
|
127
127
|
]),
|
|
128
|
-
|
|
129
|
-
modelValue:
|
|
130
|
-
"onUpdate:modelValue":
|
|
131
|
-
onRefresh:
|
|
128
|
+
R(f, {
|
|
129
|
+
modelValue: C.value,
|
|
130
|
+
"onUpdate:modelValue": $[4] || ($[4] = (v) => C.value = v),
|
|
131
|
+
onRefresh: $[5] || ($[5] = (v) => Y(!0))
|
|
132
132
|
}, {
|
|
133
|
-
default:
|
|
134
|
-
|
|
135
|
-
loading:
|
|
136
|
-
"onUpdate:loading":
|
|
137
|
-
finished:
|
|
138
|
-
error:
|
|
133
|
+
default: j(() => [
|
|
134
|
+
R(d, {
|
|
135
|
+
loading: g.value,
|
|
136
|
+
"onUpdate:loading": $[3] || ($[3] = (v) => g.value = v),
|
|
137
|
+
finished: k.value,
|
|
138
|
+
error: s.value,
|
|
139
139
|
"error-text": "遇到错误了,点击重试",
|
|
140
140
|
"finished-text": "没有更多了",
|
|
141
141
|
ref_key: "scrollContent",
|
|
142
142
|
ref: t,
|
|
143
|
-
onLoad:
|
|
143
|
+
onLoad: Y
|
|
144
144
|
}, {
|
|
145
|
-
default:
|
|
146
|
-
(
|
|
147
|
-
|
|
148
|
-
default:
|
|
149
|
-
(
|
|
150
|
-
r.slot ?
|
|
145
|
+
default: j(() => [
|
|
146
|
+
(c(!0), x(P, null, X(U(A), (v) => (c(), x(P, null, [
|
|
147
|
+
R(b, { "has-top": "" }, {
|
|
148
|
+
default: j(() => [
|
|
149
|
+
(c(!0), x(P, null, X(v.cols, (r) => (c(), x(P, null, [
|
|
150
|
+
r.slot ? he(h.$slots, r.slot, {
|
|
151
151
|
key: 0,
|
|
152
|
-
row:
|
|
153
|
-
}) : (
|
|
152
|
+
row: v
|
|
153
|
+
}) : (c(), q(B, {
|
|
154
154
|
key: 1,
|
|
155
155
|
label: r.label,
|
|
156
156
|
"regular-value": "",
|
|
@@ -166,17 +166,17 @@ const Te = { class: "yhm-list-container" }, He = { class: "list-condition-contai
|
|
|
166
166
|
]),
|
|
167
167
|
_: 2
|
|
168
168
|
}, 1024),
|
|
169
|
-
e.listConfig.btns && e.listConfig.btns.length > 0 ? (
|
|
169
|
+
e.listConfig.btns && e.listConfig.btns.length > 0 ? (c(), q(b, {
|
|
170
170
|
key: 0,
|
|
171
171
|
class: "yhm-list-item-actions"
|
|
172
172
|
}, {
|
|
173
|
-
default:
|
|
174
|
-
(
|
|
175
|
-
!r.show || r.show && r.show(
|
|
173
|
+
default: j(() => [
|
|
174
|
+
(c(!0), x(P, null, X(e.listConfig.btns, (r) => (c(), x(P, null, [
|
|
175
|
+
!r.show || r.show && r.show(v.data) ? (c(), x("div", {
|
|
176
176
|
key: 0,
|
|
177
177
|
class: se(`yhm-list-btn${r.type ? " " + r.type : ""}${r.size ? " " + r.size : ""}`),
|
|
178
|
-
onClick: () => r.callback(
|
|
179
|
-
}, G(r.text), 11,
|
|
178
|
+
onClick: () => r.callback(v.data)
|
|
179
|
+
}, G(r.text), 11, Te)) : te("", !0)
|
|
180
180
|
], 64))), 256))
|
|
181
181
|
]),
|
|
182
182
|
_: 2
|
|
@@ -192,7 +192,7 @@ const Te = { class: "yhm-list-container" }, He = { class: "list-condition-contai
|
|
|
192
192
|
};
|
|
193
193
|
}
|
|
194
194
|
});
|
|
195
|
-
const
|
|
195
|
+
const Ie = /* @__PURE__ */ Z({
|
|
196
196
|
__name: "yhmDropdownItem",
|
|
197
197
|
props: {
|
|
198
198
|
valueObj: null,
|
|
@@ -200,28 +200,28 @@ const Oe = /* @__PURE__ */ E({
|
|
|
200
200
|
optionData: null
|
|
201
201
|
},
|
|
202
202
|
emits: ["change"],
|
|
203
|
-
setup(e, { emit:
|
|
204
|
-
const a = e, t =
|
|
203
|
+
setup(e, { emit: y }) {
|
|
204
|
+
const a = e, t = F({
|
|
205
205
|
get() {
|
|
206
206
|
return a.valueObj[a.value];
|
|
207
207
|
},
|
|
208
|
-
set(
|
|
209
|
-
a.valueObj[a.value] =
|
|
208
|
+
set(i) {
|
|
209
|
+
a.valueObj[a.value] = i;
|
|
210
210
|
}
|
|
211
211
|
});
|
|
212
|
-
function
|
|
213
|
-
t.value =
|
|
212
|
+
function m(i) {
|
|
213
|
+
t.value = i, y("change");
|
|
214
214
|
}
|
|
215
|
-
return (
|
|
216
|
-
const o =
|
|
217
|
-
return
|
|
218
|
-
"model-value":
|
|
219
|
-
"onUpdate:modelValue":
|
|
215
|
+
return (i, l) => {
|
|
216
|
+
const o = M("van-dropdown-item");
|
|
217
|
+
return c(), q(o, {
|
|
218
|
+
"model-value": U(t),
|
|
219
|
+
"onUpdate:modelValue": m,
|
|
220
220
|
options: e.optionData
|
|
221
221
|
}, null, 8, ["model-value", "options"]);
|
|
222
222
|
};
|
|
223
223
|
}
|
|
224
|
-
}),
|
|
224
|
+
}), Be = ["onClick"], je = /* @__PURE__ */ Z({
|
|
225
225
|
__name: "yhmTabs",
|
|
226
226
|
props: {
|
|
227
227
|
valueObj: null,
|
|
@@ -229,60 +229,60 @@ const Oe = /* @__PURE__ */ E({
|
|
|
229
229
|
optionData: null
|
|
230
230
|
},
|
|
231
231
|
emits: ["change"],
|
|
232
|
-
setup(e, { emit:
|
|
233
|
-
const a = e, t =
|
|
232
|
+
setup(e, { emit: y }) {
|
|
233
|
+
const a = e, t = F({
|
|
234
234
|
get() {
|
|
235
235
|
return a.valueObj[a.value];
|
|
236
236
|
},
|
|
237
237
|
set(l) {
|
|
238
238
|
a.valueObj[a.value] = l;
|
|
239
239
|
}
|
|
240
|
-
}),
|
|
240
|
+
}), m = D();
|
|
241
241
|
de(
|
|
242
242
|
() => t.value,
|
|
243
243
|
(l) => {
|
|
244
|
-
var
|
|
245
|
-
let o = a.optionData.map((
|
|
246
|
-
if (o && o.length &&
|
|
247
|
-
let
|
|
248
|
-
(
|
|
244
|
+
var g;
|
|
245
|
+
let o = a.optionData.map((s) => s.value);
|
|
246
|
+
if (o && o.length && m.value) {
|
|
247
|
+
let s = Array.from(m.value.querySelectorAll(".yhm-tab-item")), u = o.indexOf(l);
|
|
248
|
+
(g = s[u]) == null || g.scrollIntoView({ behavior: "smooth", block: "center", inline: "center" });
|
|
249
249
|
}
|
|
250
250
|
}
|
|
251
251
|
);
|
|
252
|
-
function
|
|
253
|
-
t.value = o,
|
|
252
|
+
function i(l, o) {
|
|
253
|
+
t.value = o, y("change");
|
|
254
254
|
}
|
|
255
|
-
return (l, o) => (
|
|
255
|
+
return (l, o) => (c(), x("section", {
|
|
256
256
|
class: "yhm-tabs",
|
|
257
257
|
ref_key: "yhmTabsRef",
|
|
258
|
-
ref:
|
|
258
|
+
ref: m
|
|
259
259
|
}, [
|
|
260
|
-
(
|
|
261
|
-
class: se(["yhm-tab-item", { active:
|
|
262
|
-
onClick: (
|
|
263
|
-
}, G(
|
|
260
|
+
(c(!0), x(P, null, X(e.optionData, (g) => (c(), x("div", {
|
|
261
|
+
class: se(["yhm-tab-item", { active: g.value === U(t) }]),
|
|
262
|
+
onClick: (s) => i(s, g.value)
|
|
263
|
+
}, G(g.text), 11, Be))), 256))
|
|
264
264
|
], 512));
|
|
265
265
|
}
|
|
266
266
|
});
|
|
267
|
-
const
|
|
267
|
+
const Ue = /* @__PURE__ */ Z({
|
|
268
268
|
__name: "yhmInfo",
|
|
269
269
|
props: {
|
|
270
270
|
hasTop: { type: Boolean, default: !1 }
|
|
271
271
|
},
|
|
272
272
|
setup(e) {
|
|
273
|
-
return (
|
|
273
|
+
return (y, a) => (c(), x("section", {
|
|
274
274
|
class: se(["yhm-info", {
|
|
275
275
|
"has-top": e.hasTop
|
|
276
276
|
}])
|
|
277
277
|
}, [
|
|
278
|
-
|
|
278
|
+
he(y.$slots, "default")
|
|
279
279
|
], 2));
|
|
280
280
|
}
|
|
281
281
|
});
|
|
282
|
-
const
|
|
282
|
+
const Re = { class: "yhm-info-item-label" }, ze = { class: "yhm-info-item-value" }, Ne = {
|
|
283
283
|
key: 0,
|
|
284
284
|
class: "yhm-info-description"
|
|
285
|
-
}, Ae = /* @__PURE__ */
|
|
285
|
+
}, Ae = /* @__PURE__ */ Z({
|
|
286
286
|
__name: "yhmInfoItem",
|
|
287
287
|
props: {
|
|
288
288
|
span: { default: 24 },
|
|
@@ -296,46 +296,46 @@ const ze = { class: "yhm-info-item-label" }, je = { class: "yhm-info-item-value"
|
|
|
296
296
|
status: null
|
|
297
297
|
},
|
|
298
298
|
setup(e) {
|
|
299
|
-
const
|
|
300
|
-
|
|
301
|
-
"5116e62f":
|
|
302
|
-
"0f0cc1b6":
|
|
303
|
-
"2b7b0829":
|
|
304
|
-
"56815a18":
|
|
299
|
+
const y = e;
|
|
300
|
+
ke((m) => ({
|
|
301
|
+
"5116e62f": U(t),
|
|
302
|
+
"0f0cc1b6": U(a),
|
|
303
|
+
"2b7b0829": m.$props.align,
|
|
304
|
+
"56815a18": m.$props.descAlign
|
|
305
305
|
}));
|
|
306
|
-
const a =
|
|
307
|
-
return (
|
|
306
|
+
const a = F(() => `${y.fontSize}px`), t = F(() => 24 / y.span);
|
|
307
|
+
return (m, i) => (c(), x("section", {
|
|
308
308
|
class: se(`yhm-info-item-container${e.status ? " " + e.status : ""}`)
|
|
309
309
|
}, [
|
|
310
|
-
|
|
310
|
+
w("div", {
|
|
311
311
|
class: se(`yhm-info-item${e.regularValue ? " regular-value" : ""}`)
|
|
312
312
|
}, [
|
|
313
|
-
|
|
314
|
-
|
|
313
|
+
w("div", Re, [
|
|
314
|
+
he(m.$slots, "label", {}, () => [
|
|
315
315
|
oe(G(e.label), 1)
|
|
316
316
|
])
|
|
317
317
|
]),
|
|
318
|
-
|
|
319
|
-
|
|
318
|
+
w("div", ze, [
|
|
319
|
+
he(m.$slots, "value", {}, () => [
|
|
320
320
|
oe(G(e.value), 1)
|
|
321
321
|
])
|
|
322
322
|
])
|
|
323
323
|
], 2),
|
|
324
|
-
e.description ? (
|
|
325
|
-
|
|
324
|
+
e.description ? (c(), x("div", Ne, [
|
|
325
|
+
he(m.$slots, "description", {}, () => [
|
|
326
326
|
oe(G(e.description), 1)
|
|
327
327
|
])
|
|
328
328
|
])) : te("", !0)
|
|
329
329
|
], 2));
|
|
330
330
|
}
|
|
331
331
|
});
|
|
332
|
-
const Fe = { class: "yhm-table-container" },
|
|
332
|
+
const Fe = { class: "yhm-table-container" }, Ee = { class: "yhm-table" }, Pe = {
|
|
333
333
|
key: 0,
|
|
334
334
|
width: "50"
|
|
335
335
|
}, We = ["width", "align"], Ze = { key: 0 }, qe = ["align"], Ke = {
|
|
336
336
|
key: 0,
|
|
337
337
|
aling: "center"
|
|
338
|
-
}, Je = ["align"], Ge = /* @__PURE__ */
|
|
338
|
+
}, Je = ["align"], Ge = /* @__PURE__ */ Z({
|
|
339
339
|
__name: "yhmTable",
|
|
340
340
|
props: {
|
|
341
341
|
data: { default: [] },
|
|
@@ -343,43 +343,43 @@ const Fe = { class: "yhm-table-container" }, Pe = { class: "yhm-table" }, Ee = {
|
|
|
343
343
|
columns: { default: [] }
|
|
344
344
|
},
|
|
345
345
|
setup(e) {
|
|
346
|
-
const
|
|
347
|
-
|
|
348
|
-
"60f0d7f6":
|
|
346
|
+
const y = e;
|
|
347
|
+
ke((t) => ({
|
|
348
|
+
"60f0d7f6": U(a)
|
|
349
349
|
}));
|
|
350
|
-
const a =
|
|
351
|
-
let t =
|
|
352
|
-
let l = parseInt(
|
|
353
|
-
return isNaN(l) || (l = 0),
|
|
350
|
+
const a = F(() => {
|
|
351
|
+
let t = y.columns.reduce((m, i) => {
|
|
352
|
+
let l = parseInt(i.width);
|
|
353
|
+
return isNaN(l) || (l = 0), m + l;
|
|
354
354
|
}, 0);
|
|
355
|
-
return
|
|
355
|
+
return y.hasIndex ? t === 0 ? "100%" : `${t + 50}px` : t === 0 ? "100%" : `${t}px`;
|
|
356
356
|
});
|
|
357
|
-
return (t,
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
e.hasIndex ? (
|
|
361
|
-
(
|
|
362
|
-
width:
|
|
363
|
-
align:
|
|
357
|
+
return (t, m) => (c(), x("section", Fe, [
|
|
358
|
+
w("table", Ee, [
|
|
359
|
+
w("colgroup", null, [
|
|
360
|
+
e.hasIndex ? (c(), x("col", Pe)) : te("", !0),
|
|
361
|
+
(c(!0), x(P, null, X(e.columns, (i) => (c(), x("col", {
|
|
362
|
+
width: i.width,
|
|
363
|
+
align: i.align
|
|
364
364
|
}, null, 8, We))), 256))
|
|
365
365
|
]),
|
|
366
|
-
|
|
367
|
-
e.hasIndex ? (
|
|
368
|
-
(
|
|
369
|
-
align:
|
|
370
|
-
}, G(
|
|
366
|
+
w("tr", null, [
|
|
367
|
+
e.hasIndex ? (c(), x("th", Ze, "#")) : te("", !0),
|
|
368
|
+
(c(!0), x(P, null, X(e.columns, (i) => (c(), x("th", {
|
|
369
|
+
align: i.align
|
|
370
|
+
}, G(i.label), 9, qe))), 256))
|
|
371
371
|
]),
|
|
372
|
-
(
|
|
373
|
-
e.hasIndex ? (
|
|
374
|
-
(
|
|
372
|
+
(c(!0), x(P, null, X(e.data, (i, l) => (c(), x("tr", null, [
|
|
373
|
+
e.hasIndex ? (c(), x("td", Ke, G(l + 1), 1)) : te("", !0),
|
|
374
|
+
(c(!0), x(P, null, X(e.columns, (o) => (c(), x("td", {
|
|
375
375
|
align: o.align
|
|
376
|
-
}, G(
|
|
376
|
+
}, G(i[o.prop]), 9, Je))), 256))
|
|
377
377
|
]))), 256))
|
|
378
378
|
])
|
|
379
379
|
]));
|
|
380
380
|
}
|
|
381
381
|
});
|
|
382
|
-
const Qe = { class: "yhm-form-container" }, Xe = { class: "yhm-form-actions" }, et = /* @__PURE__ */
|
|
382
|
+
const Qe = { class: "yhm-form-container" }, Xe = { class: "yhm-form-actions" }, et = /* @__PURE__ */ Z({
|
|
383
383
|
__name: "yhm-form",
|
|
384
384
|
props: {
|
|
385
385
|
options: null,
|
|
@@ -387,95 +387,95 @@ const Qe = { class: "yhm-form-container" }, Xe = { class: "yhm-form-actions" },
|
|
|
387
387
|
verification: { type: Boolean }
|
|
388
388
|
},
|
|
389
389
|
emits: ["update:verification"],
|
|
390
|
-
setup(e, { emit:
|
|
391
|
-
const a = e, t =
|
|
392
|
-
let { label: o, required:
|
|
393
|
-
switch (
|
|
390
|
+
setup(e, { emit: y }) {
|
|
391
|
+
const a = e, t = F(() => a.options.map((l) => {
|
|
392
|
+
let { label: o, required: g, name: s, defaultValue: u, disabled: _, placeholder: C, type: k, rexMsg: S, rex: H, itemChange: z, labelAlign: p, config: Y } = l, O = !1, A = "", h = "yhm-input";
|
|
393
|
+
switch (k) {
|
|
394
394
|
case "year":
|
|
395
395
|
case "month":
|
|
396
396
|
case "datetime":
|
|
397
397
|
case "date":
|
|
398
398
|
case "time":
|
|
399
|
-
|
|
399
|
+
h = "yhm-datetime", u || (u = "");
|
|
400
400
|
break;
|
|
401
401
|
case "radio":
|
|
402
|
-
|
|
402
|
+
h = "yhm-radio", u || (u = "");
|
|
403
403
|
break;
|
|
404
404
|
case "select":
|
|
405
|
-
|
|
405
|
+
h = "yhm-select", u || (u = "");
|
|
406
406
|
break;
|
|
407
407
|
case "switch":
|
|
408
|
-
|
|
408
|
+
h = "yhm-switch", u || (u = Y.activeValue || "");
|
|
409
409
|
break;
|
|
410
410
|
case "checkbox":
|
|
411
|
-
|
|
411
|
+
h = "yhm-checkbox", u || (u = []);
|
|
412
412
|
break;
|
|
413
413
|
}
|
|
414
414
|
return {
|
|
415
|
-
component:
|
|
416
|
-
rex:
|
|
415
|
+
component: h,
|
|
416
|
+
rex: H,
|
|
417
417
|
rexMsg: S,
|
|
418
|
-
name:
|
|
419
|
-
defaultValue:
|
|
420
|
-
error:
|
|
421
|
-
errorMessage:
|
|
418
|
+
name: s,
|
|
419
|
+
defaultValue: u,
|
|
420
|
+
error: O,
|
|
421
|
+
errorMessage: A,
|
|
422
422
|
attrs: {
|
|
423
423
|
label: o,
|
|
424
|
-
required:
|
|
424
|
+
required: g,
|
|
425
425
|
disabled: _,
|
|
426
|
-
placeholder:
|
|
427
|
-
type:
|
|
428
|
-
labelAlign:
|
|
429
|
-
...
|
|
426
|
+
placeholder: C,
|
|
427
|
+
type: k,
|
|
428
|
+
labelAlign: p,
|
|
429
|
+
...Y
|
|
430
430
|
},
|
|
431
|
-
itemChange:
|
|
431
|
+
itemChange: z
|
|
432
432
|
};
|
|
433
|
-
})),
|
|
433
|
+
})), m = we({});
|
|
434
434
|
de(
|
|
435
|
-
() =>
|
|
435
|
+
() => m,
|
|
436
436
|
(l) => {
|
|
437
|
-
let o = Object.values(l),
|
|
438
|
-
|
|
437
|
+
let o = Object.values(l), g = !(o && o.includes(!0));
|
|
438
|
+
y("update:verification", g);
|
|
439
439
|
},
|
|
440
440
|
{
|
|
441
441
|
deep: !0,
|
|
442
442
|
immediate: !0
|
|
443
443
|
}
|
|
444
444
|
);
|
|
445
|
-
function
|
|
445
|
+
function i(l, o) {
|
|
446
446
|
let {
|
|
447
|
-
name:
|
|
448
|
-
itemChange:
|
|
449
|
-
rex:
|
|
447
|
+
name: g,
|
|
448
|
+
itemChange: s,
|
|
449
|
+
rex: u,
|
|
450
450
|
rexMsg: _,
|
|
451
|
-
attrs: { required:
|
|
451
|
+
attrs: { required: C }
|
|
452
452
|
} = o;
|
|
453
|
-
a.formData[
|
|
454
|
-
let
|
|
455
|
-
l instanceof Array ?
|
|
453
|
+
a.formData[g] = l, s && typeof s == "function" && s(l, a.formData);
|
|
454
|
+
let k = !1;
|
|
455
|
+
l instanceof Array ? k = l.length > 0 : typeof l == "number" ? k = !isNaN(l) : k = !!l;
|
|
456
456
|
let S = !0;
|
|
457
|
-
|
|
457
|
+
u && u instanceof RegExp && (S = u.test(l), S || (o.error = !0, o.errorMessage = _)), u === void 0 && typeof C == "boolean" && C && !k && (S = !1, o.error = !0, o.errorMessage = `${o.attrs.label}不能为空`), S ? (m[g] = !1, o.error = !1, o.errorMessage = "") : m[g] = !0;
|
|
458
458
|
}
|
|
459
459
|
return _e(() => {
|
|
460
460
|
t.value.forEach((l) => {
|
|
461
|
-
|
|
461
|
+
i(l.defaultValue || "", l);
|
|
462
462
|
});
|
|
463
463
|
}), (l, o) => {
|
|
464
|
-
const
|
|
465
|
-
return
|
|
466
|
-
|
|
467
|
-
default:
|
|
468
|
-
(
|
|
469
|
-
error:
|
|
470
|
-
"error-message":
|
|
471
|
-
"model-value": e.formData[
|
|
472
|
-
"onUpdate:modelValue": (
|
|
464
|
+
const g = M("van-form");
|
|
465
|
+
return c(), x("section", Qe, [
|
|
466
|
+
R(g, null, {
|
|
467
|
+
default: j(() => [
|
|
468
|
+
(c(!0), x(P, null, X(U(t), (s) => (c(), q(Se(s.component), ae(s.attrs, {
|
|
469
|
+
error: s.error,
|
|
470
|
+
"error-message": s.errorMessage,
|
|
471
|
+
"model-value": e.formData[s.name],
|
|
472
|
+
"onUpdate:modelValue": (u) => i(u, s)
|
|
473
473
|
}), null, 16, ["error", "error-message", "model-value", "onUpdate:modelValue"]))), 256))
|
|
474
474
|
]),
|
|
475
475
|
_: 1
|
|
476
476
|
}),
|
|
477
|
-
|
|
478
|
-
|
|
477
|
+
w("div", Xe, [
|
|
478
|
+
he(l.$slots, "default")
|
|
479
479
|
])
|
|
480
480
|
]);
|
|
481
481
|
};
|
|
@@ -486,66 +486,66 @@ function nt(e) {
|
|
|
486
486
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
487
487
|
}
|
|
488
488
|
var Me = { exports: {} };
|
|
489
|
-
(function(e,
|
|
489
|
+
(function(e, y) {
|
|
490
490
|
(function(a, t) {
|
|
491
491
|
e.exports = t();
|
|
492
492
|
})(tt, function() {
|
|
493
|
-
var a = 1e3, t = 6e4,
|
|
494
|
-
var
|
|
495
|
-
return "[" + b + (
|
|
496
|
-
} },
|
|
497
|
-
var
|
|
498
|
-
return !
|
|
499
|
-
},
|
|
500
|
-
var
|
|
501
|
-
return (
|
|
502
|
-
}, m: function b(
|
|
503
|
-
if (
|
|
504
|
-
return -b(f,
|
|
505
|
-
var
|
|
506
|
-
return +(-(
|
|
493
|
+
var a = 1e3, t = 6e4, m = 36e5, i = "millisecond", l = "second", o = "minute", g = "hour", s = "day", u = "week", _ = "month", C = "quarter", k = "year", S = "date", H = "Invalid Date", z = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, p = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, Y = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(b) {
|
|
494
|
+
var d = ["th", "st", "nd", "rd"], f = b % 100;
|
|
495
|
+
return "[" + b + (d[(f - 20) % 10] || d[f] || d[0]) + "]";
|
|
496
|
+
} }, O = function(b, d, f) {
|
|
497
|
+
var v = String(b);
|
|
498
|
+
return !v || v.length >= d ? b : "" + Array(d + 1 - v.length).join(f) + b;
|
|
499
|
+
}, A = { s: O, z: function(b) {
|
|
500
|
+
var d = -b.utcOffset(), f = Math.abs(d), v = Math.floor(f / 60), r = f % 60;
|
|
501
|
+
return (d <= 0 ? "+" : "-") + O(v, 2, "0") + ":" + O(r, 2, "0");
|
|
502
|
+
}, m: function b(d, f) {
|
|
503
|
+
if (d.date() < f.date())
|
|
504
|
+
return -b(f, d);
|
|
505
|
+
var v = 12 * (f.year() - d.year()) + (f.month() - d.month()), r = d.clone().add(v, _), L = f - r < 0, T = d.clone().add(v + (L ? -1 : 1), _);
|
|
506
|
+
return +(-(v + (f - r) / (L ? r - T : T - r)) || 0);
|
|
507
507
|
}, a: function(b) {
|
|
508
508
|
return b < 0 ? Math.ceil(b) || 0 : Math.floor(b);
|
|
509
509
|
}, p: function(b) {
|
|
510
|
-
return { M: _, y:
|
|
510
|
+
return { M: _, y: k, w: u, d: s, D: S, h: g, m: o, s: l, ms: i, Q: C }[b] || String(b || "").toLowerCase().replace(/s$/, "");
|
|
511
511
|
}, u: function(b) {
|
|
512
512
|
return b === void 0;
|
|
513
|
-
} },
|
|
514
|
-
|
|
515
|
-
var
|
|
516
|
-
return b instanceof N || !(!b || !b[
|
|
517
|
-
},
|
|
513
|
+
} }, h = "en", $ = {};
|
|
514
|
+
$[h] = Y;
|
|
515
|
+
var I = "$isDayjsObject", W = function(b) {
|
|
516
|
+
return b instanceof N || !(!b || !b[I]);
|
|
517
|
+
}, K = function b(d, f, v) {
|
|
518
518
|
var r;
|
|
519
|
-
if (!
|
|
520
|
-
return
|
|
521
|
-
if (typeof
|
|
522
|
-
var
|
|
523
|
-
|
|
524
|
-
var
|
|
525
|
-
if (!r &&
|
|
526
|
-
return b(
|
|
519
|
+
if (!d)
|
|
520
|
+
return h;
|
|
521
|
+
if (typeof d == "string") {
|
|
522
|
+
var L = d.toLowerCase();
|
|
523
|
+
$[L] && (r = L), f && ($[L] = f, r = L);
|
|
524
|
+
var T = d.split("-");
|
|
525
|
+
if (!r && T.length > 1)
|
|
526
|
+
return b(T[0]);
|
|
527
527
|
} else {
|
|
528
|
-
var
|
|
529
|
-
|
|
528
|
+
var E = d.name;
|
|
529
|
+
$[E] = d, r = E;
|
|
530
530
|
}
|
|
531
|
-
return !
|
|
532
|
-
},
|
|
533
|
-
if (
|
|
531
|
+
return !v && r && (h = r), r || !v && h;
|
|
532
|
+
}, V = function(b, d) {
|
|
533
|
+
if (W(b))
|
|
534
534
|
return b.clone();
|
|
535
|
-
var f = typeof
|
|
535
|
+
var f = typeof d == "object" ? d : {};
|
|
536
536
|
return f.date = b, f.args = arguments, new N(f);
|
|
537
|
-
}, n =
|
|
538
|
-
n.l =
|
|
539
|
-
return
|
|
537
|
+
}, n = A;
|
|
538
|
+
n.l = K, n.i = W, n.w = function(b, d) {
|
|
539
|
+
return V(b, { locale: d.$L, utc: d.$u, x: d.$x, $offset: d.$offset });
|
|
540
540
|
};
|
|
541
541
|
var N = function() {
|
|
542
542
|
function b(f) {
|
|
543
|
-
this.$L =
|
|
543
|
+
this.$L = K(f.locale, null, !0), this.parse(f), this.$x = this.$x || f.x || {}, this[I] = !0;
|
|
544
544
|
}
|
|
545
|
-
var
|
|
546
|
-
return
|
|
547
|
-
this.$d = function(
|
|
548
|
-
var r =
|
|
545
|
+
var d = b.prototype;
|
|
546
|
+
return d.parse = function(f) {
|
|
547
|
+
this.$d = function(v) {
|
|
548
|
+
var r = v.date, L = v.utc;
|
|
549
549
|
if (r === null)
|
|
550
550
|
return /* @__PURE__ */ new Date(NaN);
|
|
551
551
|
if (n.u(r))
|
|
@@ -553,113 +553,113 @@ var Me = { exports: {} };
|
|
|
553
553
|
if (r instanceof Date)
|
|
554
554
|
return new Date(r);
|
|
555
555
|
if (typeof r == "string" && !/Z$/i.test(r)) {
|
|
556
|
-
var
|
|
557
|
-
if (
|
|
558
|
-
var
|
|
559
|
-
return
|
|
556
|
+
var T = r.match(z);
|
|
557
|
+
if (T) {
|
|
558
|
+
var E = T[2] - 1 || 0, J = (T[7] || "0").substring(0, 3);
|
|
559
|
+
return L ? new Date(Date.UTC(T[1], E, T[3] || 1, T[4] || 0, T[5] || 0, T[6] || 0, J)) : new Date(T[1], E, T[3] || 1, T[4] || 0, T[5] || 0, T[6] || 0, J);
|
|
560
560
|
}
|
|
561
561
|
}
|
|
562
562
|
return new Date(r);
|
|
563
563
|
}(f), this.init();
|
|
564
|
-
},
|
|
564
|
+
}, d.init = function() {
|
|
565
565
|
var f = this.$d;
|
|
566
566
|
this.$y = f.getFullYear(), this.$M = f.getMonth(), this.$D = f.getDate(), this.$W = f.getDay(), this.$H = f.getHours(), this.$m = f.getMinutes(), this.$s = f.getSeconds(), this.$ms = f.getMilliseconds();
|
|
567
|
-
},
|
|
567
|
+
}, d.$utils = function() {
|
|
568
568
|
return n;
|
|
569
|
-
},
|
|
570
|
-
return this.$d.toString() !==
|
|
571
|
-
},
|
|
572
|
-
var r =
|
|
573
|
-
return this.startOf(
|
|
574
|
-
},
|
|
575
|
-
return
|
|
576
|
-
},
|
|
577
|
-
return this.endOf(
|
|
578
|
-
},
|
|
579
|
-
return n.u(f) ? this[
|
|
580
|
-
},
|
|
569
|
+
}, d.isValid = function() {
|
|
570
|
+
return this.$d.toString() !== H;
|
|
571
|
+
}, d.isSame = function(f, v) {
|
|
572
|
+
var r = V(f);
|
|
573
|
+
return this.startOf(v) <= r && r <= this.endOf(v);
|
|
574
|
+
}, d.isAfter = function(f, v) {
|
|
575
|
+
return V(f) < this.startOf(v);
|
|
576
|
+
}, d.isBefore = function(f, v) {
|
|
577
|
+
return this.endOf(v) < V(f);
|
|
578
|
+
}, d.$g = function(f, v, r) {
|
|
579
|
+
return n.u(f) ? this[v] : this.set(r, f);
|
|
580
|
+
}, d.unix = function() {
|
|
581
581
|
return Math.floor(this.valueOf() / 1e3);
|
|
582
|
-
},
|
|
582
|
+
}, d.valueOf = function() {
|
|
583
583
|
return this.$d.getTime();
|
|
584
|
-
},
|
|
585
|
-
var r = this,
|
|
584
|
+
}, d.startOf = function(f, v) {
|
|
585
|
+
var r = this, L = !!n.u(v) || v, T = n.p(f), E = function(me, ne) {
|
|
586
586
|
var ie = n.w(r.$u ? Date.UTC(r.$y, ne, me) : new Date(r.$y, ne, me), r);
|
|
587
|
-
return
|
|
588
|
-
},
|
|
589
|
-
return n.w(r.toDate()[me].apply(r.toDate("s"), (
|
|
590
|
-
}, Q = this.$W, ee = this.$M, le = this.$D,
|
|
591
|
-
switch (
|
|
592
|
-
case
|
|
593
|
-
return
|
|
587
|
+
return L ? ie : ie.endOf(s);
|
|
588
|
+
}, J = function(me, ne) {
|
|
589
|
+
return n.w(r.toDate()[me].apply(r.toDate("s"), (L ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(ne)), r);
|
|
590
|
+
}, Q = this.$W, ee = this.$M, le = this.$D, ve = "set" + (this.$u ? "UTC" : "");
|
|
591
|
+
switch (T) {
|
|
592
|
+
case k:
|
|
593
|
+
return L ? E(1, 0) : E(31, 11);
|
|
594
594
|
case _:
|
|
595
|
-
return
|
|
596
|
-
case
|
|
595
|
+
return L ? E(1, ee) : E(0, ee + 1);
|
|
596
|
+
case u:
|
|
597
597
|
var ce = this.$locale().weekStart || 0, ye = (Q < ce ? Q + 7 : Q) - ce;
|
|
598
|
-
return
|
|
599
|
-
case
|
|
598
|
+
return E(L ? le - ye : le + (6 - ye), ee);
|
|
599
|
+
case s:
|
|
600
600
|
case S:
|
|
601
|
-
return
|
|
602
|
-
case
|
|
603
|
-
return
|
|
601
|
+
return J(ve + "Hours", 0);
|
|
602
|
+
case g:
|
|
603
|
+
return J(ve + "Minutes", 1);
|
|
604
604
|
case o:
|
|
605
|
-
return
|
|
605
|
+
return J(ve + "Seconds", 2);
|
|
606
606
|
case l:
|
|
607
|
-
return
|
|
607
|
+
return J(ve + "Milliseconds", 3);
|
|
608
608
|
default:
|
|
609
609
|
return this.clone();
|
|
610
610
|
}
|
|
611
|
-
},
|
|
611
|
+
}, d.endOf = function(f) {
|
|
612
612
|
return this.startOf(f, !1);
|
|
613
|
-
},
|
|
614
|
-
var r,
|
|
615
|
-
if (
|
|
613
|
+
}, d.$set = function(f, v) {
|
|
614
|
+
var r, L = n.p(f), T = "set" + (this.$u ? "UTC" : ""), E = (r = {}, r[s] = T + "Date", r[S] = T + "Date", r[_] = T + "Month", r[k] = T + "FullYear", r[g] = T + "Hours", r[o] = T + "Minutes", r[l] = T + "Seconds", r[i] = T + "Milliseconds", r)[L], J = L === s ? this.$D + (v - this.$W) : v;
|
|
615
|
+
if (L === _ || L === k) {
|
|
616
616
|
var Q = this.clone().set(S, 1);
|
|
617
|
-
Q.$d[
|
|
617
|
+
Q.$d[E](J), Q.init(), this.$d = Q.set(S, Math.min(this.$D, Q.daysInMonth())).$d;
|
|
618
618
|
} else
|
|
619
|
-
|
|
619
|
+
E && this.$d[E](J);
|
|
620
620
|
return this.init(), this;
|
|
621
|
-
},
|
|
622
|
-
return this.clone().$set(f,
|
|
623
|
-
},
|
|
621
|
+
}, d.set = function(f, v) {
|
|
622
|
+
return this.clone().$set(f, v);
|
|
623
|
+
}, d.get = function(f) {
|
|
624
624
|
return this[n.p(f)]();
|
|
625
|
-
},
|
|
626
|
-
var r,
|
|
625
|
+
}, d.add = function(f, v) {
|
|
626
|
+
var r, L = this;
|
|
627
627
|
f = Number(f);
|
|
628
|
-
var
|
|
629
|
-
var le =
|
|
630
|
-
return n.w(le.date(le.date() + Math.round(ee * f)),
|
|
628
|
+
var T = n.p(v), E = function(ee) {
|
|
629
|
+
var le = V(L);
|
|
630
|
+
return n.w(le.date(le.date() + Math.round(ee * f)), L);
|
|
631
631
|
};
|
|
632
|
-
if (
|
|
632
|
+
if (T === _)
|
|
633
633
|
return this.set(_, this.$M + f);
|
|
634
|
-
if (
|
|
635
|
-
return this.set(
|
|
636
|
-
if (
|
|
637
|
-
return
|
|
638
|
-
if (
|
|
639
|
-
return
|
|
640
|
-
var
|
|
634
|
+
if (T === k)
|
|
635
|
+
return this.set(k, this.$y + f);
|
|
636
|
+
if (T === s)
|
|
637
|
+
return E(1);
|
|
638
|
+
if (T === u)
|
|
639
|
+
return E(7);
|
|
640
|
+
var J = (r = {}, r[o] = t, r[g] = m, r[l] = a, r)[T] || 1, Q = this.$d.getTime() + f * J;
|
|
641
641
|
return n.w(Q, this);
|
|
642
|
-
},
|
|
643
|
-
return this.add(-1 * f,
|
|
644
|
-
},
|
|
645
|
-
var
|
|
642
|
+
}, d.subtract = function(f, v) {
|
|
643
|
+
return this.add(-1 * f, v);
|
|
644
|
+
}, d.format = function(f) {
|
|
645
|
+
var v = this, r = this.$locale();
|
|
646
646
|
if (!this.isValid())
|
|
647
|
-
return r.invalidDate ||
|
|
648
|
-
var
|
|
649
|
-
return ne && (ne[ie] || ne(
|
|
647
|
+
return r.invalidDate || H;
|
|
648
|
+
var L = f || "YYYY-MM-DDTHH:mm:ssZ", T = n.z(this), E = this.$H, J = this.$m, Q = this.$M, ee = r.weekdays, le = r.months, ve = r.meridiem, ce = function(ne, ie, pe, be) {
|
|
649
|
+
return ne && (ne[ie] || ne(v, L)) || pe[ie].slice(0, be);
|
|
650
650
|
}, ye = function(ne) {
|
|
651
|
-
return n.s(
|
|
652
|
-
}, me =
|
|
651
|
+
return n.s(E % 12 || 12, ne, "0");
|
|
652
|
+
}, me = ve || function(ne, ie, pe) {
|
|
653
653
|
var be = ne < 12 ? "AM" : "PM";
|
|
654
654
|
return pe ? be.toLowerCase() : be;
|
|
655
655
|
};
|
|
656
|
-
return
|
|
656
|
+
return L.replace(p, function(ne, ie) {
|
|
657
657
|
return ie || function(pe) {
|
|
658
658
|
switch (pe) {
|
|
659
659
|
case "YY":
|
|
660
|
-
return String(
|
|
660
|
+
return String(v.$y).slice(-2);
|
|
661
661
|
case "YYYY":
|
|
662
|
-
return n.s(
|
|
662
|
+
return n.s(v.$y, 4, "0");
|
|
663
663
|
case "M":
|
|
664
664
|
return Q + 1;
|
|
665
665
|
case "MM":
|
|
@@ -669,114 +669,114 @@ var Me = { exports: {} };
|
|
|
669
669
|
case "MMMM":
|
|
670
670
|
return ce(le, Q);
|
|
671
671
|
case "D":
|
|
672
|
-
return
|
|
672
|
+
return v.$D;
|
|
673
673
|
case "DD":
|
|
674
|
-
return n.s(
|
|
674
|
+
return n.s(v.$D, 2, "0");
|
|
675
675
|
case "d":
|
|
676
|
-
return String(
|
|
676
|
+
return String(v.$W);
|
|
677
677
|
case "dd":
|
|
678
|
-
return ce(r.weekdaysMin,
|
|
678
|
+
return ce(r.weekdaysMin, v.$W, ee, 2);
|
|
679
679
|
case "ddd":
|
|
680
|
-
return ce(r.weekdaysShort,
|
|
680
|
+
return ce(r.weekdaysShort, v.$W, ee, 3);
|
|
681
681
|
case "dddd":
|
|
682
|
-
return ee[
|
|
682
|
+
return ee[v.$W];
|
|
683
683
|
case "H":
|
|
684
|
-
return String(
|
|
684
|
+
return String(E);
|
|
685
685
|
case "HH":
|
|
686
|
-
return n.s(
|
|
686
|
+
return n.s(E, 2, "0");
|
|
687
687
|
case "h":
|
|
688
688
|
return ye(1);
|
|
689
689
|
case "hh":
|
|
690
690
|
return ye(2);
|
|
691
691
|
case "a":
|
|
692
|
-
return me(
|
|
692
|
+
return me(E, J, !0);
|
|
693
693
|
case "A":
|
|
694
|
-
return me(
|
|
694
|
+
return me(E, J, !1);
|
|
695
695
|
case "m":
|
|
696
|
-
return String(
|
|
696
|
+
return String(J);
|
|
697
697
|
case "mm":
|
|
698
|
-
return n.s(
|
|
698
|
+
return n.s(J, 2, "0");
|
|
699
699
|
case "s":
|
|
700
|
-
return String(
|
|
700
|
+
return String(v.$s);
|
|
701
701
|
case "ss":
|
|
702
|
-
return n.s(
|
|
702
|
+
return n.s(v.$s, 2, "0");
|
|
703
703
|
case "SSS":
|
|
704
|
-
return n.s(
|
|
704
|
+
return n.s(v.$ms, 3, "0");
|
|
705
705
|
case "Z":
|
|
706
|
-
return
|
|
706
|
+
return T;
|
|
707
707
|
}
|
|
708
708
|
return null;
|
|
709
|
-
}(ne) ||
|
|
709
|
+
}(ne) || T.replace(":", "");
|
|
710
710
|
});
|
|
711
|
-
},
|
|
711
|
+
}, d.utcOffset = function() {
|
|
712
712
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
713
|
-
},
|
|
714
|
-
var
|
|
715
|
-
return n.m(
|
|
713
|
+
}, d.diff = function(f, v, r) {
|
|
714
|
+
var L, T = this, E = n.p(v), J = V(f), Q = (J.utcOffset() - this.utcOffset()) * t, ee = this - J, le = function() {
|
|
715
|
+
return n.m(T, J);
|
|
716
716
|
};
|
|
717
|
-
switch (
|
|
718
|
-
case
|
|
719
|
-
|
|
717
|
+
switch (E) {
|
|
718
|
+
case k:
|
|
719
|
+
L = le() / 12;
|
|
720
720
|
break;
|
|
721
721
|
case _:
|
|
722
|
-
|
|
722
|
+
L = le();
|
|
723
723
|
break;
|
|
724
|
-
case
|
|
725
|
-
|
|
724
|
+
case C:
|
|
725
|
+
L = le() / 3;
|
|
726
726
|
break;
|
|
727
|
-
case
|
|
728
|
-
|
|
727
|
+
case u:
|
|
728
|
+
L = (ee - Q) / 6048e5;
|
|
729
729
|
break;
|
|
730
|
-
case
|
|
731
|
-
|
|
730
|
+
case s:
|
|
731
|
+
L = (ee - Q) / 864e5;
|
|
732
732
|
break;
|
|
733
|
-
case
|
|
734
|
-
|
|
733
|
+
case g:
|
|
734
|
+
L = ee / m;
|
|
735
735
|
break;
|
|
736
736
|
case o:
|
|
737
|
-
|
|
737
|
+
L = ee / t;
|
|
738
738
|
break;
|
|
739
739
|
case l:
|
|
740
|
-
|
|
740
|
+
L = ee / a;
|
|
741
741
|
break;
|
|
742
742
|
default:
|
|
743
|
-
|
|
743
|
+
L = ee;
|
|
744
744
|
}
|
|
745
|
-
return r ?
|
|
746
|
-
},
|
|
745
|
+
return r ? L : n.a(L);
|
|
746
|
+
}, d.daysInMonth = function() {
|
|
747
747
|
return this.endOf(_).$D;
|
|
748
|
-
},
|
|
749
|
-
return
|
|
750
|
-
},
|
|
748
|
+
}, d.$locale = function() {
|
|
749
|
+
return $[this.$L];
|
|
750
|
+
}, d.locale = function(f, v) {
|
|
751
751
|
if (!f)
|
|
752
752
|
return this.$L;
|
|
753
|
-
var r = this.clone(),
|
|
754
|
-
return
|
|
755
|
-
},
|
|
753
|
+
var r = this.clone(), L = K(f, v, !0);
|
|
754
|
+
return L && (r.$L = L), r;
|
|
755
|
+
}, d.clone = function() {
|
|
756
756
|
return n.w(this.$d, this);
|
|
757
|
-
},
|
|
757
|
+
}, d.toDate = function() {
|
|
758
758
|
return new Date(this.valueOf());
|
|
759
|
-
},
|
|
759
|
+
}, d.toJSON = function() {
|
|
760
760
|
return this.isValid() ? this.toISOString() : null;
|
|
761
|
-
},
|
|
761
|
+
}, d.toISOString = function() {
|
|
762
762
|
return this.$d.toISOString();
|
|
763
|
-
},
|
|
763
|
+
}, d.toString = function() {
|
|
764
764
|
return this.$d.toUTCString();
|
|
765
765
|
}, b;
|
|
766
|
-
}(),
|
|
767
|
-
return
|
|
768
|
-
|
|
769
|
-
return this.$g(
|
|
766
|
+
}(), B = N.prototype;
|
|
767
|
+
return V.prototype = B, [["$ms", i], ["$s", l], ["$m", o], ["$H", g], ["$W", s], ["$M", _], ["$y", k], ["$D", S]].forEach(function(b) {
|
|
768
|
+
B[b[1]] = function(d) {
|
|
769
|
+
return this.$g(d, b[0], b[1]);
|
|
770
770
|
};
|
|
771
|
-
}),
|
|
772
|
-
return b.$i || (b(
|
|
773
|
-
},
|
|
774
|
-
return
|
|
775
|
-
},
|
|
771
|
+
}), V.extend = function(b, d) {
|
|
772
|
+
return b.$i || (b(d, N, V), b.$i = !0), V;
|
|
773
|
+
}, V.locale = K, V.isDayjs = W, V.unix = function(b) {
|
|
774
|
+
return V(1e3 * b);
|
|
775
|
+
}, V.en = $[h], V.Ls = $, V.p = {}, V;
|
|
776
776
|
});
|
|
777
777
|
})(Me);
|
|
778
778
|
var at = Me.exports;
|
|
779
|
-
const ge = /* @__PURE__ */ nt(at), lt = { class: "yh-calendar" }, ot = { class: "top-bar" }, st = /* @__PURE__ */
|
|
779
|
+
const ge = /* @__PURE__ */ nt(at), lt = { class: "yh-calendar" }, ot = { class: "top-bar" }, st = /* @__PURE__ */ w("svg", {
|
|
780
780
|
class: "icon",
|
|
781
781
|
viewBox: "0 0 1000 1000",
|
|
782
782
|
version: "1.1",
|
|
@@ -784,7 +784,7 @@ const ge = /* @__PURE__ */ nt(at), lt = { class: "yh-calendar" }, ot = { class:
|
|
|
784
784
|
width: "100%",
|
|
785
785
|
height: "100%"
|
|
786
786
|
}, [
|
|
787
|
-
/* @__PURE__ */
|
|
787
|
+
/* @__PURE__ */ w("path", {
|
|
788
788
|
d: "M600 300 L 400 500 L 600 700",
|
|
789
789
|
fill: "transparent",
|
|
790
790
|
stroke: "black",
|
|
@@ -792,7 +792,7 @@ const ge = /* @__PURE__ */ nt(at), lt = { class: "yh-calendar" }, ot = { class:
|
|
|
792
792
|
})
|
|
793
793
|
], -1), rt = [
|
|
794
794
|
st
|
|
795
|
-
], it = { class: "moment" }, ut = /* @__PURE__ */
|
|
795
|
+
], it = { class: "moment" }, ut = /* @__PURE__ */ w("svg", {
|
|
796
796
|
class: "icon",
|
|
797
797
|
viewBox: "0 0 1000 1000",
|
|
798
798
|
version: "1.1",
|
|
@@ -800,7 +800,7 @@ const ge = /* @__PURE__ */ nt(at), lt = { class: "yh-calendar" }, ot = { class:
|
|
|
800
800
|
width: "100%",
|
|
801
801
|
height: "100%"
|
|
802
802
|
}, [
|
|
803
|
-
/* @__PURE__ */
|
|
803
|
+
/* @__PURE__ */ w("path", {
|
|
804
804
|
d: "M400 300 L 600 500 L 400 700",
|
|
805
805
|
fill: "transparent",
|
|
806
806
|
stroke: "black",
|
|
@@ -811,30 +811,32 @@ const ge = /* @__PURE__ */ nt(at), lt = { class: "yh-calendar" }, ot = { class:
|
|
|
811
811
|
], ct = {
|
|
812
812
|
key: 0,
|
|
813
813
|
class: "yh-calendar-row week"
|
|
814
|
-
}, mt = /* @__PURE__ */
|
|
814
|
+
}, mt = /* @__PURE__ */ Ye('<div class="yh-calendar-item"><div class="bottom-info">周一</div></div><div class="yh-calendar-item"><div class="bottom-info">周二</div></div><div class="yh-calendar-item"><div class="bottom-info">周三</div></div><div class="yh-calendar-item"><div class="bottom-info">周四</div></div><div class="yh-calendar-item"><div class="bottom-info">周五</div></div><div class="yh-calendar-item"><div class="bottom-info">周六</div></div><div class="yh-calendar-item"><div class="bottom-info">周日</div></div>', 7), ft = [
|
|
815
815
|
mt
|
|
816
|
-
],
|
|
816
|
+
], vt = ["onClick"], ht = { class: "solar-info" }, yt = ["onClick"], pt = { class: "solar-info" }, gt = ["onClick"], _t = { class: "solar-info" }, bt = /* @__PURE__ */ Z({
|
|
817
817
|
__name: "chooseDate",
|
|
818
818
|
props: {
|
|
819
819
|
type: null,
|
|
820
|
-
modelValue: null
|
|
820
|
+
modelValue: null,
|
|
821
|
+
max: null,
|
|
822
|
+
min: null
|
|
821
823
|
},
|
|
822
824
|
emits: ["update:modelValue", "change"],
|
|
823
|
-
setup(e, { expose:
|
|
824
|
-
const t = e,
|
|
825
|
+
setup(e, { expose: y, emit: a }) {
|
|
826
|
+
const t = e, m = D("day");
|
|
825
827
|
de(
|
|
826
828
|
() => t.type,
|
|
827
|
-
(
|
|
828
|
-
switch (
|
|
829
|
+
(p) => {
|
|
830
|
+
switch (p) {
|
|
829
831
|
case "year":
|
|
830
|
-
|
|
832
|
+
m.value = "year";
|
|
831
833
|
break;
|
|
832
834
|
case "month":
|
|
833
|
-
|
|
835
|
+
m.value = "month";
|
|
834
836
|
break;
|
|
835
837
|
case "date":
|
|
836
838
|
case "datetime":
|
|
837
|
-
|
|
839
|
+
m.value = "day";
|
|
838
840
|
break;
|
|
839
841
|
}
|
|
840
842
|
},
|
|
@@ -843,326 +845,355 @@ const ge = /* @__PURE__ */ nt(at), lt = { class: "yh-calendar" }, ot = { class:
|
|
|
843
845
|
immediate: !0
|
|
844
846
|
}
|
|
845
847
|
);
|
|
846
|
-
const
|
|
847
|
-
if (
|
|
848
|
-
let
|
|
849
|
-
|
|
850
|
-
let
|
|
851
|
-
for (let
|
|
852
|
-
let
|
|
853
|
-
V.push(
|
|
848
|
+
const i = D(ge()), l = F(() => i.value.format("YYYY")), o = F(() => i.value.format("MM")), g = F(() => i.value.format("DD")), s = F(() => m.value === "day" ? "month" : "year"), u = F(() => {
|
|
849
|
+
if (m.value === "day") {
|
|
850
|
+
let p = i.value.date(1), Y = p.endOf("month").date(), O = 1 - (p.day() === 0 ? 7 : p.day()), A = i.value.date(Y).day(), h = 0;
|
|
851
|
+
A === 0 ? h = Y : h = Y - (A - 7);
|
|
852
|
+
let $ = [];
|
|
853
|
+
for (let K = O; K < h; K++) {
|
|
854
|
+
let V = p.add(K, "day"), n = !1;
|
|
855
|
+
t.min && t.max ? n = !(V.valueOf() >= t.min.valueOf() && V.valueOf() <= t.max.valueOf()) : t.min ? n = V.valueOf() < t.min.valueOf() : t.max && (n = V.valueOf() > t.max.valueOf()), $.push({
|
|
856
|
+
notMoment: V.month() !== t.modelValue.month(),
|
|
857
|
+
choose: V.format("YYYYMMDD") === t.modelValue.format("YYYYMMDD"),
|
|
858
|
+
disabled: n,
|
|
859
|
+
info: V.date().toString(),
|
|
860
|
+
dayjs: V
|
|
861
|
+
});
|
|
854
862
|
}
|
|
855
|
-
let
|
|
856
|
-
for (let
|
|
857
|
-
|
|
858
|
-
return
|
|
859
|
-
} else if (
|
|
860
|
-
let
|
|
861
|
-
for (let
|
|
862
|
-
let
|
|
863
|
-
|
|
863
|
+
let I = Math.ceil($.length / 7), W = [];
|
|
864
|
+
for (let K = 0; K < I; K++)
|
|
865
|
+
W.push($.splice(0, 7));
|
|
866
|
+
return W;
|
|
867
|
+
} else if (m.value === "month") {
|
|
868
|
+
let p = i.value.month(), Y = 0 - p, O = -(p - 12), A = [];
|
|
869
|
+
for (let $ = Y; $ < O; $++) {
|
|
870
|
+
let I = i.value.add($, "month"), W = !1;
|
|
871
|
+
t.min && t.max ? W = I.valueOf() < t.min.valueOf() || I.valueOf() > t.max.valueOf() : t.min ? W = I.valueOf() < t.min.valueOf() : t.max && (W = I.valueOf() > t.max.valueOf()), A.push({
|
|
872
|
+
choose: I.format("YYYYMM") === t.modelValue.format("YYYYMM"),
|
|
873
|
+
disabled: W,
|
|
874
|
+
info: (I.month() + 1).toString(),
|
|
875
|
+
dayjs: I
|
|
876
|
+
});
|
|
864
877
|
}
|
|
865
|
-
let
|
|
866
|
-
for (let
|
|
867
|
-
|
|
868
|
-
return
|
|
878
|
+
let h = [];
|
|
879
|
+
for (let $ = 0; $ < 4; $++)
|
|
880
|
+
h.push(A.splice(0, 3));
|
|
881
|
+
return h;
|
|
869
882
|
} else {
|
|
870
|
-
let
|
|
871
|
-
for (let
|
|
872
|
-
let
|
|
873
|
-
|
|
883
|
+
let p = [];
|
|
884
|
+
for (let O = -11; O < 13; O++) {
|
|
885
|
+
let A = i.value.add(O, "year"), h = !1;
|
|
886
|
+
t.min && t.max ? h = A.valueOf() < t.min.valueOf() || A.valueOf() > t.max.valueOf() : t.min ? h = A.valueOf() < t.min.valueOf() : t.max && (h = A.valueOf() > t.max.valueOf()), p.push({
|
|
887
|
+
choose: A.format("YYYY") === t.modelValue.format("YYYY"),
|
|
888
|
+
disabled: h,
|
|
889
|
+
info: A.year().toString(),
|
|
890
|
+
dayjs: A
|
|
891
|
+
});
|
|
874
892
|
}
|
|
875
|
-
let
|
|
876
|
-
for (let
|
|
877
|
-
|
|
878
|
-
return
|
|
893
|
+
let Y = [];
|
|
894
|
+
for (let O = 0; O < 4; O++)
|
|
895
|
+
Y.push(p.splice(0, 3));
|
|
896
|
+
return Y;
|
|
879
897
|
}
|
|
880
898
|
});
|
|
881
|
-
function _(
|
|
882
|
-
|
|
899
|
+
function _(p) {
|
|
900
|
+
i.value = p, a("update:modelValue", p), a("change", p);
|
|
883
901
|
}
|
|
884
|
-
function
|
|
885
|
-
_(
|
|
902
|
+
function C(p) {
|
|
903
|
+
_(p), ["date", "datetime"].includes(t.type) && (m.value = "day");
|
|
886
904
|
}
|
|
887
|
-
function
|
|
888
|
-
_(
|
|
905
|
+
function k(p) {
|
|
906
|
+
_(p), ["month", "date", "datetime"].includes(t.type) && (m.value = "month");
|
|
889
907
|
}
|
|
890
908
|
function S() {
|
|
891
|
-
let
|
|
892
|
-
|
|
893
|
-
let
|
|
894
|
-
|
|
909
|
+
let p = -1;
|
|
910
|
+
s.value === "year" && (p = -12);
|
|
911
|
+
let Y = t.modelValue.add(p, s.value).date(1);
|
|
912
|
+
i.value = Y, _(Y);
|
|
895
913
|
}
|
|
896
|
-
function
|
|
897
|
-
let
|
|
898
|
-
|
|
899
|
-
let
|
|
900
|
-
|
|
914
|
+
function H() {
|
|
915
|
+
let p = 1;
|
|
916
|
+
s.value === "year" && (p = 12);
|
|
917
|
+
let Y = t.modelValue.add(p, s.value).date(1);
|
|
918
|
+
i.value = Y, _(Y);
|
|
901
919
|
}
|
|
902
|
-
function
|
|
903
|
-
t.modelValue.isValid() && (
|
|
920
|
+
function z() {
|
|
921
|
+
t.modelValue.isValid() && (i.value = t.modelValue.clone());
|
|
904
922
|
}
|
|
905
923
|
return de(
|
|
906
924
|
() => t.modelValue,
|
|
907
925
|
() => {
|
|
908
926
|
}
|
|
909
|
-
),
|
|
910
|
-
syncModelValue:
|
|
927
|
+
), y({
|
|
928
|
+
syncModelValue: z
|
|
911
929
|
}), _e(() => {
|
|
912
|
-
}), (
|
|
913
|
-
|
|
914
|
-
|
|
930
|
+
}), (p, Y) => (c(), x("div", lt, [
|
|
931
|
+
w("div", ot, [
|
|
932
|
+
w("div", {
|
|
915
933
|
class: "prev",
|
|
916
934
|
onClick: S
|
|
917
935
|
}, rt),
|
|
918
|
-
|
|
919
|
-
|
|
936
|
+
w("div", it, [
|
|
937
|
+
w("span", {
|
|
920
938
|
class: "yh-calendar-btn",
|
|
921
|
-
onClick:
|
|
922
|
-
}, G(
|
|
923
|
-
re(
|
|
939
|
+
onClick: Y[0] || (Y[0] = (O) => m.value = "year")
|
|
940
|
+
}, G(U(l)) + "年 ", 1),
|
|
941
|
+
re(w("span", {
|
|
924
942
|
class: "yh-calendar-btn",
|
|
925
|
-
onClick:
|
|
926
|
-
}, G(
|
|
943
|
+
onClick: Y[1] || (Y[1] = (O) => m.value = "month")
|
|
944
|
+
}, G(U(o)) + "月 ", 513), [
|
|
927
945
|
[$e, ["month", "date", "datetime"].includes(e.type)]
|
|
928
946
|
]),
|
|
929
|
-
re(
|
|
947
|
+
re(w("span", {
|
|
930
948
|
class: "yh-calendar-btn",
|
|
931
|
-
onClick:
|
|
932
|
-
}, G(
|
|
949
|
+
onClick: Y[2] || (Y[2] = (O) => m.value = "day")
|
|
950
|
+
}, G(U(g)) + "日 ", 513), [
|
|
933
951
|
[$e, ["date", "datetime"].includes(e.type)]
|
|
934
952
|
])
|
|
935
953
|
]),
|
|
936
|
-
|
|
954
|
+
w("div", {
|
|
937
955
|
class: "next",
|
|
938
|
-
onClick:
|
|
956
|
+
onClick: H
|
|
939
957
|
}, dt)
|
|
940
958
|
]),
|
|
941
|
-
|
|
942
|
-
(
|
|
959
|
+
m.value === "day" ? (c(), x("div", ct, ft)) : te("", !0),
|
|
960
|
+
(c(!0), x(P, null, X(U(u), (O, A) => (c(), x("div", {
|
|
943
961
|
class: "yh-calendar-row",
|
|
944
|
-
key:
|
|
962
|
+
key: A
|
|
945
963
|
}, [
|
|
946
|
-
|
|
947
|
-
class: se(["yh-calendar-item", { "not-moment":
|
|
948
|
-
onClick: (
|
|
949
|
-
key:
|
|
964
|
+
m.value === "day" ? (c(!0), x(P, { key: 0 }, X(O, (h, $) => (c(), x("div", {
|
|
965
|
+
class: se(["yh-calendar-item", { "not-moment": h.notMoment, choose: h.choose, disabled: h.disabled }]),
|
|
966
|
+
onClick: (I) => _(h.dayjs),
|
|
967
|
+
key: $
|
|
950
968
|
}, [
|
|
951
|
-
|
|
952
|
-
], 10,
|
|
953
|
-
|
|
954
|
-
class: se(["yh-calendar-item month", { choose:
|
|
955
|
-
onClick: (
|
|
956
|
-
key:
|
|
969
|
+
w("div", ht, G(h.info), 1)
|
|
970
|
+
], 10, vt))), 128)) : te("", !0),
|
|
971
|
+
m.value === "month" ? (c(!0), x(P, { key: 1 }, X(O, (h, $) => (c(), x("div", {
|
|
972
|
+
class: se(["yh-calendar-item month", { choose: h.choose, disabled: h.disabled }]),
|
|
973
|
+
onClick: (I) => C(h.dayjs),
|
|
974
|
+
key: $
|
|
957
975
|
}, [
|
|
958
|
-
|
|
976
|
+
w("div", pt, G(h.info) + "月", 1)
|
|
959
977
|
], 10, yt))), 128)) : te("", !0),
|
|
960
|
-
|
|
961
|
-
class: se(["yh-calendar-item year", { choose:
|
|
962
|
-
onClick: (
|
|
963
|
-
key:
|
|
978
|
+
m.value === "year" ? (c(!0), x(P, { key: 2 }, X(O, (h, $) => (c(), x("div", {
|
|
979
|
+
class: se(["yh-calendar-item year", { choose: h.choose, disabled: h.disabled }]),
|
|
980
|
+
onClick: (I) => k(h.dayjs),
|
|
981
|
+
key: $
|
|
964
982
|
}, [
|
|
965
|
-
|
|
983
|
+
w("div", _t, G(h.info), 1)
|
|
966
984
|
], 10, gt))), 128)) : te("", !0)
|
|
967
985
|
]))), 128))
|
|
968
986
|
]));
|
|
969
987
|
}
|
|
970
988
|
});
|
|
971
|
-
const Vt = /* @__PURE__ */
|
|
989
|
+
const Vt = /* @__PURE__ */ Z({
|
|
972
990
|
__name: "chooseTime",
|
|
973
991
|
props: {
|
|
974
992
|
type: null,
|
|
975
|
-
modelValue: null
|
|
993
|
+
modelValue: null,
|
|
994
|
+
max: null,
|
|
995
|
+
min: null
|
|
976
996
|
},
|
|
977
997
|
emits: ["update:modelValue"],
|
|
978
|
-
setup(e, { expose:
|
|
979
|
-
const t = e,
|
|
980
|
-
|
|
998
|
+
setup(e, { expose: y, emit: a }) {
|
|
999
|
+
const t = e, m = F(() => {
|
|
1000
|
+
let s = "00:00:00";
|
|
1001
|
+
return t.min && t.min.format("YYYYMMDD") === t.modelValue.format("YYYYMMDD") && (s = t.min.format("HH:mm:ss")), s;
|
|
1002
|
+
}), i = F(() => {
|
|
1003
|
+
let s = "23:59:59";
|
|
1004
|
+
return t.max && t.max.format("YYYYMMDD") === t.modelValue.format("YYYYMMDD") && (s = t.max.format("HH:mm:ss")), s;
|
|
1005
|
+
}), l = D(["00", "00", "00"]);
|
|
1006
|
+
function o() {
|
|
981
1007
|
if (t.modelValue.isValid()) {
|
|
982
|
-
let
|
|
983
|
-
|
|
1008
|
+
let s = t.modelValue.format("HH"), u = t.modelValue.format("mm"), _ = t.modelValue.format("ss");
|
|
1009
|
+
l.value[0] = s, l.value[1] = u, l.value[2] = _;
|
|
984
1010
|
}
|
|
985
1011
|
}
|
|
986
|
-
function
|
|
987
|
-
let [
|
|
988
|
-
a("update:modelValue",
|
|
1012
|
+
function g({ selectedIndexes: s }) {
|
|
1013
|
+
let [u, _, C] = s, k = t.modelValue.clone().hour(u).minute(_).second(C);
|
|
1014
|
+
a("update:modelValue", k);
|
|
989
1015
|
}
|
|
990
1016
|
return de(
|
|
991
1017
|
() => t.modelValue,
|
|
992
1018
|
() => {
|
|
993
|
-
|
|
1019
|
+
o();
|
|
994
1020
|
}
|
|
995
|
-
),
|
|
996
|
-
syncModelValue:
|
|
1021
|
+
), y({
|
|
1022
|
+
syncModelValue: o
|
|
997
1023
|
}), _e(() => {
|
|
998
|
-
|
|
999
|
-
}), (
|
|
1000
|
-
const
|
|
1001
|
-
return
|
|
1024
|
+
o();
|
|
1025
|
+
}), (s, u) => {
|
|
1026
|
+
const _ = M("van-time-picker");
|
|
1027
|
+
return c(), q(_, {
|
|
1002
1028
|
"show-toolbar": !1,
|
|
1003
1029
|
"columns-type": ["hour", "minute", "second"],
|
|
1004
|
-
modelValue:
|
|
1005
|
-
"onUpdate:modelValue":
|
|
1006
|
-
|
|
1007
|
-
|
|
1030
|
+
modelValue: l.value,
|
|
1031
|
+
"onUpdate:modelValue": u[0] || (u[0] = (C) => l.value = C),
|
|
1032
|
+
"min-time": U(m),
|
|
1033
|
+
"max-time": U(i),
|
|
1034
|
+
onChange: g
|
|
1035
|
+
}, null, 8, ["modelValue", "min-time", "max-time"]);
|
|
1008
1036
|
};
|
|
1009
1037
|
}
|
|
1010
|
-
}), $t = { class: "yhm-datetime-input-container" },
|
|
1038
|
+
}), $t = { class: "yhm-datetime-input-container" }, xt = /* @__PURE__ */ Z({
|
|
1011
1039
|
__name: "inputDateTime",
|
|
1012
1040
|
props: {
|
|
1013
1041
|
format: null,
|
|
1014
1042
|
type: null,
|
|
1015
1043
|
typeName: null,
|
|
1016
|
-
modelValue: null
|
|
1044
|
+
modelValue: null,
|
|
1045
|
+
min: null,
|
|
1046
|
+
max: null
|
|
1017
1047
|
},
|
|
1018
1048
|
emits: ["update:modelValue", "change"],
|
|
1019
|
-
setup(e, { expose:
|
|
1020
|
-
const t = e,
|
|
1021
|
-
function
|
|
1022
|
-
|
|
1023
|
-
let n = M.target.value;
|
|
1024
|
-
n.length === 4 && (K(t.modelValue.year(parseInt(n))), (N = v.value) == null || N.focus(), (O = v.value) == null || O.select());
|
|
1049
|
+
setup(e, { expose: y, emit: a }) {
|
|
1050
|
+
const t = e, m = D(""), i = D("1900"), l = D(), o = D("01"), g = D(), s = D("01"), u = D(), _ = D("00"), C = D(), k = D("00"), S = D(), H = D("00"), z = D();
|
|
1051
|
+
function p(V) {
|
|
1052
|
+
V.target.select();
|
|
1025
1053
|
}
|
|
1026
|
-
function
|
|
1027
|
-
|
|
1054
|
+
function Y(V) {
|
|
1055
|
+
var N, B;
|
|
1056
|
+
let n = V.target.value;
|
|
1057
|
+
n.length === 4 && (W(t.modelValue.year(parseInt(n))), (N = g.value) == null || N.focus(), (B = g.value) == null || B.select());
|
|
1028
1058
|
}
|
|
1029
|
-
function
|
|
1030
|
-
var N,
|
|
1031
|
-
let n =
|
|
1059
|
+
function O(V) {
|
|
1060
|
+
var N, B;
|
|
1061
|
+
let n = V.target.value;
|
|
1032
1062
|
n.length === 2 && !isNaN(parseInt(n)) ? (n = parseInt(n), n > 12 ? (n = 12, o.value = "12") : n < 1 && (n = 1, o.value = "01"), fe(() => {
|
|
1033
|
-
var b,
|
|
1034
|
-
|
|
1035
|
-
})) : n.length === 0 && (o.value = t.modelValue.format("MM"), (N = l.value) == null || N.focus(), (
|
|
1063
|
+
var b, d;
|
|
1064
|
+
W(t.modelValue.month(n - 1)), (b = u.value) == null || b.focus(), (d = u.value) == null || d.select();
|
|
1065
|
+
})) : n.length === 0 && (o.value = t.modelValue.format("MM"), (N = l.value) == null || N.focus(), (B = l.value) == null || B.select());
|
|
1036
1066
|
}
|
|
1037
|
-
function
|
|
1038
|
-
var N,
|
|
1039
|
-
let n =
|
|
1040
|
-
n.length === 2 && !isNaN(parseInt(n)) ? (n = parseInt(n), n > 31 ? (n = 31,
|
|
1041
|
-
var b,
|
|
1042
|
-
|
|
1043
|
-
})) : n.length === 0 && (
|
|
1067
|
+
function A(V) {
|
|
1068
|
+
var N, B;
|
|
1069
|
+
let n = V.target.value;
|
|
1070
|
+
n.length === 2 && !isNaN(parseInt(n)) ? (n = parseInt(n), n > 31 ? (n = 31, s.value = "31") : n < 1 && (n = 1, s.value = "01"), fe(() => {
|
|
1071
|
+
var b, d;
|
|
1072
|
+
W(t.modelValue.date(n)), (b = C.value) == null || b.focus(), (d = C.value) == null || d.select();
|
|
1073
|
+
})) : n.length === 0 && (s.value = t.modelValue.format("DD"), (N = g.value) == null || N.focus(), (B = g.value) == null || B.select());
|
|
1044
1074
|
}
|
|
1045
|
-
function
|
|
1046
|
-
var N,
|
|
1047
|
-
let n =
|
|
1075
|
+
function h(V) {
|
|
1076
|
+
var N, B;
|
|
1077
|
+
let n = V.target.value;
|
|
1048
1078
|
n.length === 2 && !isNaN(parseInt(n)) ? (n = parseInt(n), n > 24 ? (n = 24, _.value = "24") : n < 1 && (n = 1, _.value = "01"), fe(() => {
|
|
1049
|
-
var b,
|
|
1050
|
-
|
|
1051
|
-
})) : n.length === 0 && (_.value = t.modelValue.format("HH"), (N =
|
|
1079
|
+
var b, d;
|
|
1080
|
+
W(t.modelValue.hour(n)), (b = S.value) == null || b.focus(), (d = S.value) == null || d.select();
|
|
1081
|
+
})) : n.length === 0 && (_.value = t.modelValue.format("HH"), (N = u.value) == null || N.focus(), (B = u.value) == null || B.select());
|
|
1052
1082
|
}
|
|
1053
|
-
function V
|
|
1054
|
-
var N,
|
|
1055
|
-
let n =
|
|
1056
|
-
n.length === 2 && !isNaN(parseInt(n)) ? (n = parseInt(n), n > 59 ? (n = 59,
|
|
1057
|
-
var b,
|
|
1058
|
-
|
|
1059
|
-
})) : n.length === 0 && (
|
|
1083
|
+
function $(V) {
|
|
1084
|
+
var N, B;
|
|
1085
|
+
let n = V.target.value;
|
|
1086
|
+
n.length === 2 && !isNaN(parseInt(n)) ? (n = parseInt(n), n > 59 ? (n = 59, k.value = "59") : n < 1 && (n = 1, k.value = "01"), fe(() => {
|
|
1087
|
+
var b, d;
|
|
1088
|
+
W(t.modelValue.minute(n)), (b = z.value) == null || b.focus(), (d = z.value) == null || d.select();
|
|
1089
|
+
})) : n.length === 0 && (k.value = t.modelValue.format("mm"), (N = C.value) == null || N.focus(), (B = C.value) == null || B.select());
|
|
1060
1090
|
}
|
|
1061
|
-
function
|
|
1062
|
-
var N,
|
|
1063
|
-
let n =
|
|
1064
|
-
n.length === 2 && !isNaN(parseInt(n)) ? (n = parseInt(n), n > 59 ? (n = 59,
|
|
1065
|
-
|
|
1066
|
-
})) : n.length === 0 && (
|
|
1091
|
+
function I(V) {
|
|
1092
|
+
var N, B;
|
|
1093
|
+
let n = V.target.value;
|
|
1094
|
+
n.length === 2 && !isNaN(parseInt(n)) ? (n = parseInt(n), n > 59 ? (n = 59, H.value = "59") : n < 1 && (n = 1, H.value = "01"), fe(() => {
|
|
1095
|
+
W(t.modelValue.second(n));
|
|
1096
|
+
})) : n.length === 0 && (H.value = t.modelValue.format("ss"), (N = S.value) == null || N.focus(), (B = S.value) == null || B.select());
|
|
1067
1097
|
}
|
|
1068
|
-
function
|
|
1069
|
-
|
|
1098
|
+
function W(V) {
|
|
1099
|
+
let n = !1;
|
|
1100
|
+
t.min && V < t.min && (V = t.min, n = !0, console.log("min date")), t.max && V > t.max && (V = t.max, n = !0, console.log("max date")), a("update:modelValue", V), a("change", V), m.value = V.format(t.format), n && K();
|
|
1070
1101
|
}
|
|
1071
|
-
function
|
|
1072
|
-
var
|
|
1073
|
-
t.modelValue.isValid() && (
|
|
1102
|
+
function K() {
|
|
1103
|
+
var V, n;
|
|
1104
|
+
t.modelValue.isValid() && (i.value = t.modelValue.format("YYYY"), o.value = t.modelValue.format("MM"), s.value = t.modelValue.format("DD"), _.value = t.modelValue.format("HH"), k.value = t.modelValue.format("mm"), H.value = t.modelValue.format("ss"), m.value = t.modelValue.format(t.format), document.activeElement && document.activeElement.nodeName !== "INPUT" && ((V = l.value) == null || V.focus(), (n = l.value) == null || n.select()));
|
|
1074
1105
|
}
|
|
1075
1106
|
return de(
|
|
1076
1107
|
() => t.modelValue,
|
|
1077
1108
|
() => {
|
|
1078
|
-
|
|
1109
|
+
K();
|
|
1079
1110
|
}
|
|
1080
|
-
),
|
|
1081
|
-
syncModelValue:
|
|
1111
|
+
), y({
|
|
1112
|
+
syncModelValue: K
|
|
1082
1113
|
}), _e(() => {
|
|
1083
|
-
|
|
1084
|
-
}), (
|
|
1085
|
-
const N =
|
|
1086
|
-
return
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
re(
|
|
1114
|
+
K();
|
|
1115
|
+
}), (V, n) => {
|
|
1116
|
+
const N = M("van-cell");
|
|
1117
|
+
return c(), x(P, null, [
|
|
1118
|
+
R(N, { title: m.value }, null, 8, ["title"]),
|
|
1119
|
+
w("div", $t, [
|
|
1120
|
+
re(w("input", {
|
|
1090
1121
|
type: "digit",
|
|
1091
|
-
"onUpdate:modelValue": n[0] || (n[0] = (
|
|
1122
|
+
"onUpdate:modelValue": n[0] || (n[0] = (B) => i.value = B),
|
|
1092
1123
|
ref_key: "yearRef",
|
|
1093
1124
|
ref: l,
|
|
1094
|
-
onInput:
|
|
1095
|
-
onFocus:
|
|
1125
|
+
onInput: Y,
|
|
1126
|
+
onFocus: p,
|
|
1096
1127
|
"max-length": "4"
|
|
1097
1128
|
}, null, 544), [
|
|
1098
|
-
[ue,
|
|
1129
|
+
[ue, i.value]
|
|
1099
1130
|
]),
|
|
1100
1131
|
oe(" - "),
|
|
1101
|
-
re(
|
|
1132
|
+
re(w("input", {
|
|
1102
1133
|
type: "digit",
|
|
1103
|
-
"onUpdate:modelValue": n[1] || (n[1] = (
|
|
1134
|
+
"onUpdate:modelValue": n[1] || (n[1] = (B) => o.value = B),
|
|
1104
1135
|
ref_key: "monthRef",
|
|
1105
|
-
ref:
|
|
1106
|
-
onInput:
|
|
1107
|
-
onFocus:
|
|
1136
|
+
ref: g,
|
|
1137
|
+
onInput: O,
|
|
1138
|
+
onFocus: p,
|
|
1108
1139
|
"max-length": "2"
|
|
1109
1140
|
}, null, 544), [
|
|
1110
1141
|
[ue, o.value]
|
|
1111
1142
|
]),
|
|
1112
1143
|
oe(" - "),
|
|
1113
|
-
re(
|
|
1144
|
+
re(w("input", {
|
|
1114
1145
|
type: "digit",
|
|
1115
|
-
"onUpdate:modelValue": n[2] || (n[2] = (
|
|
1146
|
+
"onUpdate:modelValue": n[2] || (n[2] = (B) => s.value = B),
|
|
1116
1147
|
ref_key: "dateRef",
|
|
1117
|
-
ref:
|
|
1118
|
-
onInput:
|
|
1119
|
-
onFocus:
|
|
1148
|
+
ref: u,
|
|
1149
|
+
onInput: A,
|
|
1150
|
+
onFocus: p,
|
|
1120
1151
|
"max-length": "2"
|
|
1121
1152
|
}, null, 544), [
|
|
1122
|
-
[ue,
|
|
1153
|
+
[ue, s.value]
|
|
1123
1154
|
]),
|
|
1124
1155
|
oe(" "),
|
|
1125
|
-
re(
|
|
1156
|
+
re(w("input", {
|
|
1126
1157
|
type: "digit",
|
|
1127
|
-
"onUpdate:modelValue": n[3] || (n[3] = (
|
|
1158
|
+
"onUpdate:modelValue": n[3] || (n[3] = (B) => _.value = B),
|
|
1128
1159
|
ref_key: "hourRef",
|
|
1129
|
-
ref:
|
|
1130
|
-
onInput:
|
|
1131
|
-
onFocus:
|
|
1160
|
+
ref: C,
|
|
1161
|
+
onInput: h,
|
|
1162
|
+
onFocus: p,
|
|
1132
1163
|
"max-length": "2"
|
|
1133
1164
|
}, null, 544), [
|
|
1134
1165
|
[ue, _.value]
|
|
1135
1166
|
]),
|
|
1136
1167
|
oe(" : "),
|
|
1137
|
-
re(
|
|
1168
|
+
re(w("input", {
|
|
1138
1169
|
type: "digit",
|
|
1139
|
-
"onUpdate:modelValue": n[4] || (n[4] = (
|
|
1170
|
+
"onUpdate:modelValue": n[4] || (n[4] = (B) => k.value = B),
|
|
1140
1171
|
ref_key: "minuteRef",
|
|
1141
1172
|
ref: S,
|
|
1142
|
-
onInput:
|
|
1143
|
-
onFocus:
|
|
1173
|
+
onInput: $,
|
|
1174
|
+
onFocus: p,
|
|
1144
1175
|
"max-length": "2"
|
|
1145
1176
|
}, null, 544), [
|
|
1146
|
-
[ue,
|
|
1177
|
+
[ue, k.value]
|
|
1147
1178
|
]),
|
|
1148
1179
|
oe(" : "),
|
|
1149
|
-
re(
|
|
1180
|
+
re(w("input", {
|
|
1150
1181
|
type: "digit",
|
|
1151
|
-
"onUpdate:modelValue": n[5] || (n[5] = (
|
|
1182
|
+
"onUpdate:modelValue": n[5] || (n[5] = (B) => H.value = B),
|
|
1152
1183
|
ref_key: "secondRef",
|
|
1153
|
-
ref:
|
|
1154
|
-
onInput:
|
|
1155
|
-
onFocus:
|
|
1184
|
+
ref: z,
|
|
1185
|
+
onInput: I,
|
|
1186
|
+
onFocus: p,
|
|
1156
1187
|
"max-length": "2"
|
|
1157
1188
|
}, null, 544), [
|
|
1158
|
-
[ue,
|
|
1189
|
+
[ue, H.value]
|
|
1159
1190
|
])
|
|
1160
1191
|
])
|
|
1161
1192
|
], 64);
|
|
1162
1193
|
};
|
|
1163
1194
|
}
|
|
1164
1195
|
});
|
|
1165
|
-
const
|
|
1196
|
+
const wt = /* @__PURE__ */ Z({
|
|
1166
1197
|
__name: "yhmDatetime",
|
|
1167
1198
|
props: {
|
|
1168
1199
|
type: { default: "datetime" },
|
|
@@ -1171,136 +1202,143 @@ const kt = /* @__PURE__ */ E({
|
|
|
1171
1202
|
format: null,
|
|
1172
1203
|
disabled: { type: Boolean, default: !1 },
|
|
1173
1204
|
modelValue: null,
|
|
1174
|
-
placeholder: { default: "请选择日期" }
|
|
1205
|
+
placeholder: { default: "请选择日期" },
|
|
1206
|
+
max: null,
|
|
1207
|
+
min: null
|
|
1175
1208
|
},
|
|
1176
1209
|
emits: ["update:modelValue", "change"],
|
|
1177
|
-
setup(e, { emit:
|
|
1178
|
-
const a = e, t = D(),
|
|
1210
|
+
setup(e, { emit: y }) {
|
|
1211
|
+
const a = e, t = D(), m = D(), i = D(), l = D(ge());
|
|
1179
1212
|
de(
|
|
1180
1213
|
() => a.modelValue,
|
|
1181
|
-
(
|
|
1182
|
-
let
|
|
1183
|
-
|
|
1214
|
+
(z) => {
|
|
1215
|
+
let p = ge(z);
|
|
1216
|
+
p.isValid() && p.valueOf() !== l.value.valueOf() && (l.value = p);
|
|
1184
1217
|
}
|
|
1185
1218
|
);
|
|
1186
|
-
const o =
|
|
1219
|
+
const o = F(() => a.modelValue || a.placeholder), g = F(() => ({
|
|
1187
1220
|
placeholder: !a.modelValue
|
|
1188
|
-
})),
|
|
1221
|
+
})), s = D("YYYY-MM-DD HH:mm:ss"), u = F(() => {
|
|
1189
1222
|
switch (a.type) {
|
|
1190
1223
|
case "year":
|
|
1191
|
-
return
|
|
1224
|
+
return s.value = "YYYY-01-01 00:00:00", "年";
|
|
1192
1225
|
case "month":
|
|
1193
|
-
return
|
|
1226
|
+
return s.value = "YYYY-MM-01 00:00:00", "年月";
|
|
1194
1227
|
case "date":
|
|
1195
|
-
return
|
|
1228
|
+
return s.value = "YYYY-MM-DD 00:00:00", "日期";
|
|
1196
1229
|
case "time":
|
|
1197
|
-
return
|
|
1230
|
+
return s.value = "HH:mm:ss", "时间";
|
|
1198
1231
|
case "datetime":
|
|
1199
|
-
return
|
|
1232
|
+
return s.value = "YYYY-MM-DD HH:mm:ss", "日期时间";
|
|
1200
1233
|
}
|
|
1201
1234
|
}), _ = D(!1);
|
|
1202
|
-
function
|
|
1235
|
+
function C() {
|
|
1203
1236
|
if (a.disabled)
|
|
1204
1237
|
return !1;
|
|
1205
1238
|
_.value = !0;
|
|
1206
|
-
let
|
|
1207
|
-
|
|
1208
|
-
var
|
|
1209
|
-
(
|
|
1239
|
+
let z = ge(a.modelValue);
|
|
1240
|
+
z.isValid() && z.valueOf() !== l.value.valueOf() && (l.value = z), fe(() => {
|
|
1241
|
+
var p, Y, O;
|
|
1242
|
+
(p = t.value) == null || p.syncModelValue(), (Y = m.value) == null || Y.syncModelValue(), (O = i.value) == null || O.syncModelValue();
|
|
1210
1243
|
});
|
|
1211
1244
|
}
|
|
1212
|
-
function
|
|
1213
|
-
_.value = !1, l.value = ge(),
|
|
1245
|
+
function k() {
|
|
1246
|
+
_.value = !1, l.value = ge(), y("update:modelValue", "");
|
|
1214
1247
|
}
|
|
1215
1248
|
function S() {
|
|
1216
|
-
let
|
|
1217
|
-
|
|
1249
|
+
let z = l.value.format(a.format || s.value);
|
|
1250
|
+
y("update:modelValue", z), _.value = !1;
|
|
1218
1251
|
}
|
|
1219
|
-
const
|
|
1220
|
-
return (
|
|
1221
|
-
const
|
|
1222
|
-
return
|
|
1223
|
-
|
|
1252
|
+
const H = D(0);
|
|
1253
|
+
return (z, p) => {
|
|
1254
|
+
const Y = M("van-field"), O = M("van-nav-bar"), A = M("van-tab"), h = M("van-tabs"), $ = M("van-popup");
|
|
1255
|
+
return c(), x(P, null, [
|
|
1256
|
+
R(Y, ae({
|
|
1224
1257
|
class: "yhm-datetime-container",
|
|
1225
1258
|
disabled: e.disabled
|
|
1226
|
-
},
|
|
1259
|
+
}, z.$attrs, {
|
|
1227
1260
|
modelValue: e.modelValue,
|
|
1228
1261
|
error: e.error,
|
|
1229
1262
|
"error-message": e.errorMessage
|
|
1230
1263
|
}), {
|
|
1231
|
-
input:
|
|
1232
|
-
|
|
1233
|
-
class: se(["yhm-datetime-value",
|
|
1234
|
-
onClick:
|
|
1235
|
-
|
|
1236
|
-
}, G(R(o)), 3)
|
|
1264
|
+
input: j(() => [
|
|
1265
|
+
w("div", {
|
|
1266
|
+
class: se(["yhm-datetime-value", U(g)]),
|
|
1267
|
+
onClick: C
|
|
1268
|
+
}, G(U(o)), 3)
|
|
1237
1269
|
]),
|
|
1238
1270
|
_: 1
|
|
1239
1271
|
}, 16, ["disabled", "modelValue", "error", "error-message"]),
|
|
1240
|
-
|
|
1272
|
+
R($, {
|
|
1241
1273
|
show: _.value,
|
|
1242
|
-
"onUpdate:show":
|
|
1274
|
+
"onUpdate:show": p[4] || (p[4] = (I) => _.value = I),
|
|
1243
1275
|
class: "yhm-datetime-container",
|
|
1244
1276
|
"lazy-render": "",
|
|
1245
1277
|
teleport: "body",
|
|
1246
1278
|
position: "bottom"
|
|
1247
1279
|
}, {
|
|
1248
|
-
default:
|
|
1249
|
-
|
|
1280
|
+
default: j(() => [
|
|
1281
|
+
R(O, {
|
|
1250
1282
|
"left-text": "清除",
|
|
1251
|
-
onClickLeft:
|
|
1252
|
-
title: `请选择${
|
|
1283
|
+
onClickLeft: k,
|
|
1284
|
+
title: `请选择${U(u)}`,
|
|
1253
1285
|
"right-text": "确认",
|
|
1254
1286
|
onClickRight: S
|
|
1255
|
-
}, null, 8, ["
|
|
1256
|
-
|
|
1257
|
-
active:
|
|
1258
|
-
"onUpdate:active":
|
|
1287
|
+
}, null, 8, ["title"]),
|
|
1288
|
+
R(h, {
|
|
1289
|
+
active: H.value,
|
|
1290
|
+
"onUpdate:active": p[3] || (p[3] = (I) => H.value = I)
|
|
1259
1291
|
}, {
|
|
1260
|
-
default:
|
|
1261
|
-
["year", "month", "date", "datetime"].includes(e.type) ? (
|
|
1292
|
+
default: j(() => [
|
|
1293
|
+
["year", "month", "date", "datetime"].includes(e.type) ? (c(), q(A, {
|
|
1262
1294
|
key: 0,
|
|
1263
1295
|
title: "日期选择"
|
|
1264
1296
|
}, {
|
|
1265
|
-
default:
|
|
1266
|
-
|
|
1297
|
+
default: j(() => [
|
|
1298
|
+
R(bt, {
|
|
1267
1299
|
ref_key: "chooseDateRef",
|
|
1268
1300
|
ref: t,
|
|
1301
|
+
max: e.max,
|
|
1302
|
+
min: e.min,
|
|
1269
1303
|
type: e.type,
|
|
1270
1304
|
modelValue: l.value,
|
|
1271
|
-
"onUpdate:modelValue":
|
|
1272
|
-
}, null, 8, ["type", "modelValue"])
|
|
1305
|
+
"onUpdate:modelValue": p[0] || (p[0] = (I) => l.value = I)
|
|
1306
|
+
}, null, 8, ["max", "min", "type", "modelValue"])
|
|
1273
1307
|
]),
|
|
1274
1308
|
_: 1
|
|
1275
1309
|
})) : te("", !0),
|
|
1276
|
-
["datetime", "time"].includes(e.type) ? (
|
|
1310
|
+
["datetime", "time"].includes(e.type) ? (c(), q(A, {
|
|
1277
1311
|
key: 1,
|
|
1278
1312
|
title: "时间选择"
|
|
1279
1313
|
}, {
|
|
1280
|
-
default:
|
|
1281
|
-
|
|
1314
|
+
default: j(() => [
|
|
1315
|
+
R(Vt, {
|
|
1282
1316
|
ref_key: "chooseTimeRef",
|
|
1283
|
-
ref:
|
|
1317
|
+
ref: m,
|
|
1318
|
+
max: e.max,
|
|
1319
|
+
min: e.min,
|
|
1284
1320
|
type: e.type,
|
|
1285
1321
|
modelValue: l.value,
|
|
1286
|
-
"onUpdate:modelValue":
|
|
1287
|
-
}, null, 8, ["type", "modelValue"])
|
|
1322
|
+
"onUpdate:modelValue": p[1] || (p[1] = (I) => l.value = I)
|
|
1323
|
+
}, null, 8, ["max", "min", "type", "modelValue"])
|
|
1288
1324
|
]),
|
|
1289
1325
|
_: 1
|
|
1290
1326
|
})) : te("", !0),
|
|
1291
|
-
|
|
1292
|
-
title: `${
|
|
1327
|
+
R(A, {
|
|
1328
|
+
title: `${U(u)}输入`
|
|
1293
1329
|
}, {
|
|
1294
|
-
default:
|
|
1295
|
-
|
|
1330
|
+
default: j(() => [
|
|
1331
|
+
R(xt, {
|
|
1296
1332
|
ref_key: "inputDateTimeRef",
|
|
1297
|
-
ref:
|
|
1298
|
-
|
|
1333
|
+
ref: i,
|
|
1334
|
+
max: e.max,
|
|
1335
|
+
min: e.min,
|
|
1336
|
+
format: e.format || s.value,
|
|
1299
1337
|
type: e.type,
|
|
1300
|
-
"type-name":
|
|
1338
|
+
"type-name": U(u),
|
|
1301
1339
|
modelValue: l.value,
|
|
1302
|
-
"onUpdate:modelValue":
|
|
1303
|
-
}, null, 8, ["format", "type", "type-name", "modelValue"])
|
|
1340
|
+
"onUpdate:modelValue": p[2] || (p[2] = (I) => l.value = I)
|
|
1341
|
+
}, null, 8, ["max", "min", "format", "type", "type-name", "modelValue"])
|
|
1304
1342
|
]),
|
|
1305
1343
|
_: 1
|
|
1306
1344
|
}, 8, ["title"])
|
|
@@ -1314,7 +1352,7 @@ const kt = /* @__PURE__ */ E({
|
|
|
1314
1352
|
};
|
|
1315
1353
|
}
|
|
1316
1354
|
});
|
|
1317
|
-
const
|
|
1355
|
+
const kt = { class: "yhm-radio-list" }, Mt = /* @__PURE__ */ Z({
|
|
1318
1356
|
__name: "yhmRadio",
|
|
1319
1357
|
props: {
|
|
1320
1358
|
error: { type: Boolean },
|
|
@@ -1324,31 +1362,31 @@ const xt = { class: "yhm-radio-list" }, Mt = /* @__PURE__ */ E({
|
|
|
1324
1362
|
optionData: null
|
|
1325
1363
|
},
|
|
1326
1364
|
emits: ["update:modelValue", "change"],
|
|
1327
|
-
setup(e, { emit:
|
|
1365
|
+
setup(e, { emit: y }) {
|
|
1328
1366
|
function a(t) {
|
|
1329
|
-
|
|
1367
|
+
y("update:modelValue", t);
|
|
1330
1368
|
}
|
|
1331
|
-
return (t,
|
|
1332
|
-
const
|
|
1333
|
-
return
|
|
1369
|
+
return (t, m) => {
|
|
1370
|
+
const i = M("van-radio"), l = M("van-radio-group"), o = M("van-field");
|
|
1371
|
+
return c(), q(o, ae({ class: "yhm-radio-container" }, t.$attrs, {
|
|
1334
1372
|
disabled: e.disabled,
|
|
1335
1373
|
modelValue: e.modelValue,
|
|
1336
1374
|
error: e.error,
|
|
1337
1375
|
"error-message": e.errorMessage
|
|
1338
1376
|
}), {
|
|
1339
|
-
input:
|
|
1340
|
-
|
|
1341
|
-
|
|
1377
|
+
input: j(() => [
|
|
1378
|
+
w("div", kt, [
|
|
1379
|
+
R(l, {
|
|
1342
1380
|
disabled: e.disabled,
|
|
1343
1381
|
"model-value": e.modelValue,
|
|
1344
1382
|
"onUpdate:modelValue": a
|
|
1345
1383
|
}, {
|
|
1346
|
-
default:
|
|
1347
|
-
(
|
|
1348
|
-
name:
|
|
1384
|
+
default: j(() => [
|
|
1385
|
+
(c(!0), x(P, null, X(e.optionData, (g) => (c(), q(i, {
|
|
1386
|
+
name: g.value
|
|
1349
1387
|
}, {
|
|
1350
|
-
default:
|
|
1351
|
-
oe(G(
|
|
1388
|
+
default: j(() => [
|
|
1389
|
+
oe(G(g.text), 1)
|
|
1352
1390
|
]),
|
|
1353
1391
|
_: 2
|
|
1354
1392
|
}, 1032, ["name"]))), 256))
|
|
@@ -1362,7 +1400,7 @@ const xt = { class: "yhm-radio-list" }, Mt = /* @__PURE__ */ E({
|
|
|
1362
1400
|
};
|
|
1363
1401
|
}
|
|
1364
1402
|
});
|
|
1365
|
-
const Dt = { class: "yhm-radio-list" }, Ct = /* @__PURE__ */
|
|
1403
|
+
const Dt = { class: "yhm-radio-list" }, Ct = /* @__PURE__ */ Z({
|
|
1366
1404
|
__name: "yhmCheckbox",
|
|
1367
1405
|
props: {
|
|
1368
1406
|
error: { type: Boolean },
|
|
@@ -1372,32 +1410,32 @@ const Dt = { class: "yhm-radio-list" }, Ct = /* @__PURE__ */ E({
|
|
|
1372
1410
|
optionData: null
|
|
1373
1411
|
},
|
|
1374
1412
|
emits: ["update:modelValue", "change"],
|
|
1375
|
-
setup(e, { emit:
|
|
1413
|
+
setup(e, { emit: y }) {
|
|
1376
1414
|
function a(t) {
|
|
1377
|
-
|
|
1415
|
+
y("update:modelValue", t);
|
|
1378
1416
|
}
|
|
1379
|
-
return (t,
|
|
1380
|
-
const
|
|
1381
|
-
return
|
|
1417
|
+
return (t, m) => {
|
|
1418
|
+
const i = M("van-checkbox"), l = M("van-checkbox-group"), o = M("van-field");
|
|
1419
|
+
return c(), q(o, ae({ class: "yhm-radio-container" }, t.$attrs, {
|
|
1382
1420
|
modelValue: e.modelValue,
|
|
1383
1421
|
disabled: e.disabled,
|
|
1384
1422
|
error: e.error,
|
|
1385
1423
|
"error-message": e.errorMessage
|
|
1386
1424
|
}), {
|
|
1387
|
-
input:
|
|
1388
|
-
|
|
1389
|
-
|
|
1425
|
+
input: j(() => [
|
|
1426
|
+
w("div", Dt, [
|
|
1427
|
+
R(l, {
|
|
1390
1428
|
shape: "square",
|
|
1391
1429
|
disabled: e.disabled,
|
|
1392
1430
|
"model-value": e.modelValue,
|
|
1393
1431
|
"onUpdate:modelValue": a
|
|
1394
1432
|
}, {
|
|
1395
|
-
default:
|
|
1396
|
-
(
|
|
1397
|
-
name:
|
|
1433
|
+
default: j(() => [
|
|
1434
|
+
(c(!0), x(P, null, X(e.optionData, (g) => (c(), q(i, {
|
|
1435
|
+
name: g.value
|
|
1398
1436
|
}, {
|
|
1399
|
-
default:
|
|
1400
|
-
oe(G(
|
|
1437
|
+
default: j(() => [
|
|
1438
|
+
oe(G(g.text), 1)
|
|
1401
1439
|
]),
|
|
1402
1440
|
_: 2
|
|
1403
1441
|
}, 1032, ["name"]))), 256))
|
|
@@ -1411,7 +1449,7 @@ const Dt = { class: "yhm-radio-list" }, Ct = /* @__PURE__ */ E({
|
|
|
1411
1449
|
};
|
|
1412
1450
|
}
|
|
1413
1451
|
});
|
|
1414
|
-
const St = /* @__PURE__ */
|
|
1452
|
+
const St = /* @__PURE__ */ Z({
|
|
1415
1453
|
__name: "yhmSelect",
|
|
1416
1454
|
props: {
|
|
1417
1455
|
error: { type: Boolean },
|
|
@@ -1424,37 +1462,37 @@ const St = /* @__PURE__ */ E({
|
|
|
1424
1462
|
remoteFilter: { type: Boolean, default: !1 }
|
|
1425
1463
|
},
|
|
1426
1464
|
emits: ["update:modelValue", "change", "filter"],
|
|
1427
|
-
setup(e, { emit:
|
|
1428
|
-
const a = e, t =
|
|
1465
|
+
setup(e, { emit: y }) {
|
|
1466
|
+
const a = e, t = F(() => {
|
|
1429
1467
|
if (a.modelValue) {
|
|
1430
|
-
let S = a.optionData.filter((
|
|
1468
|
+
let S = a.optionData.filter((H) => H.value === a.modelValue)[0];
|
|
1431
1469
|
return S ? S.text : a.modelValue;
|
|
1432
1470
|
} else
|
|
1433
1471
|
return a.palceholder || "请选择";
|
|
1434
|
-
}),
|
|
1472
|
+
}), m = F(() => ({
|
|
1435
1473
|
placeholder: !a.modelValue
|
|
1436
|
-
})),
|
|
1437
|
-
let
|
|
1438
|
-
function
|
|
1439
|
-
|
|
1440
|
-
|
|
1474
|
+
})), i = D(!1), l = D(), o = D(""), g = F(() => a.filterabled && !a.remoteFilter ? a.optionData.filter(({ text: S, value: H }) => S.indexOf(o.value) > -1 || H.indexOf(o.value) > -1) : a.optionData);
|
|
1475
|
+
let s = null;
|
|
1476
|
+
function u() {
|
|
1477
|
+
s && (clearTimeout(s), s = null), s = setTimeout(() => {
|
|
1478
|
+
y("filter", o.value);
|
|
1441
1479
|
}, 300);
|
|
1442
1480
|
}
|
|
1443
1481
|
function _() {
|
|
1444
1482
|
if (a.disabled)
|
|
1445
1483
|
return !1;
|
|
1446
|
-
|
|
1484
|
+
i.value = !0;
|
|
1447
1485
|
}
|
|
1448
|
-
function
|
|
1449
|
-
|
|
1486
|
+
function C() {
|
|
1487
|
+
i.value = !1;
|
|
1450
1488
|
}
|
|
1451
|
-
function
|
|
1452
|
-
|
|
1489
|
+
function k({ selectedValues: S }) {
|
|
1490
|
+
y("update:modelValue", S[0]), C();
|
|
1453
1491
|
}
|
|
1454
|
-
return (S,
|
|
1455
|
-
const
|
|
1456
|
-
return
|
|
1457
|
-
z
|
|
1492
|
+
return (S, H) => {
|
|
1493
|
+
const z = M("van-field"), p = M("van-picker"), Y = M("van-popup");
|
|
1494
|
+
return c(), x(P, null, [
|
|
1495
|
+
R(z, ae({
|
|
1458
1496
|
class: "yhm-select-container",
|
|
1459
1497
|
disabled: e.disabled
|
|
1460
1498
|
}, S.$attrs, {
|
|
@@ -1462,39 +1500,39 @@ const St = /* @__PURE__ */ E({
|
|
|
1462
1500
|
modelValue: e.modelValue,
|
|
1463
1501
|
"error-message": e.errorMessage
|
|
1464
1502
|
}), {
|
|
1465
|
-
input:
|
|
1466
|
-
|
|
1467
|
-
class: se(["yhm-select-value",
|
|
1503
|
+
input: j(() => [
|
|
1504
|
+
w("div", {
|
|
1505
|
+
class: se(["yhm-select-value", U(m)]),
|
|
1468
1506
|
onClick: _
|
|
1469
|
-
}, G(
|
|
1507
|
+
}, G(U(t)), 3)
|
|
1470
1508
|
]),
|
|
1471
1509
|
_: 1
|
|
1472
1510
|
}, 16, ["disabled", "error", "modelValue", "error-message"]),
|
|
1473
|
-
|
|
1474
|
-
show:
|
|
1475
|
-
"onUpdate:show":
|
|
1511
|
+
R(Y, {
|
|
1512
|
+
show: i.value,
|
|
1513
|
+
"onUpdate:show": H[1] || (H[1] = (O) => i.value = O),
|
|
1476
1514
|
class: "yhm-select-container",
|
|
1477
1515
|
position: "bottom"
|
|
1478
1516
|
}, {
|
|
1479
|
-
default:
|
|
1480
|
-
|
|
1517
|
+
default: j(() => [
|
|
1518
|
+
R(p, {
|
|
1481
1519
|
title: e.palceholder,
|
|
1482
|
-
columns:
|
|
1520
|
+
columns: U(g),
|
|
1483
1521
|
modelValue: [e.modelValue],
|
|
1484
1522
|
ref_key: "pickerRef",
|
|
1485
1523
|
ref: l,
|
|
1486
|
-
onConfirm:
|
|
1487
|
-
onCancel:
|
|
1524
|
+
onConfirm: k,
|
|
1525
|
+
onCancel: C
|
|
1488
1526
|
}, Ve({ _: 2 }, [
|
|
1489
1527
|
e.filterabled ? {
|
|
1490
1528
|
name: "title",
|
|
1491
|
-
fn:
|
|
1492
|
-
re(
|
|
1529
|
+
fn: j(() => [
|
|
1530
|
+
re(w("input", {
|
|
1493
1531
|
class: "yhm-select-filter-input",
|
|
1494
1532
|
placeholder: "输入关键词筛选",
|
|
1495
1533
|
type: "text",
|
|
1496
|
-
"onUpdate:modelValue":
|
|
1497
|
-
onInput:
|
|
1534
|
+
"onUpdate:modelValue": H[0] || (H[0] = (O) => o.value = O),
|
|
1535
|
+
onInput: u
|
|
1498
1536
|
}, null, 544), [
|
|
1499
1537
|
[ue, o.value]
|
|
1500
1538
|
])
|
|
@@ -1509,21 +1547,21 @@ const St = /* @__PURE__ */ E({
|
|
|
1509
1547
|
};
|
|
1510
1548
|
}
|
|
1511
1549
|
});
|
|
1512
|
-
const
|
|
1550
|
+
const Yt = {
|
|
1513
1551
|
width: "20px",
|
|
1514
1552
|
height: "20px",
|
|
1515
1553
|
style: { "vertical-align": "middle" },
|
|
1516
1554
|
viewBox: "0 0 1000 1000",
|
|
1517
1555
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1518
|
-
},
|
|
1556
|
+
}, Ot = /* @__PURE__ */ w("path", {
|
|
1519
1557
|
stroke: "var(--van-field-right-icon-color)",
|
|
1520
1558
|
"stroke-width": "60",
|
|
1521
1559
|
"stroke-linejoin": "round",
|
|
1522
1560
|
fill: "none",
|
|
1523
1561
|
d: "M200,350 L200,200 L400,200 M600,200 L800,200 L800,400 M800,600 L800,800 L600,800 M400,800 L200,800 L200,600 M0,500 L1000,500"
|
|
1524
|
-
}, null, -1),
|
|
1525
|
-
|
|
1526
|
-
],
|
|
1562
|
+
}, null, -1), Lt = [
|
|
1563
|
+
Ot
|
|
1564
|
+
], Tt = /* @__PURE__ */ Z({
|
|
1527
1565
|
__name: "yhmInput",
|
|
1528
1566
|
props: {
|
|
1529
1567
|
type: { default: "text" },
|
|
@@ -1534,34 +1572,34 @@ const Lt = {
|
|
|
1534
1572
|
scanCallback: null
|
|
1535
1573
|
},
|
|
1536
1574
|
emits: ["update:modelValue", "change", "scan"],
|
|
1537
|
-
setup(e, { expose:
|
|
1538
|
-
const t = e,
|
|
1539
|
-
function
|
|
1575
|
+
setup(e, { expose: y, emit: a }) {
|
|
1576
|
+
const t = e, m = F(() => t.type === "scan" ? "text" : t.type);
|
|
1577
|
+
function i(u) {
|
|
1540
1578
|
if (t.type === "number" && t.precision && !isNaN(t.precision)) {
|
|
1541
|
-
let _ =
|
|
1542
|
-
_[1] && _[1].length && _[1].length > t.precision && (
|
|
1579
|
+
let _ = u.split(".");
|
|
1580
|
+
_[1] && _[1].length && _[1].length > t.precision && (u = `${_[0]}.${_[1].substring(0, t.precision)}`);
|
|
1543
1581
|
}
|
|
1544
|
-
a("update:modelValue",
|
|
1582
|
+
a("update:modelValue", u), a("change", u);
|
|
1545
1583
|
}
|
|
1546
|
-
function l(
|
|
1547
|
-
|
|
1584
|
+
function l(u) {
|
|
1585
|
+
u.key === "Enter" && t.type === "scan" && t.scanCallback && typeof t.scanCallback == "function" && t.scanCallback(t.modelValue);
|
|
1548
1586
|
}
|
|
1549
1587
|
const o = D();
|
|
1550
|
-
function
|
|
1551
|
-
var
|
|
1552
|
-
(
|
|
1588
|
+
function g() {
|
|
1589
|
+
var u;
|
|
1590
|
+
(u = o.value) == null || u.focus();
|
|
1553
1591
|
}
|
|
1554
|
-
function
|
|
1555
|
-
var
|
|
1556
|
-
(
|
|
1592
|
+
function s() {
|
|
1593
|
+
var u;
|
|
1594
|
+
(u = o.value) == null || u.blur();
|
|
1557
1595
|
}
|
|
1558
|
-
return
|
|
1559
|
-
const
|
|
1560
|
-
return
|
|
1596
|
+
return y({ fieldRef: o, focus: g, blur: s }), (u, _) => {
|
|
1597
|
+
const C = M("van-field");
|
|
1598
|
+
return c(), q(C, ae({ class: "yhm-input-container" }, u.$attrs, {
|
|
1561
1599
|
"model-value": e.modelValue,
|
|
1562
|
-
"onUpdate:modelValue":
|
|
1600
|
+
"onUpdate:modelValue": i,
|
|
1563
1601
|
onKeydown: l,
|
|
1564
|
-
type:
|
|
1602
|
+
type: U(m),
|
|
1565
1603
|
error: e.error,
|
|
1566
1604
|
ref_key: "fieldRef",
|
|
1567
1605
|
ref: o,
|
|
@@ -1569,8 +1607,8 @@ const Lt = {
|
|
|
1569
1607
|
}), Ve({ _: 2 }, [
|
|
1570
1608
|
t.type === "scan" ? {
|
|
1571
1609
|
name: "right-icon",
|
|
1572
|
-
fn:
|
|
1573
|
-
(
|
|
1610
|
+
fn: j(() => [
|
|
1611
|
+
(c(), x("svg", Yt, Lt))
|
|
1574
1612
|
]),
|
|
1575
1613
|
key: "0"
|
|
1576
1614
|
} : void 0
|
|
@@ -1578,7 +1616,7 @@ const Lt = {
|
|
|
1578
1616
|
};
|
|
1579
1617
|
}
|
|
1580
1618
|
});
|
|
1581
|
-
const
|
|
1619
|
+
const Ht = { class: "yhm-switch-value" }, It = { class: "yhm-switch-value-text" }, Bt = /* @__PURE__ */ Z({
|
|
1582
1620
|
__name: "yhmSwitch",
|
|
1583
1621
|
props: {
|
|
1584
1622
|
error: { type: Boolean },
|
|
@@ -1592,21 +1630,21 @@ const Bt = { class: "yhm-switch-value" }, Ot = { class: "yhm-switch-value-text"
|
|
|
1592
1630
|
inactiveText: { default: "" }
|
|
1593
1631
|
},
|
|
1594
1632
|
emits: ["update:modelValue", "change"],
|
|
1595
|
-
setup(e, { emit:
|
|
1633
|
+
setup(e, { emit: y }) {
|
|
1596
1634
|
function a(t) {
|
|
1597
|
-
|
|
1635
|
+
y("update:modelValue", t), y("change", t);
|
|
1598
1636
|
}
|
|
1599
|
-
return (t,
|
|
1600
|
-
const
|
|
1601
|
-
return
|
|
1637
|
+
return (t, m) => {
|
|
1638
|
+
const i = M("van-switch"), l = M("van-field");
|
|
1639
|
+
return c(), q(l, ae({ class: "yhm-switch-container" }, t.$attrs, {
|
|
1602
1640
|
modelValue: e.modelValue,
|
|
1603
1641
|
disabled: e.disabled,
|
|
1604
1642
|
error: e.error,
|
|
1605
1643
|
"error-message": e.errorMessage
|
|
1606
1644
|
}), {
|
|
1607
|
-
input:
|
|
1608
|
-
|
|
1609
|
-
|
|
1645
|
+
input: j(() => [
|
|
1646
|
+
w("div", Ht, [
|
|
1647
|
+
R(i, {
|
|
1610
1648
|
disabled: e.disabled,
|
|
1611
1649
|
"model-value": e.modelValue,
|
|
1612
1650
|
"active-value": e.activeValue,
|
|
@@ -1614,8 +1652,8 @@ const Bt = { class: "yhm-switch-value" }, Ot = { class: "yhm-switch-value-text"
|
|
|
1614
1652
|
size: e.size,
|
|
1615
1653
|
"onUpdate:modelValue": a
|
|
1616
1654
|
}, {
|
|
1617
|
-
background:
|
|
1618
|
-
|
|
1655
|
+
background: j(() => [
|
|
1656
|
+
w("div", It, G(e.modelValue === e.activeValue ? e.activeText : e.inactiveText), 1)
|
|
1619
1657
|
]),
|
|
1620
1658
|
_: 1
|
|
1621
1659
|
}, 8, ["disabled", "model-value", "active-value", "inactive-value", "size"])
|
|
@@ -1626,48 +1664,48 @@ const Bt = { class: "yhm-switch-value" }, Ot = { class: "yhm-switch-value-text"
|
|
|
1626
1664
|
};
|
|
1627
1665
|
}
|
|
1628
1666
|
});
|
|
1629
|
-
const
|
|
1667
|
+
const jt = /* @__PURE__ */ w("path", {
|
|
1630
1668
|
d: "M100,500 L100,200 S100,100 200,100 L1800,100 S1900,100 1900,200 L1900,800 S1900,900 1800,900 L200,900 S100,900 100,800 Z",
|
|
1631
1669
|
stroke: "var(--van-field-right-icon-color)",
|
|
1632
1670
|
"stroke-width": "50",
|
|
1633
1671
|
fill: "none"
|
|
1634
|
-
}, null, -1),
|
|
1672
|
+
}, null, -1), Ut = { key: 0 }, Rt = /* @__PURE__ */ w("circle", {
|
|
1635
1673
|
r: "150",
|
|
1636
1674
|
"stroke-width": "0",
|
|
1637
1675
|
fill: "var(--van-field-right-icon-color)",
|
|
1638
1676
|
cx: "500",
|
|
1639
1677
|
cy: "500"
|
|
1640
|
-
}, null, -1),
|
|
1678
|
+
}, null, -1), zt = /* @__PURE__ */ w("circle", {
|
|
1641
1679
|
r: "150",
|
|
1642
1680
|
"stroke-width": "0",
|
|
1643
1681
|
fill: "var(--van-field-right-icon-color)",
|
|
1644
1682
|
cx: "1000",
|
|
1645
1683
|
cy: "500"
|
|
1646
|
-
}, null, -1), Nt = /* @__PURE__ */
|
|
1684
|
+
}, null, -1), Nt = /* @__PURE__ */ w("circle", {
|
|
1647
1685
|
r: "150",
|
|
1648
1686
|
"stroke-width": "0",
|
|
1649
1687
|
fill: "var(--van-field-right-icon-color)",
|
|
1650
1688
|
cx: "1500",
|
|
1651
1689
|
cy: "500"
|
|
1652
1690
|
}, null, -1), At = [
|
|
1691
|
+
Rt,
|
|
1653
1692
|
zt,
|
|
1654
|
-
jt,
|
|
1655
1693
|
Nt
|
|
1656
|
-
], Ft = { key: 1 },
|
|
1694
|
+
], Ft = { key: 1 }, Et = /* @__PURE__ */ w("polyline", {
|
|
1657
1695
|
points: "350,300 650,300 500,300 500 700",
|
|
1658
1696
|
stroke: "var(--van-field-right-icon-color)",
|
|
1659
1697
|
"stroke-width": "60",
|
|
1660
1698
|
"stroke-linecap": "round",
|
|
1661
1699
|
"stroke-linejoin": "round",
|
|
1662
1700
|
fill: "none"
|
|
1663
|
-
}, null, -1),
|
|
1701
|
+
}, null, -1), Pt = /* @__PURE__ */ w("polyline", {
|
|
1664
1702
|
points: "850,300 1150,300 1000,300 1000 700",
|
|
1665
1703
|
stroke: "var(--van-field-right-icon-color)",
|
|
1666
1704
|
"stroke-width": "60",
|
|
1667
1705
|
"stroke-linecap": "round",
|
|
1668
1706
|
"stroke-linejoin": "round",
|
|
1669
1707
|
fill: "none"
|
|
1670
|
-
}, null, -1), Wt = /* @__PURE__ */
|
|
1708
|
+
}, null, -1), Wt = /* @__PURE__ */ w("polyline", {
|
|
1671
1709
|
points: "1350,300 1650,300 1500,300 1500 700",
|
|
1672
1710
|
stroke: "var(--van-field-right-icon-color)",
|
|
1673
1711
|
"stroke-width": "60",
|
|
@@ -1675,10 +1713,10 @@ const Ut = /* @__PURE__ */ k("path", {
|
|
|
1675
1713
|
"stroke-linejoin": "round",
|
|
1676
1714
|
fill: "none"
|
|
1677
1715
|
}, null, -1), Zt = [
|
|
1678
|
-
Pt,
|
|
1679
1716
|
Et,
|
|
1717
|
+
Pt,
|
|
1680
1718
|
Wt
|
|
1681
|
-
], qt = /* @__PURE__ */
|
|
1719
|
+
], qt = /* @__PURE__ */ Z({
|
|
1682
1720
|
__name: "yhmPassword",
|
|
1683
1721
|
props: {
|
|
1684
1722
|
error: { type: Boolean },
|
|
@@ -1686,31 +1724,31 @@ const Ut = /* @__PURE__ */ k("path", {
|
|
|
1686
1724
|
modelValue: null
|
|
1687
1725
|
},
|
|
1688
1726
|
emits: ["update:modelValue", "change"],
|
|
1689
|
-
setup(e, { emit:
|
|
1690
|
-
const a = D(!1), t =
|
|
1691
|
-
function
|
|
1692
|
-
|
|
1727
|
+
setup(e, { emit: y }) {
|
|
1728
|
+
const a = D(!1), t = F(() => a.value ? "text" : "password");
|
|
1729
|
+
function m(o) {
|
|
1730
|
+
y("update:modelValue", o), y("change", o);
|
|
1693
1731
|
}
|
|
1694
|
-
const
|
|
1732
|
+
const i = D();
|
|
1695
1733
|
function l() {
|
|
1696
1734
|
var o;
|
|
1697
|
-
a.value = !a.value, (o =
|
|
1735
|
+
a.value = !a.value, (o = i.value) == null || o.focus();
|
|
1698
1736
|
}
|
|
1699
|
-
return (o,
|
|
1700
|
-
const
|
|
1701
|
-
return
|
|
1737
|
+
return (o, g) => {
|
|
1738
|
+
const s = M("van-field");
|
|
1739
|
+
return c(), q(s, ae({
|
|
1702
1740
|
class: "yhm-password-container",
|
|
1703
1741
|
ref_key: "passwordRef",
|
|
1704
|
-
ref:
|
|
1742
|
+
ref: i
|
|
1705
1743
|
}, o.$attrs, {
|
|
1706
1744
|
"model-value": e.modelValue,
|
|
1707
|
-
"onUpdate:modelValue":
|
|
1708
|
-
type:
|
|
1745
|
+
"onUpdate:modelValue": m,
|
|
1746
|
+
type: U(t),
|
|
1709
1747
|
error: e.error,
|
|
1710
1748
|
"error-message": e.errorMessage
|
|
1711
1749
|
}), {
|
|
1712
|
-
"right-icon":
|
|
1713
|
-
(
|
|
1750
|
+
"right-icon": j(() => [
|
|
1751
|
+
(c(), x("svg", {
|
|
1714
1752
|
width: "40px",
|
|
1715
1753
|
height: "20px",
|
|
1716
1754
|
style: { "vertical-align": "middle" },
|
|
@@ -1718,9 +1756,9 @@ const Ut = /* @__PURE__ */ k("path", {
|
|
|
1718
1756
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1719
1757
|
onClick: l
|
|
1720
1758
|
}, [
|
|
1721
|
-
|
|
1759
|
+
jt,
|
|
1722
1760
|
oe(" pa "),
|
|
1723
|
-
a.value ? (
|
|
1761
|
+
a.value ? (c(), x("g", Ft, Zt)) : (c(), x("g", Ut, At))
|
|
1724
1762
|
]))
|
|
1725
1763
|
]),
|
|
1726
1764
|
_: 1
|
|
@@ -1728,7 +1766,7 @@ const Ut = /* @__PURE__ */ k("path", {
|
|
|
1728
1766
|
};
|
|
1729
1767
|
}
|
|
1730
1768
|
});
|
|
1731
|
-
const Kt = /* @__PURE__ */
|
|
1769
|
+
const Kt = /* @__PURE__ */ Z({
|
|
1732
1770
|
__name: "yhmCascader",
|
|
1733
1771
|
props: {
|
|
1734
1772
|
placeholder: { default: "请选择" },
|
|
@@ -1739,51 +1777,51 @@ const Kt = /* @__PURE__ */ E({
|
|
|
1739
1777
|
optionData: null
|
|
1740
1778
|
},
|
|
1741
1779
|
emits: ["update:modelValue", "change"],
|
|
1742
|
-
setup(e, { emit:
|
|
1743
|
-
const a = e, t = D(!1),
|
|
1744
|
-
function
|
|
1780
|
+
setup(e, { emit: y }) {
|
|
1781
|
+
const a = e, t = D(!1), m = D("");
|
|
1782
|
+
function i() {
|
|
1745
1783
|
a.disabled || (t.value = !0);
|
|
1746
1784
|
}
|
|
1747
|
-
function l(
|
|
1748
|
-
|
|
1785
|
+
function l(s) {
|
|
1786
|
+
y("update:modelValue", s), y("change", s);
|
|
1749
1787
|
}
|
|
1750
|
-
function o({ selectedOptions:
|
|
1751
|
-
let
|
|
1752
|
-
|
|
1788
|
+
function o({ selectedOptions: s }) {
|
|
1789
|
+
let u = s.map((_) => _.value).join("/");
|
|
1790
|
+
m.value = s.map((_) => _.text).join("/"), l(u), t.value = !1;
|
|
1753
1791
|
}
|
|
1754
|
-
function
|
|
1792
|
+
function g() {
|
|
1755
1793
|
l(""), t.value = !1;
|
|
1756
1794
|
}
|
|
1757
|
-
return (
|
|
1758
|
-
const _ =
|
|
1759
|
-
return
|
|
1760
|
-
|
|
1795
|
+
return (s, u) => {
|
|
1796
|
+
const _ = M("van-field"), C = M("van-cascader"), k = M("van-popup");
|
|
1797
|
+
return c(), x(P, null, [
|
|
1798
|
+
R(_, ae({ class: "yhm-cascader-container" }, s.$attrs, {
|
|
1761
1799
|
modelValue: e.modelValue,
|
|
1762
1800
|
error: e.error,
|
|
1763
1801
|
"error-message": e.errorMessage,
|
|
1764
1802
|
disabled: e.disabled
|
|
1765
1803
|
}), {
|
|
1766
|
-
input:
|
|
1767
|
-
|
|
1768
|
-
|
|
1804
|
+
input: j(() => [
|
|
1805
|
+
w("div", { onClick: i }, [
|
|
1806
|
+
w("span", {
|
|
1769
1807
|
class: se({ placeholder: !e.modelValue })
|
|
1770
|
-
}, G(
|
|
1808
|
+
}, G(m.value || e.placeholder), 3)
|
|
1771
1809
|
])
|
|
1772
1810
|
]),
|
|
1773
1811
|
_: 1
|
|
1774
1812
|
}, 16, ["modelValue", "error", "error-message", "disabled"]),
|
|
1775
|
-
|
|
1813
|
+
R(k, {
|
|
1776
1814
|
class: "yhm-cascader-container",
|
|
1777
1815
|
show: t.value,
|
|
1778
|
-
"onUpdate:show":
|
|
1816
|
+
"onUpdate:show": u[0] || (u[0] = (S) => t.value = S),
|
|
1779
1817
|
position: "bottom"
|
|
1780
1818
|
}, {
|
|
1781
|
-
default:
|
|
1782
|
-
|
|
1819
|
+
default: j(() => [
|
|
1820
|
+
R(C, {
|
|
1783
1821
|
"value-model": e.modelValue,
|
|
1784
1822
|
title: e.placeholder,
|
|
1785
1823
|
options: e.optionData,
|
|
1786
|
-
onClose:
|
|
1824
|
+
onClose: g,
|
|
1787
1825
|
onFinish: o
|
|
1788
1826
|
}, null, 8, ["value-model", "title", "options"])
|
|
1789
1827
|
]),
|
|
@@ -1793,7 +1831,7 @@ const Kt = /* @__PURE__ */ E({
|
|
|
1793
1831
|
};
|
|
1794
1832
|
}
|
|
1795
1833
|
});
|
|
1796
|
-
const Jt = /* @__PURE__ */
|
|
1834
|
+
const Jt = /* @__PURE__ */ Z({
|
|
1797
1835
|
__name: "yhmRate",
|
|
1798
1836
|
props: {
|
|
1799
1837
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -1808,20 +1846,20 @@ const Jt = /* @__PURE__ */ E({
|
|
|
1808
1846
|
clearable: { type: Boolean }
|
|
1809
1847
|
},
|
|
1810
1848
|
emits: ["update:modelValue", "change"],
|
|
1811
|
-
setup(e, { emit:
|
|
1849
|
+
setup(e, { emit: y }) {
|
|
1812
1850
|
function a(t) {
|
|
1813
|
-
|
|
1851
|
+
y("update:modelValue", t), y("change", t);
|
|
1814
1852
|
}
|
|
1815
|
-
return (t,
|
|
1816
|
-
const
|
|
1817
|
-
return
|
|
1853
|
+
return (t, m) => {
|
|
1854
|
+
const i = M("van-rate"), l = M("van-field");
|
|
1855
|
+
return c(), q(l, ae({ class: "yhm-rate-container" }, t.$attrs, {
|
|
1818
1856
|
modelValue: e.modelValue,
|
|
1819
1857
|
error: e.error,
|
|
1820
1858
|
"error-message": e.errorMessage,
|
|
1821
1859
|
disabled: e.disabled
|
|
1822
1860
|
}), {
|
|
1823
|
-
input:
|
|
1824
|
-
|
|
1861
|
+
input: j(() => [
|
|
1862
|
+
R(i, {
|
|
1825
1863
|
disabled: e.disabled,
|
|
1826
1864
|
"model-value": e.modelValue,
|
|
1827
1865
|
"onUpdate:modelValue": a,
|
|
@@ -1838,7 +1876,7 @@ const Jt = /* @__PURE__ */ E({
|
|
|
1838
1876
|
};
|
|
1839
1877
|
}
|
|
1840
1878
|
});
|
|
1841
|
-
const Gt = ["src"], Qt = /* @__PURE__ */
|
|
1879
|
+
const Gt = ["src"], Qt = /* @__PURE__ */ Z({
|
|
1842
1880
|
__name: "yhmSignature",
|
|
1843
1881
|
props: {
|
|
1844
1882
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -1847,52 +1885,52 @@ const Gt = ["src"], Qt = /* @__PURE__ */ E({
|
|
|
1847
1885
|
modelValue: null
|
|
1848
1886
|
},
|
|
1849
1887
|
emits: ["update:modelValue", "change"],
|
|
1850
|
-
setup(e, { emit:
|
|
1888
|
+
setup(e, { emit: y }) {
|
|
1851
1889
|
const a = e, t = D(!1);
|
|
1852
|
-
function
|
|
1890
|
+
function m() {
|
|
1853
1891
|
a.disabled || (t.value = !0);
|
|
1854
1892
|
}
|
|
1855
|
-
function
|
|
1856
|
-
|
|
1893
|
+
function i(g) {
|
|
1894
|
+
y("update:modelValue", g), y("change", g);
|
|
1857
1895
|
}
|
|
1858
|
-
function l({ image:
|
|
1859
|
-
|
|
1896
|
+
function l({ image: g }) {
|
|
1897
|
+
i(g), t.value = !1;
|
|
1860
1898
|
}
|
|
1861
1899
|
function o() {
|
|
1862
|
-
|
|
1900
|
+
i(""), t.value = !1;
|
|
1863
1901
|
}
|
|
1864
|
-
return (
|
|
1865
|
-
const
|
|
1866
|
-
return
|
|
1867
|
-
|
|
1902
|
+
return (g, s) => {
|
|
1903
|
+
const u = M("van-field"), _ = M("van-signature"), C = M("van-popup");
|
|
1904
|
+
return c(), x(P, null, [
|
|
1905
|
+
R(u, ae({ class: "yhm-signature-container" }, g.$attrs, {
|
|
1868
1906
|
modelValue: e.modelValue,
|
|
1869
1907
|
error: e.error,
|
|
1870
1908
|
"error-message": e.errorMessage,
|
|
1871
1909
|
disabled: e.disabled
|
|
1872
1910
|
}), {
|
|
1873
|
-
input:
|
|
1874
|
-
e.modelValue ? (
|
|
1911
|
+
input: j(() => [
|
|
1912
|
+
e.modelValue ? (c(), x("img", {
|
|
1875
1913
|
key: 1,
|
|
1876
1914
|
class: "signature-image",
|
|
1877
|
-
onClick:
|
|
1915
|
+
onClick: m,
|
|
1878
1916
|
src: e.modelValue,
|
|
1879
1917
|
alt: "签名"
|
|
1880
|
-
}, null, 8, Gt)) : (
|
|
1918
|
+
}, null, 8, Gt)) : (c(), x("span", {
|
|
1881
1919
|
key: 0,
|
|
1882
|
-
onClick:
|
|
1920
|
+
onClick: m,
|
|
1883
1921
|
class: "placeholder"
|
|
1884
1922
|
}, " 点击进行签名 "))
|
|
1885
1923
|
]),
|
|
1886
1924
|
_: 1
|
|
1887
1925
|
}, 16, ["modelValue", "error", "error-message", "disabled"]),
|
|
1888
|
-
|
|
1926
|
+
R(C, {
|
|
1889
1927
|
class: "yhm-signature-container",
|
|
1890
1928
|
show: t.value,
|
|
1891
|
-
"onUpdate:show":
|
|
1929
|
+
"onUpdate:show": s[0] || (s[0] = (k) => t.value = k),
|
|
1892
1930
|
position: "bottom"
|
|
1893
1931
|
}, {
|
|
1894
|
-
default:
|
|
1895
|
-
|
|
1932
|
+
default: j(() => [
|
|
1933
|
+
R(_, {
|
|
1896
1934
|
onSubmit: l,
|
|
1897
1935
|
onClear: o
|
|
1898
1936
|
})
|
|
@@ -1903,7 +1941,7 @@ const Gt = ["src"], Qt = /* @__PURE__ */ E({
|
|
|
1903
1941
|
};
|
|
1904
1942
|
}
|
|
1905
1943
|
});
|
|
1906
|
-
const Xt = /* @__PURE__ */
|
|
1944
|
+
const Xt = /* @__PURE__ */ Z({
|
|
1907
1945
|
__name: "yhmSlider",
|
|
1908
1946
|
props: {
|
|
1909
1947
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -1917,20 +1955,20 @@ const Xt = /* @__PURE__ */ E({
|
|
|
1917
1955
|
buttonSize: { default: "24px" }
|
|
1918
1956
|
},
|
|
1919
1957
|
emits: ["update:modelValue", "change"],
|
|
1920
|
-
setup(e, { emit:
|
|
1958
|
+
setup(e, { emit: y }) {
|
|
1921
1959
|
function a(t) {
|
|
1922
|
-
|
|
1960
|
+
y("update:modelValue", t), y("change", t);
|
|
1923
1961
|
}
|
|
1924
|
-
return (t,
|
|
1925
|
-
const
|
|
1926
|
-
return
|
|
1962
|
+
return (t, m) => {
|
|
1963
|
+
const i = M("van-slider"), l = M("van-field");
|
|
1964
|
+
return c(), q(l, ae({ class: "yhm-slider-container" }, t.$attrs, {
|
|
1927
1965
|
modelValue: e.modelValue,
|
|
1928
1966
|
error: e.error,
|
|
1929
1967
|
"error-message": e.errorMessage,
|
|
1930
1968
|
disabled: e.disabled
|
|
1931
1969
|
}), {
|
|
1932
|
-
input:
|
|
1933
|
-
|
|
1970
|
+
input: j(() => [
|
|
1971
|
+
R(i, {
|
|
1934
1972
|
disabled: e.disabled,
|
|
1935
1973
|
"model-value": e.modelValue,
|
|
1936
1974
|
"onUpdate:modelValue": a,
|
|
@@ -1946,7 +1984,7 @@ const Xt = /* @__PURE__ */ E({
|
|
|
1946
1984
|
};
|
|
1947
1985
|
}
|
|
1948
1986
|
});
|
|
1949
|
-
const en = /* @__PURE__ */
|
|
1987
|
+
const en = /* @__PURE__ */ Z({
|
|
1950
1988
|
__name: "yhmStepper",
|
|
1951
1989
|
props: {
|
|
1952
1990
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -1959,20 +1997,20 @@ const en = /* @__PURE__ */ E({
|
|
|
1959
1997
|
decimalLength: { default: 0 }
|
|
1960
1998
|
},
|
|
1961
1999
|
emits: ["update:modelValue", "change"],
|
|
1962
|
-
setup(e, { emit:
|
|
2000
|
+
setup(e, { emit: y }) {
|
|
1963
2001
|
function a(t) {
|
|
1964
|
-
|
|
2002
|
+
y("update:modelValue", t), y("change", t);
|
|
1965
2003
|
}
|
|
1966
|
-
return (t,
|
|
1967
|
-
const
|
|
1968
|
-
return
|
|
2004
|
+
return (t, m) => {
|
|
2005
|
+
const i = M("van-stepper"), l = M("van-field");
|
|
2006
|
+
return c(), q(l, ae({ class: "yhm-stepper-container" }, t.$attrs, {
|
|
1969
2007
|
modelValue: e.modelValue,
|
|
1970
2008
|
error: e.error,
|
|
1971
2009
|
"error-message": e.errorMessage,
|
|
1972
2010
|
disabled: e.disabled
|
|
1973
2011
|
}), {
|
|
1974
|
-
input:
|
|
1975
|
-
|
|
2012
|
+
input: j(() => [
|
|
2013
|
+
R(i, {
|
|
1976
2014
|
disabled: e.disabled,
|
|
1977
2015
|
"model-value": e.modelValue,
|
|
1978
2016
|
"onUpdate:modelValue": a,
|
|
@@ -1993,7 +2031,7 @@ const tn = {
|
|
|
1993
2031
|
style: { "vertical-align": "middle" },
|
|
1994
2032
|
viewBox: "0 0 1000 1000",
|
|
1995
2033
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1996
|
-
}, nn = /* @__PURE__ */
|
|
2034
|
+
}, nn = /* @__PURE__ */ w("path", {
|
|
1997
2035
|
stroke: "var(--van-field-right-icon-color)",
|
|
1998
2036
|
"stroke-width": "60",
|
|
1999
2037
|
"stroke-linejoin": "round",
|
|
@@ -2001,7 +2039,7 @@ const tn = {
|
|
|
2001
2039
|
d: "M200,350 L200,200 L400,200 M600,200 L800,200 L800,400 M800,600 L800,800 L600,800 M400,800 L200,800 L200,600 M0,500 L1000,500"
|
|
2002
2040
|
}, null, -1), an = [
|
|
2003
2041
|
nn
|
|
2004
|
-
], ln = ["d"], on = /* @__PURE__ */
|
|
2042
|
+
], ln = ["d"], on = /* @__PURE__ */ Z({
|
|
2005
2043
|
__name: "yhmScanAndSelect",
|
|
2006
2044
|
props: {
|
|
2007
2045
|
error: { type: Boolean },
|
|
@@ -2013,41 +2051,41 @@ const tn = {
|
|
|
2013
2051
|
remoteFilter: { type: Boolean, default: !1 }
|
|
2014
2052
|
},
|
|
2015
2053
|
emits: ["scan"],
|
|
2016
|
-
setup(e, { emit:
|
|
2017
|
-
const a = e, t = D(),
|
|
2018
|
-
function
|
|
2019
|
-
S.key === "Enter" &&
|
|
2054
|
+
setup(e, { emit: y }) {
|
|
2055
|
+
const a = e, t = D(), m = F(() => i.value ? "M100,700 L500,300 L900,700 L500,700 Z" : "M100,300 L500,300 L900,300 L500,700 Z"), i = D(!1), l = D(), o = D(""), g = F(() => a.filterabled && !a.remoteFilter ? a.optionData.filter(({ text: S, value: H }) => S.indexOf(o.value) > -1 || H.indexOf(o.value) > -1) : a.optionData);
|
|
2056
|
+
function s(S) {
|
|
2057
|
+
S.key === "Enter" && u();
|
|
2020
2058
|
}
|
|
2021
|
-
function
|
|
2022
|
-
|
|
2059
|
+
function u() {
|
|
2060
|
+
y("scan", t.value);
|
|
2023
2061
|
}
|
|
2024
2062
|
function _() {
|
|
2025
2063
|
if (a.disabled)
|
|
2026
2064
|
return !1;
|
|
2027
|
-
|
|
2065
|
+
i.value = !0;
|
|
2028
2066
|
}
|
|
2029
|
-
function
|
|
2030
|
-
|
|
2067
|
+
function C() {
|
|
2068
|
+
i.value = !1;
|
|
2031
2069
|
}
|
|
2032
|
-
function
|
|
2033
|
-
t.value = S[0],
|
|
2070
|
+
function k({ selectedValues: S }) {
|
|
2071
|
+
t.value = S[0], y("scan", t.value), C();
|
|
2034
2072
|
}
|
|
2035
|
-
return (S,
|
|
2036
|
-
const
|
|
2037
|
-
return
|
|
2038
|
-
z
|
|
2073
|
+
return (S, H) => {
|
|
2074
|
+
const z = M("van-field"), p = M("van-picker"), Y = M("van-popup");
|
|
2075
|
+
return c(), x(P, null, [
|
|
2076
|
+
R(z, ae({
|
|
2039
2077
|
class: "yhm-scan-and-select-container",
|
|
2040
2078
|
disabled: e.disabled
|
|
2041
2079
|
}, S.$attrs, {
|
|
2042
2080
|
modelValue: t.value,
|
|
2043
|
-
"onUpdate:modelValue":
|
|
2044
|
-
onKeydown:
|
|
2081
|
+
"onUpdate:modelValue": H[0] || (H[0] = (O) => t.value = O),
|
|
2082
|
+
onKeydown: s,
|
|
2045
2083
|
error: e.error,
|
|
2046
2084
|
"error-message": e.errorMessage
|
|
2047
2085
|
}), {
|
|
2048
|
-
"right-icon":
|
|
2049
|
-
(
|
|
2050
|
-
(
|
|
2086
|
+
"right-icon": j(() => [
|
|
2087
|
+
(c(), x("svg", tn, an)),
|
|
2088
|
+
(c(), x("svg", {
|
|
2051
2089
|
width: "20px",
|
|
2052
2090
|
height: "20px",
|
|
2053
2091
|
style: { "vertical-align": "middle", "margin-left": "5px" },
|
|
@@ -2055,40 +2093,40 @@ const tn = {
|
|
|
2055
2093
|
onClick: _,
|
|
2056
2094
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2057
2095
|
}, [
|
|
2058
|
-
|
|
2096
|
+
w("path", {
|
|
2059
2097
|
stroke: "none",
|
|
2060
2098
|
fill: "var(--van-gray-8)",
|
|
2061
2099
|
class: "select-icon",
|
|
2062
|
-
d:
|
|
2100
|
+
d: U(m)
|
|
2063
2101
|
}, null, 8, ln)
|
|
2064
2102
|
]))
|
|
2065
2103
|
]),
|
|
2066
2104
|
_: 1
|
|
2067
2105
|
}, 16, ["disabled", "modelValue", "error", "error-message"]),
|
|
2068
|
-
|
|
2069
|
-
show:
|
|
2070
|
-
"onUpdate:show":
|
|
2106
|
+
R(Y, {
|
|
2107
|
+
show: i.value,
|
|
2108
|
+
"onUpdate:show": H[2] || (H[2] = (O) => i.value = O),
|
|
2071
2109
|
class: "yhm-select-container",
|
|
2072
2110
|
position: "bottom"
|
|
2073
2111
|
}, {
|
|
2074
|
-
default:
|
|
2075
|
-
|
|
2112
|
+
default: j(() => [
|
|
2113
|
+
R(p, {
|
|
2076
2114
|
title: e.palceholder,
|
|
2077
|
-
columns:
|
|
2115
|
+
columns: U(g),
|
|
2078
2116
|
modelValue: [t.value],
|
|
2079
2117
|
ref_key: "pickerRef",
|
|
2080
2118
|
ref: l,
|
|
2081
|
-
onConfirm:
|
|
2082
|
-
onCancel:
|
|
2119
|
+
onConfirm: k,
|
|
2120
|
+
onCancel: C
|
|
2083
2121
|
}, Ve({ _: 2 }, [
|
|
2084
2122
|
e.filterabled ? {
|
|
2085
2123
|
name: "title",
|
|
2086
|
-
fn:
|
|
2087
|
-
re(
|
|
2124
|
+
fn: j(() => [
|
|
2125
|
+
re(w("input", {
|
|
2088
2126
|
class: "yhm-select-filter-input",
|
|
2089
2127
|
placeholder: "输入关键词筛选",
|
|
2090
2128
|
type: "text",
|
|
2091
|
-
"onUpdate:modelValue":
|
|
2129
|
+
"onUpdate:modelValue": H[1] || (H[1] = (O) => o.value = O)
|
|
2092
2130
|
}, null, 512), [
|
|
2093
2131
|
[ue, o.value]
|
|
2094
2132
|
])
|
|
@@ -2103,40 +2141,44 @@ const tn = {
|
|
|
2103
2141
|
};
|
|
2104
2142
|
}
|
|
2105
2143
|
});
|
|
2106
|
-
function sn({ el: e, value:
|
|
2144
|
+
function sn({ el: e, value: y, color: a = "rgb(25, 137, 250)", bgColor: t = "rgba(255,255,255,0.5)", zIndex: m = 10, text: i = "加载中......" }) {
|
|
2145
|
+
if (!e)
|
|
2146
|
+
return console.error("yh-mobile-loading: DOM 不存在,loading 指令初始化失败"), !1;
|
|
2107
2147
|
const l = `yhmLoading-${Date.now()}`;
|
|
2108
2148
|
e.setAttribute("data-loadingid", l), e.style.position = "relative";
|
|
2109
|
-
const o = e.classList.contains("van-button"),
|
|
2110
|
-
isNaN(
|
|
2111
|
-
const
|
|
2112
|
-
|
|
2113
|
-
let _ = `display: none; flex-direction: column; position: absolute; left: 0px; top: 0px; width: calc(100% - ${o ? 2 : 0}px); height: calc(100% + ${o ? 2 : 0}px);justify-content: center;align-items: center;background-color: ${t}; z-index: ${
|
|
2114
|
-
o && (_ += "margin: -1px;"),
|
|
2115
|
-
const T = document.createElement("span");
|
|
2116
|
-
T.className = "van-loading__spinner van-loading__spinner--circular", T.style.color = a, T.innerHTML = '<svg class="van-loading__circular" viewBox="25 25 50 50"><circle cx="50" cy="50" r="20" fill="none"></circle></svg>', d.appendChild(T);
|
|
2149
|
+
const o = e.classList.contains("van-button"), g = window.getComputedStyle(e), s = parseInt(g.getPropertyValue("z-index"));
|
|
2150
|
+
isNaN(s) || (zindex = s + 10);
|
|
2151
|
+
const u = document.createElement("div");
|
|
2152
|
+
u.setAttribute("id", l), u.className = "van-loading van-loading--circular";
|
|
2153
|
+
let _ = `display: none; flex-direction: column; position: absolute; left: 0px; top: 0px; width: calc(100% - ${o ? 2 : 0}px); height: calc(100% + ${o ? 2 : 0}px);justify-content: center;align-items: center;background-color: ${t}; z-index: ${m};`;
|
|
2154
|
+
o && (_ += "margin: -1px;"), u.setAttribute("style", _);
|
|
2117
2155
|
const C = document.createElement("span");
|
|
2118
|
-
|
|
2156
|
+
C.className = "van-loading__spinner van-loading__spinner--circular", C.style.color = a, C.innerHTML = '<svg class="van-loading__circular" viewBox="25 25 50 50"><circle cx="50" cy="50" r="20" fill="none"></circle></svg>', u.appendChild(C);
|
|
2157
|
+
const k = document.createElement("span");
|
|
2158
|
+
return k.className = "van-loading__text", k.style.color = a, k.innerText = i, u.appendChild(k), e.appendChild(u), De(e, u, y), u;
|
|
2119
2159
|
}
|
|
2120
|
-
function De(e,
|
|
2121
|
-
|
|
2160
|
+
function De(e, y, a) {
|
|
2161
|
+
if (!e || !y)
|
|
2162
|
+
return console.error("yh-mobile-loading: DOM 不存在,loading 指令更新失败"), !1;
|
|
2163
|
+
a ? (e.style.opacity = "0.5", e.style.overflow = "hidden", y.style.display = "flex", y.style.top = e.scrollTop + "px") : (e.style.opacity = "1", e.style.overflow = "", y.style.display = "none");
|
|
2122
2164
|
}
|
|
2123
|
-
const
|
|
2124
|
-
created(e, { value:
|
|
2125
|
-
let { color: t, bgcolor:
|
|
2165
|
+
const xe = {
|
|
2166
|
+
created(e, { value: y, instance: a }) {
|
|
2167
|
+
let { color: t, bgcolor: m, text: i, zindex: l } = e.dataset;
|
|
2126
2168
|
a.$nextTick(() => {
|
|
2127
|
-
sn({ el: e, value:
|
|
2169
|
+
sn({ el: e, value: y, color: t, bgColor: m, text: i, zIndex: l });
|
|
2128
2170
|
});
|
|
2129
2171
|
},
|
|
2130
|
-
updated(e, { value:
|
|
2172
|
+
updated(e, { value: y }) {
|
|
2131
2173
|
let a = e.dataset.loadingid;
|
|
2132
2174
|
const t = document.getElementById(a);
|
|
2133
|
-
De(e, t,
|
|
2175
|
+
De(e, t, y);
|
|
2134
2176
|
},
|
|
2135
|
-
unmounted(e,
|
|
2177
|
+
unmounted(e, y) {
|
|
2136
2178
|
}
|
|
2137
2179
|
}, un = {
|
|
2138
2180
|
install(e) {
|
|
2139
|
-
e.directive("loading",
|
|
2181
|
+
e.directive("loading", xe), e.config.globalProperties.$loading = xe, e.component("yhm-list", He), e.component("yhm-dropdown-item", Ie), e.component("yhm-tabs", je), e.component("yhm-info", Ue), e.component("yhm-info-item", Ae), e.component("yhm-table", Ge), e.component("yhm-form", et), e.component("yhm-datetime", wt), e.component("yhm-radio", Mt), e.component("yhm-checkbox", Ct), e.component("yhm-input", Tt), e.component("yhm-select", St), e.component("yhm-switch", Bt), e.component("yhm-password", qt), e.component("yhm-cascader", Kt), e.component("yhm-rate", Jt), e.component("yhm-signature", Qt), e.component("yhm-slider", Xt), e.component("yhm-stepper", en), e.component("yhm-scan-and-select", on);
|
|
2140
2182
|
}
|
|
2141
2183
|
};
|
|
2142
2184
|
export {
|