mx-ui-template 0.2.3 → 0.2.5
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/dist/mx-ui-template.css +1 -1
- package/dist/mx-ui-template.js +848 -738
- package/dist/mx-ui-template.umd.cjs +1 -1
- package/package.json +2 -2
package/dist/mx-ui-template.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { NButton as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as C, createBlock as oe, openBlock as O, unref as j, normalizeStyle as X, normalizeClass as K, withCtx as te, renderSlot as R, computed as $, createSlots as lt, onUnmounted as De, onDeactivated as le, isRef as at, watch as E, onMounted as Z, nextTick as me, onActivated as he, ref as y, reactive as ge, getCurrentInstance as pe, createVNode as h, onBeforeUnmount as Ae, provide as Le, watchEffect as st, inject as ut, mergeProps as H, Transition as Fe, Teleport as Ve, withDirectives as _e, vShow as Ne, Fragment as ct, createApp as it, createElementBlock as N, createCommentVNode as ie, createElementVNode as a, toDisplayString as c, resolveDynamicComponent as rt, normalizeProps as dt, guardReactiveProps as ft } from "vue";
|
|
2
|
+
import { NButton as vt, NInput as mt, NCard as ht } from "naive-ui";
|
|
3
|
+
const gt = /* @__PURE__ */ C({
|
|
4
4
|
__name: "Button",
|
|
5
5
|
props: {
|
|
6
6
|
type: {},
|
|
@@ -16,14 +16,14 @@ const vt = /* @__PURE__ */ S({
|
|
|
16
16
|
disabled: { type: Boolean }
|
|
17
17
|
},
|
|
18
18
|
emits: ["click"],
|
|
19
|
-
setup(e, { emit:
|
|
20
|
-
const o = e,
|
|
21
|
-
!o.disabled && o.onClick && o.onClick(
|
|
19
|
+
setup(e, { emit: t }) {
|
|
20
|
+
const o = e, n = t, s = (u) => {
|
|
21
|
+
!o.disabled && o.onClick && o.onClick(u), n("click", u);
|
|
22
22
|
};
|
|
23
|
-
return (
|
|
23
|
+
return (u, i) => (O(), oe(j(vt), {
|
|
24
24
|
id: e.id,
|
|
25
|
-
class:
|
|
26
|
-
style:
|
|
25
|
+
class: K(e.class),
|
|
26
|
+
style: X(e.style),
|
|
27
27
|
type: e.type,
|
|
28
28
|
size: e.size,
|
|
29
29
|
circle: e.circle,
|
|
@@ -31,20 +31,20 @@ const vt = /* @__PURE__ */ S({
|
|
|
31
31
|
dashed: e.dashed,
|
|
32
32
|
loading: e.loading,
|
|
33
33
|
disabled: e.disabled,
|
|
34
|
-
onClick:
|
|
34
|
+
onClick: s
|
|
35
35
|
}, {
|
|
36
|
-
default:
|
|
37
|
-
|
|
36
|
+
default: te(() => [
|
|
37
|
+
R(u.$slots, "default", {}, void 0, !0)
|
|
38
38
|
]),
|
|
39
39
|
_: 3
|
|
40
40
|
}, 8, ["id", "class", "style", "type", "size", "circle", "ghost", "dashed", "loading", "disabled"]));
|
|
41
41
|
}
|
|
42
|
-
}),
|
|
42
|
+
}), F = (e, t) => {
|
|
43
43
|
const o = e.__vccOpts || e;
|
|
44
|
-
for (const [
|
|
45
|
-
o[
|
|
44
|
+
for (const [n, s] of t)
|
|
45
|
+
o[n] = s;
|
|
46
46
|
return o;
|
|
47
|
-
},
|
|
47
|
+
}, pt = /* @__PURE__ */ F(gt, [["__scopeId", "data-v-fdf1cb77"]]), yt = /* @__PURE__ */ C({
|
|
48
48
|
__name: "Input",
|
|
49
49
|
props: {
|
|
50
50
|
modelValue: {},
|
|
@@ -65,29 +65,29 @@ const vt = /* @__PURE__ */ S({
|
|
|
65
65
|
disabled: { type: Boolean }
|
|
66
66
|
},
|
|
67
67
|
emits: ["update:modelValue", "input", "blur", "focus"],
|
|
68
|
-
setup(e, { emit:
|
|
69
|
-
const o = e,
|
|
68
|
+
setup(e, { emit: t }) {
|
|
69
|
+
const o = e, n = t, s = $({
|
|
70
70
|
get() {
|
|
71
71
|
return o.modelValue?.toString() || "";
|
|
72
72
|
},
|
|
73
|
-
set(
|
|
74
|
-
|
|
73
|
+
set(r) {
|
|
74
|
+
n("update:modelValue", typeof o.modelValue == "number" && r !== "" ? Number(r) : r);
|
|
75
75
|
}
|
|
76
|
-
}),
|
|
77
|
-
|
|
78
|
-
},
|
|
79
|
-
|
|
80
|
-
},
|
|
81
|
-
|
|
76
|
+
}), u = (r) => {
|
|
77
|
+
n("update:modelValue", r);
|
|
78
|
+
}, i = (r) => {
|
|
79
|
+
n("blur", r);
|
|
80
|
+
}, l = (r) => {
|
|
81
|
+
n("focus", r);
|
|
82
82
|
};
|
|
83
|
-
return (
|
|
83
|
+
return (r, f) => (O(), oe(j(mt), {
|
|
84
84
|
id: e.id,
|
|
85
|
-
class:
|
|
86
|
-
style:
|
|
87
|
-
value:
|
|
85
|
+
class: K(e.class),
|
|
86
|
+
style: X(e.style),
|
|
87
|
+
value: s.value,
|
|
88
88
|
"onUpdate:value": [
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
f[0] || (f[0] = (g) => s.value = g),
|
|
90
|
+
u
|
|
91
91
|
],
|
|
92
92
|
type: e.type,
|
|
93
93
|
size: e.size,
|
|
@@ -98,11 +98,11 @@ const vt = /* @__PURE__ */ S({
|
|
|
98
98
|
"prefix-icon": e.prefixIcon,
|
|
99
99
|
"suffix-icon": e.suffixIcon,
|
|
100
100
|
disabled: e.disabled,
|
|
101
|
-
onBlur:
|
|
102
|
-
onFocus:
|
|
101
|
+
onBlur: i,
|
|
102
|
+
onFocus: l
|
|
103
103
|
}, null, 8, ["id", "class", "style", "value", "type", "size", "placeholder", "readonly", "maxlength", "show-word-limit", "prefix-icon", "suffix-icon", "disabled"]));
|
|
104
104
|
}
|
|
105
|
-
}),
|
|
105
|
+
}), bt = /* @__PURE__ */ F(yt, [["__scopeId", "data-v-be9f5c5c"]]), St = /* @__PURE__ */ C({
|
|
106
106
|
__name: "Card",
|
|
107
107
|
props: {
|
|
108
108
|
title: {},
|
|
@@ -116,176 +116,176 @@ const vt = /* @__PURE__ */ S({
|
|
|
116
116
|
disabled: { type: Boolean }
|
|
117
117
|
},
|
|
118
118
|
emits: ["close"],
|
|
119
|
-
setup(e, { emit:
|
|
120
|
-
const o = e,
|
|
121
|
-
o.onClose && o.onClose(),
|
|
119
|
+
setup(e, { emit: t }) {
|
|
120
|
+
const o = e, n = t, s = () => {
|
|
121
|
+
o.onClose && o.onClose(), n("close");
|
|
122
122
|
};
|
|
123
|
-
return (
|
|
123
|
+
return (u, i) => (O(), oe(j(ht), {
|
|
124
124
|
id: e.id,
|
|
125
|
-
class:
|
|
126
|
-
style:
|
|
125
|
+
class: K(e.class),
|
|
126
|
+
style: X(e.style),
|
|
127
127
|
title: e.title,
|
|
128
128
|
bordered: e.bordered,
|
|
129
129
|
size: e.size,
|
|
130
130
|
closable: e.closable,
|
|
131
|
-
onClose:
|
|
131
|
+
onClose: s
|
|
132
132
|
}, lt({
|
|
133
|
-
default:
|
|
134
|
-
|
|
133
|
+
default: te(() => [
|
|
134
|
+
R(u.$slots, "default", {}, void 0, !0)
|
|
135
135
|
]),
|
|
136
136
|
_: 2
|
|
137
137
|
}, [
|
|
138
|
-
|
|
138
|
+
u.$slots["header-extra"] ? {
|
|
139
139
|
name: "header-extra",
|
|
140
|
-
fn:
|
|
141
|
-
|
|
140
|
+
fn: te(() => [
|
|
141
|
+
R(u.$slots, "header-extra", {}, void 0, !0)
|
|
142
142
|
]),
|
|
143
143
|
key: "0"
|
|
144
144
|
} : void 0
|
|
145
145
|
]), 1032, ["id", "class", "style", "title", "bordered", "size", "closable"]));
|
|
146
146
|
}
|
|
147
|
-
}),
|
|
148
|
-
function
|
|
147
|
+
}), wt = /* @__PURE__ */ F(St, [["__scopeId", "data-v-fdc12dd9"]]);
|
|
148
|
+
function Ct() {
|
|
149
149
|
}
|
|
150
|
-
const T = Object.assign,
|
|
151
|
-
function
|
|
152
|
-
const o =
|
|
153
|
-
let
|
|
154
|
-
return o.forEach((
|
|
155
|
-
var
|
|
156
|
-
|
|
157
|
-
}),
|
|
150
|
+
const T = Object.assign, ye = typeof window < "u", ae = (e) => e !== null && typeof e == "object", D = (e) => e != null, fe = (e) => typeof e == "function", Et = (e) => ae(e) && fe(e.then) && fe(e.catch), Re = (e) => typeof e == "number" || /^\d+(\.\d+)?$/.test(e), xt = () => ye ? /ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase()) : !1;
|
|
151
|
+
function Ee(e, t) {
|
|
152
|
+
const o = t.split(".");
|
|
153
|
+
let n = e;
|
|
154
|
+
return o.forEach((s) => {
|
|
155
|
+
var u;
|
|
156
|
+
n = ae(n) && (u = n[s]) != null ? u : "";
|
|
157
|
+
}), n;
|
|
158
158
|
}
|
|
159
|
-
function
|
|
160
|
-
return
|
|
161
|
-
(
|
|
159
|
+
function Bt(e, t, o) {
|
|
160
|
+
return t.reduce(
|
|
161
|
+
(n, s) => (n[s] = e[s], n),
|
|
162
162
|
{}
|
|
163
163
|
);
|
|
164
164
|
}
|
|
165
|
-
const
|
|
165
|
+
const ne = null, w = [Number, String], L = {
|
|
166
166
|
type: Boolean,
|
|
167
167
|
default: !0
|
|
168
|
-
},
|
|
168
|
+
}, It = (e) => ({
|
|
169
169
|
type: Number,
|
|
170
170
|
default: e
|
|
171
|
-
}),
|
|
172
|
-
type:
|
|
171
|
+
}), re = (e) => ({
|
|
172
|
+
type: w,
|
|
173
173
|
default: e
|
|
174
|
-
}),
|
|
174
|
+
}), x = (e) => ({
|
|
175
175
|
type: String,
|
|
176
176
|
default: e
|
|
177
177
|
});
|
|
178
178
|
var be = typeof window < "u";
|
|
179
|
-
function
|
|
180
|
-
let
|
|
181
|
-
|
|
179
|
+
function je(e) {
|
|
180
|
+
let t;
|
|
181
|
+
Z(() => {
|
|
182
182
|
e(), me(() => {
|
|
183
|
-
|
|
183
|
+
t = !0;
|
|
184
184
|
});
|
|
185
185
|
}), he(() => {
|
|
186
|
-
|
|
186
|
+
t && e();
|
|
187
187
|
});
|
|
188
188
|
}
|
|
189
|
-
function
|
|
189
|
+
function Se(e, t, o = {}) {
|
|
190
190
|
if (!be)
|
|
191
191
|
return;
|
|
192
|
-
const { target:
|
|
193
|
-
let
|
|
194
|
-
const
|
|
195
|
-
if (
|
|
192
|
+
const { target: n = window, passive: s = !1, capture: u = !1 } = o;
|
|
193
|
+
let i = !1, l;
|
|
194
|
+
const r = (d) => {
|
|
195
|
+
if (i)
|
|
196
196
|
return;
|
|
197
|
-
const v =
|
|
198
|
-
v && !
|
|
199
|
-
capture:
|
|
200
|
-
passive:
|
|
201
|
-
}),
|
|
202
|
-
},
|
|
203
|
-
if (
|
|
197
|
+
const v = j(d);
|
|
198
|
+
v && !l && (v.addEventListener(e, t, {
|
|
199
|
+
capture: u,
|
|
200
|
+
passive: s
|
|
201
|
+
}), l = !0);
|
|
202
|
+
}, f = (d) => {
|
|
203
|
+
if (i)
|
|
204
204
|
return;
|
|
205
|
-
const v =
|
|
206
|
-
v &&
|
|
205
|
+
const v = j(d);
|
|
206
|
+
v && l && (v.removeEventListener(e, t, u), l = !1);
|
|
207
207
|
};
|
|
208
|
-
|
|
208
|
+
De(() => f(n)), le(() => f(n)), je(() => r(n));
|
|
209
209
|
let g;
|
|
210
|
-
return at(
|
|
211
|
-
|
|
210
|
+
return at(n) && (g = E(n, (d, v) => {
|
|
211
|
+
f(v), r(d);
|
|
212
212
|
})), () => {
|
|
213
|
-
g?.(),
|
|
213
|
+
g?.(), f(n), i = !0;
|
|
214
214
|
};
|
|
215
215
|
}
|
|
216
|
-
var
|
|
217
|
-
function
|
|
218
|
-
if (!
|
|
216
|
+
var J, de;
|
|
217
|
+
function kt() {
|
|
218
|
+
if (!J && (J = y(0), de = y(0), be)) {
|
|
219
219
|
const e = () => {
|
|
220
|
-
|
|
220
|
+
J.value = window.innerWidth, de.value = window.innerHeight;
|
|
221
221
|
};
|
|
222
222
|
e(), window.addEventListener("resize", e, { passive: !0 }), window.addEventListener("orientationchange", e, { passive: !0 });
|
|
223
223
|
}
|
|
224
|
-
return { width:
|
|
224
|
+
return { width: J, height: de };
|
|
225
225
|
}
|
|
226
|
-
var
|
|
227
|
-
function
|
|
226
|
+
var Pt = /scroll|auto|overlay/i, He = be ? window : void 0;
|
|
227
|
+
function Ot(e) {
|
|
228
228
|
return e.tagName !== "HTML" && e.tagName !== "BODY" && e.nodeType === 1;
|
|
229
229
|
}
|
|
230
|
-
function
|
|
230
|
+
function Me(e, t = He) {
|
|
231
231
|
let o = e;
|
|
232
|
-
for (; o && o !==
|
|
233
|
-
const { overflowY:
|
|
234
|
-
if (
|
|
232
|
+
for (; o && o !== t && Ot(o); ) {
|
|
233
|
+
const { overflowY: n } = window.getComputedStyle(o);
|
|
234
|
+
if (Pt.test(n))
|
|
235
235
|
return o;
|
|
236
236
|
o = o.parentNode;
|
|
237
237
|
}
|
|
238
|
-
return
|
|
238
|
+
return t;
|
|
239
239
|
}
|
|
240
|
-
function
|
|
241
|
-
const o =
|
|
242
|
-
return
|
|
243
|
-
e.value && (o.value =
|
|
240
|
+
function $t(e, t = He) {
|
|
241
|
+
const o = y();
|
|
242
|
+
return Z(() => {
|
|
243
|
+
e.value && (o.value = Me(e.value, t));
|
|
244
244
|
}), o;
|
|
245
245
|
}
|
|
246
|
-
function
|
|
247
|
-
const
|
|
248
|
-
return Math.max(
|
|
246
|
+
function Tt(e) {
|
|
247
|
+
const t = "scrollTop" in e ? e.scrollTop : e.pageYOffset;
|
|
248
|
+
return Math.max(t, 0);
|
|
249
249
|
}
|
|
250
|
-
|
|
251
|
-
const
|
|
252
|
-
function
|
|
253
|
-
(typeof e.cancelable != "boolean" || e.cancelable) && e.preventDefault(),
|
|
250
|
+
xt();
|
|
251
|
+
const zt = (e) => e.stopPropagation();
|
|
252
|
+
function we(e, t) {
|
|
253
|
+
(typeof e.cancelable != "boolean" || e.cancelable) && e.preventDefault(), t && zt(e);
|
|
254
254
|
}
|
|
255
|
-
|
|
256
|
-
function
|
|
257
|
-
if (
|
|
258
|
-
return
|
|
255
|
+
kt();
|
|
256
|
+
function P(e) {
|
|
257
|
+
if (D(e))
|
|
258
|
+
return Re(e) ? `${e}px` : String(e);
|
|
259
259
|
}
|
|
260
|
-
function
|
|
261
|
-
if (
|
|
260
|
+
function Dt(e) {
|
|
261
|
+
if (D(e)) {
|
|
262
262
|
if (Array.isArray(e))
|
|
263
263
|
return {
|
|
264
|
-
width:
|
|
265
|
-
height:
|
|
264
|
+
width: P(e[0]),
|
|
265
|
+
height: P(e[1])
|
|
266
266
|
};
|
|
267
|
-
const
|
|
267
|
+
const t = P(e);
|
|
268
268
|
return {
|
|
269
|
-
width:
|
|
270
|
-
height:
|
|
269
|
+
width: t,
|
|
270
|
+
height: t
|
|
271
271
|
};
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
|
-
function
|
|
275
|
-
const
|
|
276
|
-
return e !== void 0 && (
|
|
274
|
+
function At(e) {
|
|
275
|
+
const t = {};
|
|
276
|
+
return e !== void 0 && (t.zIndex = +e), t;
|
|
277
277
|
}
|
|
278
|
-
const
|
|
279
|
-
function
|
|
280
|
-
const
|
|
281
|
-
|
|
278
|
+
const Lt = /-(\w)/g, Ye = (e) => e.replace(Lt, (t, o) => o.toUpperCase()), Ft = (e) => e.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, ""), { hasOwnProperty: Vt } = Object.prototype;
|
|
279
|
+
function _t(e, t, o) {
|
|
280
|
+
const n = t[o];
|
|
281
|
+
D(n) && (!Vt.call(e, o) || !ae(n) ? e[o] = n : e[o] = Ue(Object(e[o]), n));
|
|
282
282
|
}
|
|
283
|
-
function
|
|
284
|
-
return Object.keys(
|
|
285
|
-
|
|
283
|
+
function Ue(e, t) {
|
|
284
|
+
return Object.keys(t).forEach((o) => {
|
|
285
|
+
_t(e, t, o);
|
|
286
286
|
}), e;
|
|
287
287
|
}
|
|
288
|
-
var
|
|
288
|
+
var Nt = {
|
|
289
289
|
name: "姓名",
|
|
290
290
|
tel: "电话",
|
|
291
291
|
save: "保存",
|
|
@@ -303,7 +303,7 @@ var Vt = {
|
|
|
303
303
|
start: "开始",
|
|
304
304
|
title: "日期选择",
|
|
305
305
|
weekdays: ["日", "一", "二", "三", "四", "五", "六"],
|
|
306
|
-
monthTitle: (e,
|
|
306
|
+
monthTitle: (e, t) => `${e}年${t}月`,
|
|
307
307
|
rangePrompt: (e) => `最多选择 ${e} 天`
|
|
308
308
|
},
|
|
309
309
|
vanCascader: {
|
|
@@ -347,328 +347,328 @@ var Vt = {
|
|
|
347
347
|
add: "新增地址"
|
|
348
348
|
}
|
|
349
349
|
};
|
|
350
|
-
const
|
|
351
|
-
"zh-CN":
|
|
352
|
-
}),
|
|
350
|
+
const xe = y("zh-CN"), Be = ge({
|
|
351
|
+
"zh-CN": Nt
|
|
352
|
+
}), Rt = {
|
|
353
353
|
messages() {
|
|
354
|
-
return
|
|
354
|
+
return Be[xe.value];
|
|
355
355
|
},
|
|
356
|
-
use(e,
|
|
357
|
-
|
|
356
|
+
use(e, t) {
|
|
357
|
+
xe.value = e, this.add({ [e]: t });
|
|
358
358
|
},
|
|
359
359
|
add(e = {}) {
|
|
360
|
-
|
|
360
|
+
Ue(Be, e);
|
|
361
361
|
}
|
|
362
362
|
};
|
|
363
|
-
var
|
|
364
|
-
function
|
|
365
|
-
const
|
|
366
|
-
return (o, ...
|
|
367
|
-
const
|
|
368
|
-
return
|
|
363
|
+
var jt = Rt;
|
|
364
|
+
function Ht(e) {
|
|
365
|
+
const t = Ye(e) + ".";
|
|
366
|
+
return (o, ...n) => {
|
|
367
|
+
const s = jt.messages(), u = Ee(s, t + o) || Ee(s, o);
|
|
368
|
+
return fe(u) ? u(...n) : u;
|
|
369
369
|
};
|
|
370
370
|
}
|
|
371
|
-
function
|
|
372
|
-
return
|
|
373
|
-
(o,
|
|
371
|
+
function ve(e, t) {
|
|
372
|
+
return t ? typeof t == "string" ? ` ${e}--${t}` : Array.isArray(t) ? t.reduce(
|
|
373
|
+
(o, n) => o + ve(e, n),
|
|
374
374
|
""
|
|
375
|
-
) : Object.keys(
|
|
376
|
-
(o,
|
|
375
|
+
) : Object.keys(t).reduce(
|
|
376
|
+
(o, n) => o + (t[n] ? ve(e, n) : ""),
|
|
377
377
|
""
|
|
378
378
|
) : "";
|
|
379
379
|
}
|
|
380
|
-
function
|
|
381
|
-
return (
|
|
380
|
+
function Mt(e) {
|
|
381
|
+
return (t, o) => (t && typeof t != "string" && (o = t, t = ""), t = t ? `${e}__${t}` : e, `${t}${ve(t, o)}`);
|
|
382
382
|
}
|
|
383
|
-
function
|
|
384
|
-
const
|
|
383
|
+
function A(e) {
|
|
384
|
+
const t = `van-${e}`;
|
|
385
385
|
return [
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
386
|
+
t,
|
|
387
|
+
Mt(t),
|
|
388
|
+
Ht(t)
|
|
389
389
|
];
|
|
390
390
|
}
|
|
391
|
-
const
|
|
392
|
-
function
|
|
393
|
-
args:
|
|
391
|
+
const Yt = "van-haptics-feedback", Ie = 5;
|
|
392
|
+
function Ut(e, {
|
|
393
|
+
args: t = [],
|
|
394
394
|
done: o,
|
|
395
|
-
canceled:
|
|
396
|
-
error:
|
|
395
|
+
canceled: n,
|
|
396
|
+
error: s
|
|
397
397
|
}) {
|
|
398
398
|
if (e) {
|
|
399
|
-
const
|
|
400
|
-
Et(
|
|
401
|
-
|
|
402
|
-
}).catch(
|
|
399
|
+
const u = e.apply(null, t);
|
|
400
|
+
Et(u) ? u.then((i) => {
|
|
401
|
+
i ? o() : n && n();
|
|
402
|
+
}).catch(s || Ct) : u ? o() : n && n();
|
|
403
403
|
} else
|
|
404
404
|
o();
|
|
405
405
|
}
|
|
406
|
-
function
|
|
407
|
-
return e.install = (
|
|
406
|
+
function V(e) {
|
|
407
|
+
return e.install = (t) => {
|
|
408
408
|
const { name: o } = e;
|
|
409
|
-
o && (
|
|
409
|
+
o && (t.component(o, e), t.component(Ye(`-${o}`), e));
|
|
410
410
|
}, e;
|
|
411
411
|
}
|
|
412
|
-
const
|
|
412
|
+
const Wt = Symbol();
|
|
413
413
|
function We(e) {
|
|
414
|
-
const
|
|
415
|
-
|
|
414
|
+
const t = pe();
|
|
415
|
+
t && T(t.proxy, e);
|
|
416
416
|
}
|
|
417
|
-
const [
|
|
417
|
+
const [Kt, ke] = A("badge"), Xt = {
|
|
418
418
|
dot: Boolean,
|
|
419
|
-
max:
|
|
420
|
-
tag:
|
|
419
|
+
max: w,
|
|
420
|
+
tag: x("div"),
|
|
421
421
|
color: String,
|
|
422
422
|
offset: Array,
|
|
423
|
-
content:
|
|
424
|
-
showZero:
|
|
425
|
-
position:
|
|
423
|
+
content: w,
|
|
424
|
+
showZero: L,
|
|
425
|
+
position: x("top-right")
|
|
426
426
|
};
|
|
427
|
-
var
|
|
428
|
-
name:
|
|
429
|
-
props:
|
|
427
|
+
var Zt = C({
|
|
428
|
+
name: Kt,
|
|
429
|
+
props: Xt,
|
|
430
430
|
setup(e, {
|
|
431
|
-
slots:
|
|
431
|
+
slots: t
|
|
432
432
|
}) {
|
|
433
433
|
const o = () => {
|
|
434
|
-
if (
|
|
434
|
+
if (t.content)
|
|
435
435
|
return !0;
|
|
436
436
|
const {
|
|
437
|
-
content:
|
|
438
|
-
showZero:
|
|
437
|
+
content: l,
|
|
438
|
+
showZero: r
|
|
439
439
|
} = e;
|
|
440
|
-
return
|
|
441
|
-
},
|
|
440
|
+
return D(l) && l !== "" && (r || l !== 0 && l !== "0");
|
|
441
|
+
}, n = () => {
|
|
442
442
|
const {
|
|
443
|
-
dot:
|
|
444
|
-
max:
|
|
445
|
-
content:
|
|
443
|
+
dot: l,
|
|
444
|
+
max: r,
|
|
445
|
+
content: f
|
|
446
446
|
} = e;
|
|
447
|
-
if (!
|
|
448
|
-
return
|
|
449
|
-
},
|
|
450
|
-
const
|
|
447
|
+
if (!l && o())
|
|
448
|
+
return t.content ? t.content() : D(r) && Re(f) && +f > +r ? `${r}+` : f;
|
|
449
|
+
}, s = (l) => l.startsWith("-") ? l.replace("-", "") : `-${l}`, u = $(() => {
|
|
450
|
+
const l = {
|
|
451
451
|
background: e.color
|
|
452
452
|
};
|
|
453
453
|
if (e.offset) {
|
|
454
|
-
const [
|
|
454
|
+
const [r, f] = e.offset, {
|
|
455
455
|
position: g
|
|
456
|
-
} = e, [
|
|
457
|
-
|
|
456
|
+
} = e, [d, v] = g.split("-");
|
|
457
|
+
t.default ? (typeof f == "number" ? l[d] = P(d === "top" ? f : -f) : l[d] = d === "top" ? P(f) : s(f), typeof r == "number" ? l[v] = P(v === "left" ? r : -r) : l[v] = v === "left" ? P(r) : s(r)) : (l.marginTop = P(f), l.marginLeft = P(r));
|
|
458
458
|
}
|
|
459
|
-
return
|
|
460
|
-
}),
|
|
459
|
+
return l;
|
|
460
|
+
}), i = () => {
|
|
461
461
|
if (o() || e.dot)
|
|
462
462
|
return h("div", {
|
|
463
|
-
class:
|
|
463
|
+
class: ke([e.position, {
|
|
464
464
|
dot: e.dot,
|
|
465
|
-
fixed: !!
|
|
465
|
+
fixed: !!t.default
|
|
466
466
|
}]),
|
|
467
|
-
style:
|
|
468
|
-
}, [
|
|
467
|
+
style: u.value
|
|
468
|
+
}, [n()]);
|
|
469
469
|
};
|
|
470
470
|
return () => {
|
|
471
|
-
if (
|
|
471
|
+
if (t.default) {
|
|
472
472
|
const {
|
|
473
|
-
tag:
|
|
473
|
+
tag: l
|
|
474
474
|
} = e;
|
|
475
|
-
return h(
|
|
476
|
-
class:
|
|
475
|
+
return h(l, {
|
|
476
|
+
class: ke("wrapper")
|
|
477
477
|
}, {
|
|
478
|
-
default: () => [
|
|
478
|
+
default: () => [t.default(), i()]
|
|
479
479
|
});
|
|
480
480
|
}
|
|
481
|
-
return
|
|
481
|
+
return i();
|
|
482
482
|
};
|
|
483
483
|
}
|
|
484
484
|
});
|
|
485
|
-
const
|
|
485
|
+
const Gt = V(Zt);
|
|
486
486
|
let Ke = 2e3;
|
|
487
|
-
const
|
|
487
|
+
const qt = () => ++Ke, Jt = (e) => {
|
|
488
488
|
Ke = e;
|
|
489
|
-
}, [Xe,
|
|
490
|
-
tag:
|
|
491
|
-
theme:
|
|
489
|
+
}, [Xe, Qt] = A("config-provider"), Ze = Symbol(Xe), en = {
|
|
490
|
+
tag: x("div"),
|
|
491
|
+
theme: x("light"),
|
|
492
492
|
zIndex: Number,
|
|
493
493
|
themeVars: Object,
|
|
494
494
|
themeVarsDark: Object,
|
|
495
495
|
themeVarsLight: Object,
|
|
496
|
-
themeVarsScope:
|
|
496
|
+
themeVarsScope: x("local"),
|
|
497
497
|
iconPrefix: String
|
|
498
498
|
};
|
|
499
|
-
function
|
|
499
|
+
function tn(e) {
|
|
500
500
|
return e.replace(/([a-zA-Z])(\d)/g, "$1-$2");
|
|
501
501
|
}
|
|
502
|
-
function
|
|
503
|
-
const
|
|
502
|
+
function nn(e) {
|
|
503
|
+
const t = {};
|
|
504
504
|
return Object.keys(e).forEach((o) => {
|
|
505
|
-
const
|
|
506
|
-
|
|
507
|
-
}),
|
|
505
|
+
const n = tn(Ft(o));
|
|
506
|
+
t[`--van-${n}`] = e[o];
|
|
507
|
+
}), t;
|
|
508
508
|
}
|
|
509
|
-
function
|
|
509
|
+
function Q(e = {}, t = {}) {
|
|
510
510
|
Object.keys(e).forEach((o) => {
|
|
511
|
-
e[o] !==
|
|
512
|
-
}), Object.keys(
|
|
511
|
+
e[o] !== t[o] && document.documentElement.style.setProperty(o, e[o]);
|
|
512
|
+
}), Object.keys(t).forEach((o) => {
|
|
513
513
|
e[o] || document.documentElement.style.removeProperty(o);
|
|
514
514
|
});
|
|
515
515
|
}
|
|
516
|
-
|
|
516
|
+
C({
|
|
517
517
|
name: Xe,
|
|
518
|
-
props:
|
|
518
|
+
props: en,
|
|
519
519
|
setup(e, {
|
|
520
|
-
slots:
|
|
520
|
+
slots: t
|
|
521
521
|
}) {
|
|
522
|
-
const o =
|
|
523
|
-
if (
|
|
524
|
-
const
|
|
522
|
+
const o = $(() => nn(T({}, e.themeVars, e.theme === "dark" ? e.themeVarsDark : e.themeVarsLight)));
|
|
523
|
+
if (ye) {
|
|
524
|
+
const n = () => {
|
|
525
525
|
document.documentElement.classList.add(`van-theme-${e.theme}`);
|
|
526
|
-
},
|
|
527
|
-
document.documentElement.classList.remove(`van-theme-${
|
|
526
|
+
}, s = (u = e.theme) => {
|
|
527
|
+
document.documentElement.classList.remove(`van-theme-${u}`);
|
|
528
528
|
};
|
|
529
|
-
|
|
530
|
-
|
|
529
|
+
E(() => e.theme, (u, i) => {
|
|
530
|
+
i && s(i), n();
|
|
531
531
|
}, {
|
|
532
532
|
immediate: !0
|
|
533
|
-
}), he(
|
|
534
|
-
e.themeVarsScope === "global" &&
|
|
535
|
-
}),
|
|
536
|
-
|
|
537
|
-
}), e.themeVarsScope === "global" &&
|
|
533
|
+
}), he(n), le(s), Ae(s), E(o, (u, i) => {
|
|
534
|
+
e.themeVarsScope === "global" && Q(u, i);
|
|
535
|
+
}), E(() => e.themeVarsScope, (u, i) => {
|
|
536
|
+
i === "global" && Q({}, o.value), u === "global" && Q(o.value, {});
|
|
537
|
+
}), e.themeVarsScope === "global" && Q(o.value, {});
|
|
538
538
|
}
|
|
539
|
-
return
|
|
540
|
-
e.zIndex !== void 0 &&
|
|
539
|
+
return Le(Ze, e), st(() => {
|
|
540
|
+
e.zIndex !== void 0 && Jt(e.zIndex);
|
|
541
541
|
}), () => h(e.tag, {
|
|
542
|
-
class:
|
|
542
|
+
class: Qt(),
|
|
543
543
|
style: e.themeVarsScope === "local" ? o.value : void 0
|
|
544
544
|
}, {
|
|
545
545
|
default: () => {
|
|
546
|
-
var
|
|
547
|
-
return [(
|
|
546
|
+
var n;
|
|
547
|
+
return [(n = t.default) == null ? void 0 : n.call(t)];
|
|
548
548
|
}
|
|
549
549
|
});
|
|
550
550
|
}
|
|
551
551
|
});
|
|
552
|
-
const [
|
|
552
|
+
const [on, Pe] = A("icon"), ln = (e) => e?.includes("/"), an = {
|
|
553
553
|
dot: Boolean,
|
|
554
|
-
tag:
|
|
554
|
+
tag: x("i"),
|
|
555
555
|
name: String,
|
|
556
|
-
size:
|
|
557
|
-
badge:
|
|
556
|
+
size: w,
|
|
557
|
+
badge: w,
|
|
558
558
|
color: String,
|
|
559
559
|
badgeProps: Object,
|
|
560
560
|
classPrefix: String
|
|
561
561
|
};
|
|
562
|
-
var
|
|
563
|
-
name:
|
|
564
|
-
props:
|
|
562
|
+
var sn = C({
|
|
563
|
+
name: on,
|
|
564
|
+
props: an,
|
|
565
565
|
setup(e, {
|
|
566
|
-
slots:
|
|
566
|
+
slots: t
|
|
567
567
|
}) {
|
|
568
|
-
const o = ut(Ze, null),
|
|
568
|
+
const o = ut(Ze, null), n = $(() => e.classPrefix || o?.iconPrefix || Pe());
|
|
569
569
|
return () => {
|
|
570
570
|
const {
|
|
571
|
-
tag:
|
|
572
|
-
dot:
|
|
573
|
-
name:
|
|
574
|
-
size:
|
|
575
|
-
badge:
|
|
576
|
-
color:
|
|
577
|
-
} = e, g =
|
|
578
|
-
return h(
|
|
579
|
-
dot:
|
|
580
|
-
tag:
|
|
581
|
-
class: [
|
|
571
|
+
tag: s,
|
|
572
|
+
dot: u,
|
|
573
|
+
name: i,
|
|
574
|
+
size: l,
|
|
575
|
+
badge: r,
|
|
576
|
+
color: f
|
|
577
|
+
} = e, g = ln(i);
|
|
578
|
+
return h(Gt, H({
|
|
579
|
+
dot: u,
|
|
580
|
+
tag: s,
|
|
581
|
+
class: [n.value, g ? "" : `${n.value}-${i}`],
|
|
582
582
|
style: {
|
|
583
|
-
color:
|
|
584
|
-
fontSize:
|
|
583
|
+
color: f,
|
|
584
|
+
fontSize: P(l)
|
|
585
585
|
},
|
|
586
|
-
content:
|
|
586
|
+
content: r
|
|
587
587
|
}, e.badgeProps), {
|
|
588
588
|
default: () => {
|
|
589
|
-
var
|
|
590
|
-
return [(
|
|
591
|
-
class:
|
|
592
|
-
src:
|
|
589
|
+
var d;
|
|
590
|
+
return [(d = t.default) == null ? void 0 : d.call(t), g && h("img", {
|
|
591
|
+
class: Pe("image"),
|
|
592
|
+
src: i
|
|
593
593
|
}, null)];
|
|
594
594
|
}
|
|
595
595
|
});
|
|
596
596
|
};
|
|
597
597
|
}
|
|
598
598
|
});
|
|
599
|
-
const Ge =
|
|
600
|
-
class:
|
|
601
|
-
}, null)),
|
|
602
|
-
class:
|
|
599
|
+
const Ge = V(sn), [un, W] = A("loading"), cn = Array(12).fill(null).map((e, t) => h("i", {
|
|
600
|
+
class: W("line", String(t + 1))
|
|
601
|
+
}, null)), rn = h("svg", {
|
|
602
|
+
class: W("circular"),
|
|
603
603
|
viewBox: "25 25 50 50"
|
|
604
604
|
}, [h("circle", {
|
|
605
605
|
cx: "50",
|
|
606
606
|
cy: "50",
|
|
607
607
|
r: "20",
|
|
608
608
|
fill: "none"
|
|
609
|
-
}, null)]),
|
|
610
|
-
size:
|
|
611
|
-
type:
|
|
609
|
+
}, null)]), dn = {
|
|
610
|
+
size: w,
|
|
611
|
+
type: x("circular"),
|
|
612
612
|
color: String,
|
|
613
613
|
vertical: Boolean,
|
|
614
|
-
textSize:
|
|
614
|
+
textSize: w,
|
|
615
615
|
textColor: String
|
|
616
616
|
};
|
|
617
|
-
var
|
|
618
|
-
name:
|
|
619
|
-
props:
|
|
617
|
+
var fn = C({
|
|
618
|
+
name: un,
|
|
619
|
+
props: dn,
|
|
620
620
|
setup(e, {
|
|
621
|
-
slots:
|
|
621
|
+
slots: t
|
|
622
622
|
}) {
|
|
623
|
-
const o =
|
|
623
|
+
const o = $(() => T({
|
|
624
624
|
color: e.color
|
|
625
|
-
},
|
|
626
|
-
const
|
|
625
|
+
}, Dt(e.size))), n = () => {
|
|
626
|
+
const u = e.type === "spinner" ? cn : rn;
|
|
627
627
|
return h("span", {
|
|
628
|
-
class:
|
|
628
|
+
class: W("spinner", e.type),
|
|
629
629
|
style: o.value
|
|
630
|
-
}, [
|
|
631
|
-
},
|
|
632
|
-
var
|
|
633
|
-
if (
|
|
630
|
+
}, [t.icon ? t.icon() : u]);
|
|
631
|
+
}, s = () => {
|
|
632
|
+
var u;
|
|
633
|
+
if (t.default)
|
|
634
634
|
return h("span", {
|
|
635
|
-
class:
|
|
635
|
+
class: W("text"),
|
|
636
636
|
style: {
|
|
637
|
-
fontSize:
|
|
638
|
-
color: (
|
|
637
|
+
fontSize: P(e.textSize),
|
|
638
|
+
color: (u = e.textColor) != null ? u : e.color
|
|
639
639
|
}
|
|
640
|
-
}, [
|
|
640
|
+
}, [t.default()]);
|
|
641
641
|
};
|
|
642
642
|
return () => {
|
|
643
643
|
const {
|
|
644
|
-
type:
|
|
645
|
-
vertical:
|
|
644
|
+
type: u,
|
|
645
|
+
vertical: i
|
|
646
646
|
} = e;
|
|
647
647
|
return h("div", {
|
|
648
|
-
class:
|
|
649
|
-
vertical:
|
|
648
|
+
class: W([u, {
|
|
649
|
+
vertical: i
|
|
650
650
|
}]),
|
|
651
651
|
"aria-live": "polite",
|
|
652
652
|
"aria-busy": !0
|
|
653
|
-
}, [
|
|
653
|
+
}, [n(), s()]);
|
|
654
654
|
};
|
|
655
655
|
}
|
|
656
656
|
});
|
|
657
|
-
const qe =
|
|
657
|
+
const qe = V(fn), vn = {
|
|
658
658
|
// whether to show popup
|
|
659
659
|
show: Boolean,
|
|
660
660
|
// z-index
|
|
661
|
-
zIndex:
|
|
661
|
+
zIndex: w,
|
|
662
662
|
// whether to show overlay
|
|
663
|
-
overlay:
|
|
663
|
+
overlay: L,
|
|
664
664
|
// transition duration
|
|
665
|
-
duration:
|
|
665
|
+
duration: w,
|
|
666
666
|
// teleport
|
|
667
667
|
teleport: [String, Object],
|
|
668
668
|
// prevent body scroll
|
|
669
|
-
lockScroll:
|
|
669
|
+
lockScroll: L,
|
|
670
670
|
// whether to lazy render
|
|
671
|
-
lazyRender:
|
|
671
|
+
lazyRender: L,
|
|
672
672
|
// callback function before close
|
|
673
673
|
beforeClose: Function,
|
|
674
674
|
// overlay props
|
|
@@ -676,384 +676,384 @@ const qe = F(cn), rn = {
|
|
|
676
676
|
// overlay custom style
|
|
677
677
|
overlayStyle: Object,
|
|
678
678
|
// overlay custom class name
|
|
679
|
-
overlayClass:
|
|
679
|
+
overlayClass: ne,
|
|
680
680
|
// Initial rendering animation
|
|
681
681
|
transitionAppear: Boolean,
|
|
682
682
|
// whether to close popup when overlay is clicked
|
|
683
|
-
closeOnClickOverlay:
|
|
683
|
+
closeOnClickOverlay: L
|
|
684
684
|
};
|
|
685
|
-
function
|
|
686
|
-
return e >
|
|
685
|
+
function mn(e, t) {
|
|
686
|
+
return e > t ? "horizontal" : t > e ? "vertical" : "";
|
|
687
687
|
}
|
|
688
688
|
function Je() {
|
|
689
|
-
const e =
|
|
690
|
-
o.value = 0,
|
|
689
|
+
const e = y(0), t = y(0), o = y(0), n = y(0), s = y(0), u = y(0), i = y(""), l = y(!0), r = () => i.value === "vertical", f = () => i.value === "horizontal", g = () => {
|
|
690
|
+
o.value = 0, n.value = 0, s.value = 0, u.value = 0, i.value = "", l.value = !0;
|
|
691
691
|
};
|
|
692
692
|
return {
|
|
693
|
-
move: (
|
|
694
|
-
const
|
|
695
|
-
o.value = (
|
|
693
|
+
move: (b) => {
|
|
694
|
+
const B = b.touches[0];
|
|
695
|
+
o.value = (B.clientX < 0 ? 0 : B.clientX) - e.value, n.value = B.clientY - t.value, s.value = Math.abs(o.value), u.value = Math.abs(n.value);
|
|
696
696
|
const k = 10;
|
|
697
|
-
(!
|
|
697
|
+
(!i.value || s.value < k && u.value < k) && (i.value = mn(s.value, u.value)), l.value && (s.value > Ie || u.value > Ie) && (l.value = !1);
|
|
698
698
|
},
|
|
699
|
-
start: (
|
|
700
|
-
g(), e.value =
|
|
699
|
+
start: (b) => {
|
|
700
|
+
g(), e.value = b.touches[0].clientX, t.value = b.touches[0].clientY;
|
|
701
701
|
},
|
|
702
702
|
reset: g,
|
|
703
703
|
startX: e,
|
|
704
|
-
startY:
|
|
704
|
+
startY: t,
|
|
705
705
|
deltaX: o,
|
|
706
|
-
deltaY:
|
|
707
|
-
offsetX:
|
|
708
|
-
offsetY:
|
|
709
|
-
direction:
|
|
710
|
-
isVertical:
|
|
711
|
-
isHorizontal:
|
|
712
|
-
isTap:
|
|
706
|
+
deltaY: n,
|
|
707
|
+
offsetX: s,
|
|
708
|
+
offsetY: u,
|
|
709
|
+
direction: i,
|
|
710
|
+
isVertical: r,
|
|
711
|
+
isHorizontal: f,
|
|
712
|
+
isTap: l
|
|
713
713
|
};
|
|
714
714
|
}
|
|
715
|
-
let
|
|
716
|
-
const
|
|
717
|
-
function
|
|
718
|
-
const o = Je(),
|
|
715
|
+
let M = 0;
|
|
716
|
+
const Oe = "van-overflow-hidden";
|
|
717
|
+
function hn(e, t) {
|
|
718
|
+
const o = Je(), n = "01", s = "10", u = (g) => {
|
|
719
719
|
o.move(g);
|
|
720
|
-
const
|
|
720
|
+
const d = o.deltaY.value > 0 ? s : n, v = Me(
|
|
721
721
|
g.target,
|
|
722
722
|
e.value
|
|
723
|
-
), { scrollHeight:
|
|
724
|
-
let
|
|
725
|
-
k === 0 ?
|
|
726
|
-
},
|
|
727
|
-
document.addEventListener("touchstart", o.start), document.addEventListener("touchmove",
|
|
728
|
-
},
|
|
729
|
-
|
|
730
|
-
},
|
|
731
|
-
|
|
732
|
-
g ?
|
|
723
|
+
), { scrollHeight: b, offsetHeight: B, scrollTop: k } = v;
|
|
724
|
+
let I = "11";
|
|
725
|
+
k === 0 ? I = B >= b ? "00" : "01" : k + B >= b && (I = "10"), I !== "11" && o.isVertical() && !(parseInt(I, 2) & parseInt(d, 2)) && we(g, !0);
|
|
726
|
+
}, i = () => {
|
|
727
|
+
document.addEventListener("touchstart", o.start), document.addEventListener("touchmove", u, { passive: !1 }), M || document.body.classList.add(Oe), M++;
|
|
728
|
+
}, l = () => {
|
|
729
|
+
M && (document.removeEventListener("touchstart", o.start), document.removeEventListener("touchmove", u), M--, M || document.body.classList.remove(Oe));
|
|
730
|
+
}, r = () => t() && i(), f = () => t() && l();
|
|
731
|
+
je(r), le(f), Ae(f), E(t, (g) => {
|
|
732
|
+
g ? i() : l();
|
|
733
733
|
});
|
|
734
734
|
}
|
|
735
735
|
function Qe(e) {
|
|
736
|
-
const
|
|
737
|
-
return
|
|
736
|
+
const t = y(!1);
|
|
737
|
+
return E(
|
|
738
738
|
e,
|
|
739
739
|
(o) => {
|
|
740
|
-
o && (
|
|
740
|
+
o && (t.value = o);
|
|
741
741
|
},
|
|
742
742
|
{ immediate: !0 }
|
|
743
|
-
), (o) => () =>
|
|
743
|
+
), (o) => () => t.value ? o() : null;
|
|
744
744
|
}
|
|
745
|
-
const
|
|
745
|
+
const $e = () => {
|
|
746
746
|
var e;
|
|
747
|
-
const { scopeId:
|
|
748
|
-
return
|
|
749
|
-
}, [
|
|
747
|
+
const { scopeId: t } = ((e = pe()) == null ? void 0 : e.vnode) || {};
|
|
748
|
+
return t ? { [t]: "" } : null;
|
|
749
|
+
}, [gn, pn] = A("overlay"), yn = {
|
|
750
750
|
show: Boolean,
|
|
751
|
-
zIndex:
|
|
752
|
-
duration:
|
|
753
|
-
className:
|
|
754
|
-
lockScroll:
|
|
755
|
-
lazyRender:
|
|
751
|
+
zIndex: w,
|
|
752
|
+
duration: w,
|
|
753
|
+
className: ne,
|
|
754
|
+
lockScroll: L,
|
|
755
|
+
lazyRender: L,
|
|
756
756
|
customStyle: Object,
|
|
757
757
|
teleport: [String, Object]
|
|
758
758
|
};
|
|
759
|
-
var
|
|
760
|
-
name:
|
|
759
|
+
var bn = C({
|
|
760
|
+
name: gn,
|
|
761
761
|
inheritAttrs: !1,
|
|
762
|
-
props:
|
|
762
|
+
props: yn,
|
|
763
763
|
setup(e, {
|
|
764
|
-
attrs:
|
|
764
|
+
attrs: t,
|
|
765
765
|
slots: o
|
|
766
766
|
}) {
|
|
767
|
-
const
|
|
768
|
-
e.lockScroll &&
|
|
769
|
-
},
|
|
770
|
-
var
|
|
771
|
-
const
|
|
772
|
-
return
|
|
773
|
-
ref:
|
|
774
|
-
style:
|
|
775
|
-
class: [
|
|
776
|
-
},
|
|
767
|
+
const n = y(), s = Qe(() => e.show || !e.lazyRender), u = (l) => {
|
|
768
|
+
e.lockScroll && we(l, !0);
|
|
769
|
+
}, i = s(() => {
|
|
770
|
+
var l;
|
|
771
|
+
const r = T(At(e.zIndex), e.customStyle);
|
|
772
|
+
return D(e.duration) && (r.animationDuration = `${e.duration}s`), _e(h("div", H({
|
|
773
|
+
ref: n,
|
|
774
|
+
style: r,
|
|
775
|
+
class: [pn(), e.className]
|
|
776
|
+
}, t), [(l = o.default) == null ? void 0 : l.call(o)]), [[Ne, e.show]]);
|
|
777
777
|
});
|
|
778
|
-
return
|
|
779
|
-
target:
|
|
778
|
+
return Se("touchmove", u, {
|
|
779
|
+
target: n
|
|
780
780
|
}), () => {
|
|
781
|
-
const
|
|
781
|
+
const l = h(Fe, {
|
|
782
782
|
name: "van-fade",
|
|
783
783
|
appear: !0
|
|
784
784
|
}, {
|
|
785
|
-
default:
|
|
785
|
+
default: i
|
|
786
786
|
});
|
|
787
|
-
return e.teleport ? h(
|
|
787
|
+
return e.teleport ? h(Ve, {
|
|
788
788
|
to: e.teleport
|
|
789
789
|
}, {
|
|
790
|
-
default: () => [
|
|
791
|
-
}) :
|
|
790
|
+
default: () => [l]
|
|
791
|
+
}) : l;
|
|
792
792
|
};
|
|
793
793
|
}
|
|
794
794
|
});
|
|
795
|
-
const
|
|
795
|
+
const Sn = V(bn), wn = T({}, vn, {
|
|
796
796
|
round: Boolean,
|
|
797
|
-
position:
|
|
798
|
-
closeIcon:
|
|
797
|
+
position: x("center"),
|
|
798
|
+
closeIcon: x("cross"),
|
|
799
799
|
closeable: Boolean,
|
|
800
800
|
transition: String,
|
|
801
801
|
iconPrefix: String,
|
|
802
802
|
closeOnPopstate: Boolean,
|
|
803
|
-
closeIconPosition:
|
|
803
|
+
closeIconPosition: x("top-right"),
|
|
804
804
|
destroyOnClose: Boolean,
|
|
805
805
|
safeAreaInsetTop: Boolean,
|
|
806
806
|
safeAreaInsetBottom: Boolean
|
|
807
|
-
}), [
|
|
808
|
-
var En =
|
|
809
|
-
name:
|
|
807
|
+
}), [Cn, Te] = A("popup");
|
|
808
|
+
var En = C({
|
|
809
|
+
name: Cn,
|
|
810
810
|
inheritAttrs: !1,
|
|
811
|
-
props:
|
|
811
|
+
props: wn,
|
|
812
812
|
emits: ["open", "close", "opened", "closed", "keydown", "update:show", "clickOverlay", "clickCloseIcon"],
|
|
813
813
|
setup(e, {
|
|
814
|
-
emit:
|
|
814
|
+
emit: t,
|
|
815
815
|
attrs: o,
|
|
816
|
-
slots:
|
|
816
|
+
slots: n
|
|
817
817
|
}) {
|
|
818
|
-
let
|
|
819
|
-
const
|
|
820
|
-
const
|
|
821
|
-
zIndex:
|
|
818
|
+
let s, u;
|
|
819
|
+
const i = y(), l = y(), r = Qe(() => e.show || !e.lazyRender), f = $(() => {
|
|
820
|
+
const p = {
|
|
821
|
+
zIndex: i.value
|
|
822
822
|
};
|
|
823
|
-
if (
|
|
824
|
-
const
|
|
825
|
-
|
|
823
|
+
if (D(e.duration)) {
|
|
824
|
+
const z = e.position === "center" ? "animationDuration" : "transitionDuration";
|
|
825
|
+
p[z] = `${e.duration}s`;
|
|
826
826
|
}
|
|
827
|
-
return
|
|
827
|
+
return p;
|
|
828
828
|
}), g = () => {
|
|
829
|
-
|
|
830
|
-
},
|
|
831
|
-
|
|
829
|
+
s || (s = !0, i.value = e.zIndex !== void 0 ? +e.zIndex : qt(), t("open"));
|
|
830
|
+
}, d = () => {
|
|
831
|
+
s && Ut(e.beforeClose, {
|
|
832
832
|
done() {
|
|
833
|
-
|
|
833
|
+
s = !1, t("close"), t("update:show", !1);
|
|
834
834
|
}
|
|
835
835
|
});
|
|
836
|
-
}, v = (
|
|
837
|
-
|
|
838
|
-
},
|
|
836
|
+
}, v = (p) => {
|
|
837
|
+
t("clickOverlay", p), e.closeOnClickOverlay && d();
|
|
838
|
+
}, b = () => {
|
|
839
839
|
if (e.overlay) {
|
|
840
|
-
const
|
|
840
|
+
const p = T({
|
|
841
841
|
show: e.show,
|
|
842
842
|
class: e.overlayClass,
|
|
843
|
-
zIndex:
|
|
843
|
+
zIndex: i.value,
|
|
844
844
|
duration: e.duration,
|
|
845
845
|
customStyle: e.overlayStyle,
|
|
846
846
|
role: e.closeOnClickOverlay ? "button" : void 0,
|
|
847
847
|
tabindex: e.closeOnClickOverlay ? 0 : void 0
|
|
848
848
|
}, e.overlayProps);
|
|
849
|
-
return h(
|
|
849
|
+
return h(Sn, H(p, $e(), {
|
|
850
850
|
onClick: v
|
|
851
851
|
}), {
|
|
852
|
-
default:
|
|
852
|
+
default: n["overlay-content"]
|
|
853
853
|
});
|
|
854
854
|
}
|
|
855
|
-
},
|
|
856
|
-
|
|
855
|
+
}, B = (p) => {
|
|
856
|
+
t("clickCloseIcon", p), d();
|
|
857
857
|
}, k = () => {
|
|
858
858
|
if (e.closeable)
|
|
859
859
|
return h(Ge, {
|
|
860
860
|
role: "button",
|
|
861
861
|
tabindex: 0,
|
|
862
862
|
name: e.closeIcon,
|
|
863
|
-
class: [
|
|
863
|
+
class: [Te("close-icon", e.closeIconPosition), Yt],
|
|
864
864
|
classPrefix: e.iconPrefix,
|
|
865
|
-
onClick:
|
|
865
|
+
onClick: B
|
|
866
866
|
}, null);
|
|
867
867
|
};
|
|
868
|
-
let
|
|
869
|
-
const
|
|
870
|
-
|
|
871
|
-
|
|
868
|
+
let I;
|
|
869
|
+
const se = () => {
|
|
870
|
+
I && clearTimeout(I), I = setTimeout(() => {
|
|
871
|
+
t("opened");
|
|
872
872
|
});
|
|
873
|
-
},
|
|
874
|
-
var
|
|
873
|
+
}, ue = () => t("closed"), G = (p) => t("keydown", p), m = r(() => {
|
|
874
|
+
var p;
|
|
875
875
|
const {
|
|
876
|
-
destroyOnClose:
|
|
877
|
-
round:
|
|
878
|
-
position:
|
|
876
|
+
destroyOnClose: z,
|
|
877
|
+
round: ce,
|
|
878
|
+
position: q,
|
|
879
879
|
safeAreaInsetTop: nt,
|
|
880
880
|
safeAreaInsetBottom: ot,
|
|
881
|
-
show:
|
|
881
|
+
show: Ce
|
|
882
882
|
} = e;
|
|
883
|
-
if (!(!
|
|
884
|
-
return
|
|
885
|
-
ref:
|
|
886
|
-
style:
|
|
883
|
+
if (!(!Ce && z))
|
|
884
|
+
return _e(h("div", H({
|
|
885
|
+
ref: l,
|
|
886
|
+
style: f.value,
|
|
887
887
|
role: "dialog",
|
|
888
888
|
tabindex: 0,
|
|
889
|
-
class: [
|
|
890
|
-
round:
|
|
891
|
-
[
|
|
889
|
+
class: [Te({
|
|
890
|
+
round: ce,
|
|
891
|
+
[q]: q
|
|
892
892
|
}), {
|
|
893
893
|
"van-safe-area-top": nt,
|
|
894
894
|
"van-safe-area-bottom": ot
|
|
895
895
|
}],
|
|
896
|
-
onKeydown:
|
|
897
|
-
}, o,
|
|
898
|
-
}),
|
|
896
|
+
onKeydown: G
|
|
897
|
+
}, o, $e()), [(p = n.default) == null ? void 0 : p.call(n), k()]), [[Ne, Ce]]);
|
|
898
|
+
}), S = () => {
|
|
899
899
|
const {
|
|
900
|
-
position:
|
|
901
|
-
transition:
|
|
902
|
-
transitionAppear:
|
|
903
|
-
} = e,
|
|
904
|
-
return h(
|
|
905
|
-
name:
|
|
906
|
-
appear:
|
|
907
|
-
onAfterEnter:
|
|
908
|
-
onAfterLeave:
|
|
900
|
+
position: p,
|
|
901
|
+
transition: z,
|
|
902
|
+
transitionAppear: ce
|
|
903
|
+
} = e, q = p === "center" ? "van-fade" : `van-popup-slide-${p}`;
|
|
904
|
+
return h(Fe, {
|
|
905
|
+
name: z || q,
|
|
906
|
+
appear: ce,
|
|
907
|
+
onAfterEnter: se,
|
|
908
|
+
onAfterLeave: ue
|
|
909
909
|
}, {
|
|
910
|
-
default:
|
|
910
|
+
default: m
|
|
911
911
|
});
|
|
912
912
|
};
|
|
913
|
-
return
|
|
914
|
-
|
|
915
|
-
var
|
|
916
|
-
(
|
|
917
|
-
})), !
|
|
913
|
+
return E(() => e.show, (p) => {
|
|
914
|
+
p && !s && (g(), o.tabindex === 0 && me(() => {
|
|
915
|
+
var z;
|
|
916
|
+
(z = l.value) == null || z.focus();
|
|
917
|
+
})), !p && s && (s = !1, t("close"));
|
|
918
918
|
}), We({
|
|
919
|
-
popupRef:
|
|
920
|
-
}),
|
|
921
|
-
e.closeOnPopstate && (
|
|
922
|
-
}),
|
|
919
|
+
popupRef: l
|
|
920
|
+
}), hn(l, () => e.show && e.lockScroll), Se("popstate", () => {
|
|
921
|
+
e.closeOnPopstate && (d(), u = !1);
|
|
922
|
+
}), Z(() => {
|
|
923
923
|
e.show && g();
|
|
924
924
|
}), he(() => {
|
|
925
|
-
|
|
926
|
-
}),
|
|
927
|
-
e.show && e.teleport && (
|
|
928
|
-
}),
|
|
925
|
+
u && (t("update:show", !0), u = !1);
|
|
926
|
+
}), le(() => {
|
|
927
|
+
e.show && e.teleport && (d(), u = !0);
|
|
928
|
+
}), Le(Wt, () => e.show), () => e.teleport ? h(Ve, {
|
|
929
929
|
to: e.teleport
|
|
930
930
|
}, {
|
|
931
|
-
default: () => [
|
|
932
|
-
}) : h(ct, null, [
|
|
931
|
+
default: () => [b(), S()]
|
|
932
|
+
}) : h(ct, null, [b(), S()]);
|
|
933
933
|
}
|
|
934
934
|
});
|
|
935
|
-
const
|
|
936
|
-
let
|
|
937
|
-
function
|
|
938
|
-
e ? (
|
|
935
|
+
const xn = V(En);
|
|
936
|
+
let Y = 0;
|
|
937
|
+
function Bn(e) {
|
|
938
|
+
e ? (Y || document.body.classList.add("van-toast--unclickable"), Y++) : Y && (Y--, Y || document.body.classList.remove("van-toast--unclickable"));
|
|
939
939
|
}
|
|
940
|
-
const [
|
|
940
|
+
const [In, _] = A("toast"), kn = ["show", "overlay", "teleport", "transition", "overlayClass", "overlayStyle", "closeOnClickOverlay", "zIndex"], Pn = {
|
|
941
941
|
icon: String,
|
|
942
942
|
show: Boolean,
|
|
943
|
-
type:
|
|
943
|
+
type: x("text"),
|
|
944
944
|
overlay: Boolean,
|
|
945
|
-
message:
|
|
946
|
-
iconSize:
|
|
947
|
-
duration:
|
|
948
|
-
position:
|
|
945
|
+
message: w,
|
|
946
|
+
iconSize: w,
|
|
947
|
+
duration: It(2e3),
|
|
948
|
+
position: x("middle"),
|
|
949
949
|
teleport: [String, Object],
|
|
950
950
|
wordBreak: String,
|
|
951
|
-
className:
|
|
951
|
+
className: ne,
|
|
952
952
|
iconPrefix: String,
|
|
953
|
-
transition:
|
|
953
|
+
transition: x("van-fade"),
|
|
954
954
|
loadingType: String,
|
|
955
955
|
forbidClick: Boolean,
|
|
956
|
-
overlayClass:
|
|
956
|
+
overlayClass: ne,
|
|
957
957
|
overlayStyle: Object,
|
|
958
958
|
closeOnClick: Boolean,
|
|
959
959
|
closeOnClickOverlay: Boolean,
|
|
960
|
-
zIndex:
|
|
960
|
+
zIndex: w
|
|
961
961
|
};
|
|
962
|
-
var et =
|
|
963
|
-
name:
|
|
964
|
-
props:
|
|
962
|
+
var et = C({
|
|
963
|
+
name: In,
|
|
964
|
+
props: Pn,
|
|
965
965
|
emits: ["update:show"],
|
|
966
966
|
setup(e, {
|
|
967
|
-
emit:
|
|
967
|
+
emit: t,
|
|
968
968
|
slots: o
|
|
969
969
|
}) {
|
|
970
|
-
let
|
|
971
|
-
const
|
|
972
|
-
const
|
|
973
|
-
|
|
974
|
-
},
|
|
975
|
-
e.closeOnClick &&
|
|
976
|
-
},
|
|
970
|
+
let n, s = !1;
|
|
971
|
+
const u = () => {
|
|
972
|
+
const d = e.show && e.forbidClick;
|
|
973
|
+
s !== d && (s = d, Bn(s));
|
|
974
|
+
}, i = (d) => t("update:show", d), l = () => {
|
|
975
|
+
e.closeOnClick && i(!1);
|
|
976
|
+
}, r = () => clearTimeout(n), f = () => {
|
|
977
977
|
const {
|
|
978
|
-
icon:
|
|
978
|
+
icon: d,
|
|
979
979
|
type: v,
|
|
980
|
-
iconSize:
|
|
981
|
-
iconPrefix:
|
|
980
|
+
iconSize: b,
|
|
981
|
+
iconPrefix: B,
|
|
982
982
|
loadingType: k
|
|
983
983
|
} = e;
|
|
984
|
-
if (
|
|
984
|
+
if (d || v === "success" || v === "fail")
|
|
985
985
|
return h(Ge, {
|
|
986
|
-
name:
|
|
987
|
-
size:
|
|
988
|
-
class:
|
|
989
|
-
classPrefix:
|
|
986
|
+
name: d || v,
|
|
987
|
+
size: b,
|
|
988
|
+
class: _("icon"),
|
|
989
|
+
classPrefix: B
|
|
990
990
|
}, null);
|
|
991
991
|
if (v === "loading")
|
|
992
992
|
return h(qe, {
|
|
993
|
-
class:
|
|
994
|
-
size:
|
|
993
|
+
class: _("loading"),
|
|
994
|
+
size: b,
|
|
995
995
|
type: k
|
|
996
996
|
}, null);
|
|
997
997
|
}, g = () => {
|
|
998
998
|
const {
|
|
999
|
-
type:
|
|
999
|
+
type: d,
|
|
1000
1000
|
message: v
|
|
1001
1001
|
} = e;
|
|
1002
1002
|
if (o.message)
|
|
1003
1003
|
return h("div", {
|
|
1004
|
-
class:
|
|
1004
|
+
class: _("text")
|
|
1005
1005
|
}, [o.message()]);
|
|
1006
|
-
if (
|
|
1007
|
-
return
|
|
1006
|
+
if (D(v) && v !== "")
|
|
1007
|
+
return d === "html" ? h("div", {
|
|
1008
1008
|
key: 0,
|
|
1009
|
-
class:
|
|
1009
|
+
class: _("text"),
|
|
1010
1010
|
innerHTML: String(v)
|
|
1011
1011
|
}, null) : h("div", {
|
|
1012
|
-
class:
|
|
1012
|
+
class: _("text")
|
|
1013
1013
|
}, [v]);
|
|
1014
1014
|
};
|
|
1015
|
-
return
|
|
1016
|
-
|
|
1017
|
-
|
|
1015
|
+
return E(() => [e.show, e.forbidClick], u), E(() => [e.show, e.type, e.message, e.duration], () => {
|
|
1016
|
+
r(), e.show && e.duration > 0 && (n = setTimeout(() => {
|
|
1017
|
+
i(!1);
|
|
1018
1018
|
}, e.duration));
|
|
1019
|
-
}),
|
|
1020
|
-
class: [
|
|
1019
|
+
}), Z(u), De(u), () => h(xn, H({
|
|
1020
|
+
class: [_([e.position, e.wordBreak === "normal" ? "break-normal" : e.wordBreak, {
|
|
1021
1021
|
[e.type]: !e.icon
|
|
1022
1022
|
}]), e.className],
|
|
1023
1023
|
lockScroll: !1,
|
|
1024
|
-
onClick:
|
|
1025
|
-
onClosed:
|
|
1026
|
-
"onUpdate:show":
|
|
1027
|
-
},
|
|
1028
|
-
default: () => [
|
|
1024
|
+
onClick: l,
|
|
1025
|
+
onClosed: r,
|
|
1026
|
+
"onUpdate:show": i
|
|
1027
|
+
}, Bt(e, kn)), {
|
|
1028
|
+
default: () => [f(), g()]
|
|
1029
1029
|
});
|
|
1030
1030
|
}
|
|
1031
1031
|
});
|
|
1032
|
-
function
|
|
1032
|
+
function On() {
|
|
1033
1033
|
const e = ge({
|
|
1034
1034
|
show: !1
|
|
1035
|
-
}),
|
|
1036
|
-
e.show =
|
|
1037
|
-
}, o = (
|
|
1038
|
-
T(e,
|
|
1039
|
-
},
|
|
1040
|
-
return We({ open: o, close:
|
|
1035
|
+
}), t = (s) => {
|
|
1036
|
+
e.show = s;
|
|
1037
|
+
}, o = (s) => {
|
|
1038
|
+
T(e, s, { transitionAppear: !0 }), t(!0);
|
|
1039
|
+
}, n = () => t(!1);
|
|
1040
|
+
return We({ open: o, close: n, toggle: t }), {
|
|
1041
1041
|
open: o,
|
|
1042
|
-
close:
|
|
1042
|
+
close: n,
|
|
1043
1043
|
state: e,
|
|
1044
|
-
toggle:
|
|
1044
|
+
toggle: t
|
|
1045
1045
|
};
|
|
1046
1046
|
}
|
|
1047
|
-
function
|
|
1048
|
-
const
|
|
1047
|
+
function $n(e) {
|
|
1048
|
+
const t = it(e), o = document.createElement("div");
|
|
1049
1049
|
return document.body.appendChild(o), {
|
|
1050
|
-
instance:
|
|
1050
|
+
instance: t.mount(o),
|
|
1051
1051
|
unmount() {
|
|
1052
|
-
|
|
1052
|
+
t.unmount(), document.body.removeChild(o);
|
|
1053
1053
|
}
|
|
1054
1054
|
};
|
|
1055
1055
|
}
|
|
1056
|
-
const
|
|
1056
|
+
const Tn = {
|
|
1057
1057
|
icon: "",
|
|
1058
1058
|
type: "text",
|
|
1059
1059
|
message: "",
|
|
@@ -1074,170 +1074,170 @@ const In = {
|
|
|
1074
1074
|
closeOnClick: !1,
|
|
1075
1075
|
closeOnClickOverlay: !1
|
|
1076
1076
|
};
|
|
1077
|
-
let
|
|
1078
|
-
const
|
|
1079
|
-
function
|
|
1080
|
-
return
|
|
1077
|
+
let ee = [], zn = !1, ze = T({}, Tn);
|
|
1078
|
+
const Dn = /* @__PURE__ */ new Map();
|
|
1079
|
+
function An(e) {
|
|
1080
|
+
return ae(e) ? e : {
|
|
1081
1081
|
message: e
|
|
1082
1082
|
};
|
|
1083
1083
|
}
|
|
1084
|
-
function
|
|
1084
|
+
function Ln() {
|
|
1085
1085
|
const {
|
|
1086
1086
|
instance: e
|
|
1087
|
-
} =
|
|
1087
|
+
} = $n({
|
|
1088
1088
|
setup() {
|
|
1089
|
-
const
|
|
1089
|
+
const t = y(""), {
|
|
1090
1090
|
open: o,
|
|
1091
|
-
state:
|
|
1092
|
-
close:
|
|
1093
|
-
toggle:
|
|
1094
|
-
} =
|
|
1095
|
-
},
|
|
1096
|
-
onClosed:
|
|
1097
|
-
"onUpdate:show":
|
|
1091
|
+
state: n,
|
|
1092
|
+
close: s,
|
|
1093
|
+
toggle: u
|
|
1094
|
+
} = On(), i = () => {
|
|
1095
|
+
}, l = () => h(et, H(n, {
|
|
1096
|
+
onClosed: i,
|
|
1097
|
+
"onUpdate:show": u
|
|
1098
1098
|
}), null);
|
|
1099
|
-
return
|
|
1100
|
-
|
|
1101
|
-
}),
|
|
1099
|
+
return E(t, (r) => {
|
|
1100
|
+
n.message = r;
|
|
1101
|
+
}), pe().render = l, {
|
|
1102
1102
|
open: o,
|
|
1103
|
-
close:
|
|
1104
|
-
message:
|
|
1103
|
+
close: s,
|
|
1104
|
+
message: t
|
|
1105
1105
|
};
|
|
1106
1106
|
}
|
|
1107
1107
|
});
|
|
1108
1108
|
return e;
|
|
1109
1109
|
}
|
|
1110
|
-
function
|
|
1111
|
-
if (!
|
|
1112
|
-
const e =
|
|
1113
|
-
|
|
1110
|
+
function Fn() {
|
|
1111
|
+
if (!ee.length || zn) {
|
|
1112
|
+
const e = Ln();
|
|
1113
|
+
ee.push(e);
|
|
1114
1114
|
}
|
|
1115
|
-
return
|
|
1115
|
+
return ee[ee.length - 1];
|
|
1116
1116
|
}
|
|
1117
|
-
function
|
|
1118
|
-
if (!
|
|
1117
|
+
function Vn(e = {}) {
|
|
1118
|
+
if (!ye)
|
|
1119
1119
|
return {};
|
|
1120
|
-
const
|
|
1121
|
-
return
|
|
1120
|
+
const t = Fn(), o = An(e);
|
|
1121
|
+
return t.open(T({}, ze, Dn.get(o.type || ze.type), o)), t;
|
|
1122
1122
|
}
|
|
1123
|
-
|
|
1124
|
-
const [
|
|
1123
|
+
V(et);
|
|
1124
|
+
const [_n, U, Nn] = A("pull-refresh"), tt = 50, Rn = ["pulling", "loosing", "success"], jn = {
|
|
1125
1125
|
disabled: Boolean,
|
|
1126
1126
|
modelValue: Boolean,
|
|
1127
|
-
headHeight:
|
|
1127
|
+
headHeight: re(tt),
|
|
1128
1128
|
successText: String,
|
|
1129
1129
|
pullingText: String,
|
|
1130
1130
|
loosingText: String,
|
|
1131
1131
|
loadingText: String,
|
|
1132
|
-
pullDistance:
|
|
1133
|
-
successDuration:
|
|
1134
|
-
animationDuration:
|
|
1132
|
+
pullDistance: w,
|
|
1133
|
+
successDuration: re(500),
|
|
1134
|
+
animationDuration: re(300)
|
|
1135
1135
|
};
|
|
1136
|
-
var
|
|
1137
|
-
name:
|
|
1138
|
-
props:
|
|
1136
|
+
var Hn = C({
|
|
1137
|
+
name: _n,
|
|
1138
|
+
props: jn,
|
|
1139
1139
|
emits: ["change", "refresh", "update:modelValue"],
|
|
1140
1140
|
setup(e, {
|
|
1141
|
-
emit:
|
|
1141
|
+
emit: t,
|
|
1142
1142
|
slots: o
|
|
1143
1143
|
}) {
|
|
1144
|
-
let
|
|
1145
|
-
const
|
|
1144
|
+
let n;
|
|
1145
|
+
const s = y(), u = y(), i = $t(s), l = ge({
|
|
1146
1146
|
status: "normal",
|
|
1147
1147
|
distance: 0,
|
|
1148
1148
|
duration: 0
|
|
1149
|
-
}),
|
|
1149
|
+
}), r = Je(), f = () => {
|
|
1150
1150
|
if (e.headHeight !== tt)
|
|
1151
1151
|
return {
|
|
1152
1152
|
height: `${e.headHeight}px`
|
|
1153
1153
|
};
|
|
1154
|
-
}, g = () =>
|
|
1155
|
-
const
|
|
1156
|
-
return
|
|
1157
|
-
}, v = (
|
|
1158
|
-
const
|
|
1159
|
-
|
|
1160
|
-
status:
|
|
1161
|
-
distance:
|
|
1154
|
+
}, g = () => l.status !== "loading" && l.status !== "success" && !e.disabled, d = (m) => {
|
|
1155
|
+
const S = +(e.pullDistance || e.headHeight);
|
|
1156
|
+
return m > S && (m < S * 2 ? m = S + (m - S) / 2 : m = S * 1.5 + (m - S * 2) / 4), Math.round(m);
|
|
1157
|
+
}, v = (m, S) => {
|
|
1158
|
+
const p = +(e.pullDistance || e.headHeight);
|
|
1159
|
+
l.distance = m, S ? l.status = "loading" : m === 0 ? l.status = "normal" : m < p ? l.status = "pulling" : l.status = "loosing", t("change", {
|
|
1160
|
+
status: l.status,
|
|
1161
|
+
distance: m
|
|
1162
1162
|
});
|
|
1163
|
-
},
|
|
1163
|
+
}, b = () => {
|
|
1164
1164
|
const {
|
|
1165
|
-
status:
|
|
1166
|
-
} =
|
|
1167
|
-
return
|
|
1168
|
-
},
|
|
1165
|
+
status: m
|
|
1166
|
+
} = l;
|
|
1167
|
+
return m === "normal" ? "" : e[`${m}Text`] || Nn(m);
|
|
1168
|
+
}, B = () => {
|
|
1169
1169
|
const {
|
|
1170
|
-
status:
|
|
1171
|
-
distance:
|
|
1172
|
-
} =
|
|
1173
|
-
if (o[
|
|
1174
|
-
return o[
|
|
1175
|
-
distance:
|
|
1170
|
+
status: m,
|
|
1171
|
+
distance: S
|
|
1172
|
+
} = l;
|
|
1173
|
+
if (o[m])
|
|
1174
|
+
return o[m]({
|
|
1175
|
+
distance: S
|
|
1176
1176
|
});
|
|
1177
|
-
const
|
|
1178
|
-
return
|
|
1179
|
-
class:
|
|
1180
|
-
}, [
|
|
1181
|
-
class:
|
|
1177
|
+
const p = [];
|
|
1178
|
+
return Rn.includes(m) && p.push(h("div", {
|
|
1179
|
+
class: U("text")
|
|
1180
|
+
}, [b()])), m === "loading" && p.push(h(qe, {
|
|
1181
|
+
class: U("loading")
|
|
1182
1182
|
}, {
|
|
1183
|
-
default:
|
|
1184
|
-
})),
|
|
1183
|
+
default: b
|
|
1184
|
+
})), p;
|
|
1185
1185
|
}, k = () => {
|
|
1186
|
-
|
|
1186
|
+
l.status = "success", setTimeout(() => {
|
|
1187
1187
|
v(0);
|
|
1188
1188
|
}, +e.successDuration);
|
|
1189
|
-
},
|
|
1190
|
-
|
|
1191
|
-
},
|
|
1192
|
-
g() &&
|
|
1193
|
-
},
|
|
1189
|
+
}, I = (m) => {
|
|
1190
|
+
n = Tt(i.value) === 0, n && (l.duration = 0, r.start(m));
|
|
1191
|
+
}, se = (m) => {
|
|
1192
|
+
g() && I(m);
|
|
1193
|
+
}, ue = (m) => {
|
|
1194
1194
|
if (g()) {
|
|
1195
|
-
|
|
1195
|
+
n || I(m);
|
|
1196
1196
|
const {
|
|
1197
|
-
deltaY:
|
|
1198
|
-
} =
|
|
1199
|
-
|
|
1197
|
+
deltaY: S
|
|
1198
|
+
} = r;
|
|
1199
|
+
r.move(m), n && S.value >= 0 && r.isVertical() && (we(m), v(d(S.value)));
|
|
1200
1200
|
}
|
|
1201
|
-
},
|
|
1202
|
-
|
|
1201
|
+
}, G = () => {
|
|
1202
|
+
n && r.deltaY.value && g() && (l.duration = +e.animationDuration, l.status === "loosing" ? (v(+e.headHeight, !0), t("update:modelValue", !0), me(() => t("refresh"))) : v(0));
|
|
1203
1203
|
};
|
|
1204
|
-
return
|
|
1205
|
-
|
|
1206
|
-
}),
|
|
1207
|
-
target:
|
|
1204
|
+
return E(() => e.modelValue, (m) => {
|
|
1205
|
+
l.duration = +e.animationDuration, m ? v(+e.headHeight, !0) : o.success || e.successText ? k() : v(0, !1);
|
|
1206
|
+
}), Se("touchmove", ue, {
|
|
1207
|
+
target: u
|
|
1208
1208
|
}), () => {
|
|
1209
|
-
var
|
|
1210
|
-
const
|
|
1211
|
-
transitionDuration: `${
|
|
1212
|
-
transform:
|
|
1209
|
+
var m;
|
|
1210
|
+
const S = {
|
|
1211
|
+
transitionDuration: `${l.duration}ms`,
|
|
1212
|
+
transform: l.distance ? `translate3d(0,${l.distance}px, 0)` : ""
|
|
1213
1213
|
};
|
|
1214
1214
|
return h("div", {
|
|
1215
|
-
ref: c,
|
|
1216
|
-
class: Y()
|
|
1217
|
-
}, [h("div", {
|
|
1218
1215
|
ref: s,
|
|
1219
|
-
class:
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1216
|
+
class: U()
|
|
1217
|
+
}, [h("div", {
|
|
1218
|
+
ref: u,
|
|
1219
|
+
class: U("track"),
|
|
1220
|
+
style: S,
|
|
1221
|
+
onTouchstartPassive: se,
|
|
1222
|
+
onTouchend: G,
|
|
1223
|
+
onTouchcancel: G
|
|
1224
1224
|
}, [h("div", {
|
|
1225
|
-
class:
|
|
1226
|
-
style:
|
|
1227
|
-
}, [
|
|
1225
|
+
class: U("head"),
|
|
1226
|
+
style: f()
|
|
1227
|
+
}, [B()]), (m = o.default) == null ? void 0 : m.call(o)])]);
|
|
1228
1228
|
};
|
|
1229
1229
|
}
|
|
1230
1230
|
});
|
|
1231
|
-
const
|
|
1231
|
+
const Mn = V(Hn), Yn = {
|
|
1232
1232
|
key: 0,
|
|
1233
1233
|
class: "mx-app-page-header"
|
|
1234
|
-
},
|
|
1234
|
+
}, Un = {
|
|
1235
1235
|
key: 0,
|
|
1236
1236
|
class: "mx-app-page-header-left"
|
|
1237
|
-
},
|
|
1237
|
+
}, Wn = { class: "mx-app-page-header-center" }, Kn = { class: "mx-app-page-title" }, Xn = { class: "mx-app-page-header-right" }, Zn = {
|
|
1238
1238
|
key: 1,
|
|
1239
1239
|
class: "mx-app-page-search"
|
|
1240
|
-
},
|
|
1240
|
+
}, Gn = { class: "search-content" }, qn = /* @__PURE__ */ C({
|
|
1241
1241
|
__name: "index",
|
|
1242
1242
|
props: {
|
|
1243
1243
|
title: { default: "" },
|
|
@@ -1254,155 +1254,265 @@ const jn = F(Rn), Hn = {
|
|
|
1254
1254
|
disabled: { type: Boolean }
|
|
1255
1255
|
},
|
|
1256
1256
|
emits: ["back", "refresh"],
|
|
1257
|
-
setup(e, { emit:
|
|
1258
|
-
const o =
|
|
1257
|
+
setup(e, { emit: t }) {
|
|
1258
|
+
const o = t, n = y(0), s = y(!1), u = () => {
|
|
1259
1259
|
setTimeout(() => {
|
|
1260
|
-
|
|
1260
|
+
Vn("刷新成功"), s.value = !1, n.value++;
|
|
1261
1261
|
}, 1e3);
|
|
1262
|
-
},
|
|
1262
|
+
}, i = y(), l = () => {
|
|
1263
1263
|
o("back");
|
|
1264
1264
|
};
|
|
1265
|
-
return (
|
|
1265
|
+
return (r, f) => (O(), N("div", {
|
|
1266
1266
|
id: "id",
|
|
1267
|
-
class:
|
|
1267
|
+
class: K([
|
|
1268
1268
|
"mx-app-page",
|
|
1269
1269
|
{
|
|
1270
1270
|
"mx-app-page-with-header": e.showHeader
|
|
1271
1271
|
}
|
|
1272
1272
|
])
|
|
1273
1273
|
}, [
|
|
1274
|
-
e.showHeader ? (
|
|
1275
|
-
e.showBack ? (
|
|
1276
|
-
|
|
1274
|
+
e.showHeader ? (O(), N("header", Yn, [
|
|
1275
|
+
e.showBack ? (O(), N("div", Un, [
|
|
1276
|
+
a("div", {
|
|
1277
1277
|
class: "mx-app-page-back",
|
|
1278
|
-
onClick:
|
|
1279
|
-
}, [...
|
|
1280
|
-
|
|
1278
|
+
onClick: l
|
|
1279
|
+
}, [...f[1] || (f[1] = [
|
|
1280
|
+
a("i", { class: "iconfont icon-fanhui1 icon" }, null, -1)
|
|
1281
1281
|
])])
|
|
1282
|
-
])) :
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1282
|
+
])) : ie("", !0),
|
|
1283
|
+
a("div", Wn, [
|
|
1284
|
+
R(r.$slots, "title", {}, () => [
|
|
1285
|
+
a("span", Kn, c(e.title), 1)
|
|
1286
1286
|
], !0)
|
|
1287
1287
|
]),
|
|
1288
|
-
|
|
1289
|
-
|
|
1288
|
+
a("div", Xn, [
|
|
1289
|
+
R(r.$slots, "header-right", {}, void 0, !0)
|
|
1290
1290
|
])
|
|
1291
|
-
])) :
|
|
1292
|
-
e.showSearch ? (
|
|
1293
|
-
|
|
1294
|
-
|
|
1291
|
+
])) : ie("", !0),
|
|
1292
|
+
e.showSearch ? (O(), N("div", Zn, [
|
|
1293
|
+
a("div", Gn, [
|
|
1294
|
+
R(r.$slots, "search", {}, void 0, !0)
|
|
1295
1295
|
]),
|
|
1296
|
-
|
|
1297
|
-
])) :
|
|
1298
|
-
|
|
1299
|
-
class:
|
|
1296
|
+
f[2] || (f[2] = a("i", { class: "iconfont icon-sousuo icon" }, null, -1))
|
|
1297
|
+
])) : ie("", !0),
|
|
1298
|
+
a("div", {
|
|
1299
|
+
class: K(["mx-app-page-content-wrapper", {
|
|
1300
1300
|
"has-search": e.showSearch,
|
|
1301
1301
|
"has-header": e.showHeader
|
|
1302
1302
|
}]),
|
|
1303
1303
|
ref_key: "contentWrapperRef",
|
|
1304
|
-
ref:
|
|
1304
|
+
ref: i
|
|
1305
1305
|
}, [
|
|
1306
|
-
h(
|
|
1307
|
-
modelValue:
|
|
1308
|
-
"onUpdate:modelValue":
|
|
1309
|
-
onRefresh:
|
|
1306
|
+
h(j(Mn), {
|
|
1307
|
+
modelValue: s.value,
|
|
1308
|
+
"onUpdate:modelValue": f[0] || (f[0] = (g) => s.value = g),
|
|
1309
|
+
onRefresh: u
|
|
1310
1310
|
}, {
|
|
1311
|
-
default:
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1311
|
+
default: te(() => [
|
|
1312
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1313
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1314
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1315
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1316
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1317
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1318
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1319
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1320
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1321
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1322
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1323
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1324
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1325
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1326
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1327
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1328
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1329
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1330
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1331
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1332
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1333
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1334
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1335
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1336
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1337
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1338
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1339
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1340
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1341
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1342
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1343
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1344
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1345
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1346
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1347
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1348
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1349
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1350
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1351
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1352
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1353
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1354
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1355
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1356
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1357
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1358
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1359
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1360
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1361
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1362
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1363
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1364
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1365
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1366
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1367
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1368
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1369
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1370
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1371
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1372
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1373
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1374
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1375
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1376
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1377
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1378
|
+
a("p", null, "刷新次数: " + c(n.value), 1),
|
|
1379
|
+
a("p", null, "刷新次数: " + c(n.value), 1)
|
|
1380
1380
|
]),
|
|
1381
1381
|
_: 1
|
|
1382
1382
|
}, 8, ["modelValue"])
|
|
1383
1383
|
], 2)
|
|
1384
1384
|
], 2));
|
|
1385
1385
|
}
|
|
1386
|
-
}),
|
|
1386
|
+
}), Jn = /* @__PURE__ */ F(qn, [["__scopeId", "data-v-4ad76a0d"]]), Qn = ["innerHTML"], eo = /* @__PURE__ */ C({
|
|
1387
|
+
__name: "svg",
|
|
1388
|
+
props: {
|
|
1389
|
+
// 图标类名
|
|
1390
|
+
icon: { type: String, default: "" },
|
|
1391
|
+
// 图标大小
|
|
1392
|
+
size: { type: String, default: "" },
|
|
1393
|
+
/**
|
|
1394
|
+
* 是否为线图标
|
|
1395
|
+
*/
|
|
1396
|
+
isLineIcon: { type: Boolean, default: !1 },
|
|
1397
|
+
// 图标地址
|
|
1398
|
+
iconPath: { type: String, default: "" },
|
|
1399
|
+
// 支持通过 color 修改 svg 的填充/描边颜色
|
|
1400
|
+
color: { type: String, default: "" }
|
|
1401
|
+
},
|
|
1402
|
+
setup(e) {
|
|
1403
|
+
const t = e, o = y(""), n = $(() => {
|
|
1404
|
+
if (!t.icon) return "";
|
|
1405
|
+
const i = t.isLineIcon ? "line" : "mine";
|
|
1406
|
+
return `${t.iconPath}${i}/${t.icon}.svg`;
|
|
1407
|
+
});
|
|
1408
|
+
E([() => t.icon, () => t.isLineIcon, () => t.iconPath], s), E(() => t.color, u), Z(() => {
|
|
1409
|
+
s();
|
|
1410
|
+
});
|
|
1411
|
+
async function s() {
|
|
1412
|
+
if (!t.icon) {
|
|
1413
|
+
o.value = "";
|
|
1414
|
+
return;
|
|
1415
|
+
}
|
|
1416
|
+
const i = n.value;
|
|
1417
|
+
try {
|
|
1418
|
+
const l = await fetch(i);
|
|
1419
|
+
if (!l.ok) {
|
|
1420
|
+
o.value = "";
|
|
1421
|
+
return;
|
|
1422
|
+
}
|
|
1423
|
+
const r = await l.text(), d = new DOMParser().parseFromString(r, "image/svg+xml").querySelector("svg");
|
|
1424
|
+
if (!d) {
|
|
1425
|
+
o.value = r;
|
|
1426
|
+
return;
|
|
1427
|
+
}
|
|
1428
|
+
d.querySelectorAll("[fill]").forEach((b) => b.removeAttribute("fill")), d.setAttribute("fill", "currentColor"), d.removeAttribute("width"), d.removeAttribute("height");
|
|
1429
|
+
const v = new XMLSerializer();
|
|
1430
|
+
o.value = v.serializeToString(d);
|
|
1431
|
+
} catch {
|
|
1432
|
+
o.value = "";
|
|
1433
|
+
}
|
|
1434
|
+
}
|
|
1435
|
+
function u() {
|
|
1436
|
+
}
|
|
1437
|
+
return (i, l) => (O(), N("span", {
|
|
1438
|
+
class: "custom_icon",
|
|
1439
|
+
style: X({ width: t.size, height: t.size, color: t.color }),
|
|
1440
|
+
innerHTML: o.value
|
|
1441
|
+
}, null, 12, Qn));
|
|
1442
|
+
}
|
|
1443
|
+
}), to = /* @__PURE__ */ F(eo, [["__scopeId", "data-v-293c5ff4"]]), no = /* @__PURE__ */ C({
|
|
1444
|
+
__name: "bg",
|
|
1445
|
+
props: {
|
|
1446
|
+
// 图标类名
|
|
1447
|
+
icon: { type: String, default: "" },
|
|
1448
|
+
// 图标大小
|
|
1449
|
+
size: { type: String, default: "" },
|
|
1450
|
+
/**
|
|
1451
|
+
* 是否为线图标
|
|
1452
|
+
*/
|
|
1453
|
+
isLineIcon: { type: Boolean, default: !1 },
|
|
1454
|
+
// 图标地址
|
|
1455
|
+
iconPath: { type: String, default: "" }
|
|
1456
|
+
},
|
|
1457
|
+
setup(e) {
|
|
1458
|
+
const t = e, o = $(() => {
|
|
1459
|
+
if (!t.icon) return "";
|
|
1460
|
+
const n = t.isLineIcon ? "line" : "mine";
|
|
1461
|
+
return `${t.iconPath}${n}/${t.icon}.svg`;
|
|
1462
|
+
});
|
|
1463
|
+
return (n, s) => (O(), N("i", {
|
|
1464
|
+
class: "icon custom_icon",
|
|
1465
|
+
style: X({
|
|
1466
|
+
width: t.size,
|
|
1467
|
+
height: t.size,
|
|
1468
|
+
backgroundImage: "url(" + o.value + ")"
|
|
1469
|
+
})
|
|
1470
|
+
}, null, 4));
|
|
1471
|
+
}
|
|
1472
|
+
}), oo = /* @__PURE__ */ F(no, [["__scopeId", "data-v-f5089bc1"]]), lo = /* @__PURE__ */ C({
|
|
1473
|
+
__name: "index",
|
|
1474
|
+
props: {
|
|
1475
|
+
// 图标类名
|
|
1476
|
+
icon: { type: String, default: "" },
|
|
1477
|
+
// 图标大小
|
|
1478
|
+
size: { type: String, default: "32px" },
|
|
1479
|
+
/**
|
|
1480
|
+
* 是否为线图标
|
|
1481
|
+
*/
|
|
1482
|
+
isLineIcon: { type: Boolean, default: !1 },
|
|
1483
|
+
// 图标地址
|
|
1484
|
+
iconPath: { type: String, default: "http://8.155.35.80:9000/lv-test/icons/" },
|
|
1485
|
+
// 支持通过 color 修改 svg 的填充/描边颜色
|
|
1486
|
+
color: { type: String, default: "" },
|
|
1487
|
+
// 是否为背景图标
|
|
1488
|
+
isBgIcon: { type: Boolean, default: !1 }
|
|
1489
|
+
},
|
|
1490
|
+
setup(e) {
|
|
1491
|
+
const t = e, o = $(() => t.isBgIcon || !t.isLineIcon ? oo : to);
|
|
1492
|
+
return (n, s) => (O(), oe(rt(o.value), dt(ft(t)), null, 16));
|
|
1493
|
+
}
|
|
1494
|
+
}), ao = /* @__PURE__ */ F(lo, [["__scopeId", "data-v-926a7644"]]), io = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1387
1495
|
__proto__: null
|
|
1388
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1389
|
-
Button:
|
|
1390
|
-
Input:
|
|
1391
|
-
Card:
|
|
1392
|
-
AppPage:
|
|
1393
|
-
|
|
1496
|
+
}, Symbol.toStringTag, { value: "Module" })), so = {
|
|
1497
|
+
Button: pt,
|
|
1498
|
+
Input: bt,
|
|
1499
|
+
Card: wt,
|
|
1500
|
+
AppPage: Jn,
|
|
1501
|
+
CustomIcon: ao
|
|
1502
|
+
}, ro = {
|
|
1394
1503
|
install: (e) => {
|
|
1395
|
-
Object.values(
|
|
1396
|
-
e.component(
|
|
1504
|
+
Object.values(so).forEach((t) => {
|
|
1505
|
+
e.component(t.name, t);
|
|
1397
1506
|
});
|
|
1398
1507
|
}
|
|
1399
1508
|
};
|
|
1400
1509
|
export {
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1510
|
+
Jn as AppPage,
|
|
1511
|
+
pt as Button,
|
|
1512
|
+
wt as Card,
|
|
1513
|
+
ao as CustomIcon,
|
|
1514
|
+
bt as Input,
|
|
1515
|
+
so as components,
|
|
1516
|
+
ro as default,
|
|
1517
|
+
io as types
|
|
1408
1518
|
};
|