@mc-markets/ui 1.0.81 → 1.0.82
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/components/Tag/Tag.vue.d.ts +0 -2
- package/dist/components/Tag/Tag.vue.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +296 -291
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/packages/components/Pagination/Pagination.vue +10 -3
- package/packages/components/Tag/Tag.vue +98 -19
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var ue = Object.defineProperty, me = Object.defineProperties;
|
|
2
|
-
var
|
|
2
|
+
var de = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var R = Object.getOwnPropertySymbols;
|
|
4
4
|
var X = Object.prototype.hasOwnProperty, Y = Object.prototype.propertyIsEnumerable;
|
|
5
5
|
var Q = (e, t, n) => t in e ? ue(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, k = (e, t) => {
|
|
@@ -9,7 +9,7 @@ var Q = (e, t, n) => t in e ? ue(e, t, { enumerable: !0, configurable: !0, writa
|
|
|
9
9
|
for (var n of R(t))
|
|
10
10
|
Y.call(t, n) && Q(e, n, t[n]);
|
|
11
11
|
return e;
|
|
12
|
-
},
|
|
12
|
+
}, w = (e, t) => me(e, de(t));
|
|
13
13
|
var V = (e, t) => {
|
|
14
14
|
var n = {};
|
|
15
15
|
for (var s in e)
|
|
@@ -19,7 +19,7 @@ var V = (e, t) => {
|
|
|
19
19
|
t.indexOf(s) < 0 && Y.call(e, s) && (n[s] = e[s]);
|
|
20
20
|
return n;
|
|
21
21
|
};
|
|
22
|
-
var
|
|
22
|
+
var W = (e, t, n) => new Promise((s, o) => {
|
|
23
23
|
var a = (d) => {
|
|
24
24
|
try {
|
|
25
25
|
i(n.next(d));
|
|
@@ -36,8 +36,8 @@ var H = (e, t, n) => new Promise((s, o) => {
|
|
|
36
36
|
i((n = n.apply(e, t)).next());
|
|
37
37
|
});
|
|
38
38
|
import * as ee from "element-plus";
|
|
39
|
-
import { computed as
|
|
40
|
-
import { ElButton as
|
|
39
|
+
import { computed as $, createElementBlock as u, openBlock as l, mergeProps as v, renderSlot as m, createBlock as f, createSlots as b, renderList as _, withCtx as p, ref as B, useAttrs as j, unref as T, normalizeProps as D, guardReactiveProps as G, createCommentVNode as S, createElementVNode as y, Fragment as U, normalizeClass as P, mergeModels as K, useModel as pe, createVNode as A, Teleport as te, TransitionGroup as se, resolveDynamicComponent as ne, toDisplayString as N, useSlots as fe, watch as z, normalizeStyle as oe, createTextVNode as _e, provide as ge, onMounted as ae, nextTick as be, withDirectives as ve, vShow as he, inject as ye, onUnmounted as $e } from "vue";
|
|
40
|
+
import { ElButton as Me, ElInput as Ce, ElForm as ke, ElFormItem as Se, ElTooltip as Te, ElSelect as Ie, ElOption as we, ElOptionGroup as Be, ElPagination as Oe, ElRadio as Ee, ElRadioGroup as Pe, ElRadioButton as Ne, ElSwitch as Ae, ElTag as je, ElAlert as xe, ElDialog as Le, ElNotification as Re, ElDatePicker as Ve, ElEmpty as ze, ElTable as Fe, ElTableColumn as De } from "element-plus/es";
|
|
41
41
|
import "element-plus/es/components/base/style/index";
|
|
42
42
|
import "element-plus/es/components/button/style/index";
|
|
43
43
|
import "element-plus/es/components/input/style/index";
|
|
@@ -105,34 +105,34 @@ const O = (e, t) => {
|
|
|
105
105
|
},
|
|
106
106
|
emits: ["click"],
|
|
107
107
|
setup(e, { emit: t }) {
|
|
108
|
-
const n = e, s = t, o =
|
|
108
|
+
const n = e, s = t, o = $(() => {
|
|
109
109
|
const i = ["iconfont"];
|
|
110
110
|
return n.name && i.push(`${n.prefix}-${n.name}`), n.spin && i.push("icon-spin"), n.pulse && i.push("icon-pulse"), n.flip && i.push(`icon-flip-${n.flip}`), i;
|
|
111
|
-
}), a =
|
|
111
|
+
}), a = $(() => {
|
|
112
112
|
const i = {};
|
|
113
113
|
return n.size && (typeof n.size == "number" ? i.fontSize = `${n.size}px` : i.fontSize = n.size), n.color && (i.color = n.color), n.rotate !== 0 && (i.transform = `rotate(${n.rotate}deg)`), i;
|
|
114
114
|
}), r = (i) => {
|
|
115
115
|
s("click", i);
|
|
116
116
|
};
|
|
117
|
-
return (i, d) => (l(),
|
|
117
|
+
return (i, d) => (l(), u("i", v({
|
|
118
118
|
class: o.value,
|
|
119
119
|
style: a.value
|
|
120
120
|
}, i.$attrs, { onClick: r }), [
|
|
121
|
-
|
|
121
|
+
m(i.$slots, "default", {}, void 0, !0)
|
|
122
122
|
], 16));
|
|
123
123
|
}
|
|
124
|
-
}),
|
|
124
|
+
}), Z = /* @__PURE__ */ O(Ge, [["__scopeId", "data-v-90f84c9e"]]), Ue = /* @__PURE__ */ Object.assign({
|
|
125
125
|
name: "MButton"
|
|
126
126
|
}, {
|
|
127
127
|
__name: "Button",
|
|
128
128
|
setup(e) {
|
|
129
129
|
return (t, n) => {
|
|
130
|
-
const s =
|
|
130
|
+
const s = Me;
|
|
131
131
|
return l(), f(s, v(t.$attrs, { class: "m-button" }), b({ _: 2 }, [
|
|
132
|
-
|
|
132
|
+
_(t.$slots, (o, a) => ({
|
|
133
133
|
name: a,
|
|
134
134
|
fn: p(() => [
|
|
135
|
-
|
|
135
|
+
m(t.$slots, a, {}, void 0, !0)
|
|
136
136
|
])
|
|
137
137
|
}))
|
|
138
138
|
]), 1040);
|
|
@@ -148,10 +148,10 @@ const O = (e, t) => {
|
|
|
148
148
|
return l(), f(s, v(t.$attrs, {
|
|
149
149
|
class: ["m-input", { solid: t.$attrs.styleType === "solid" }]
|
|
150
150
|
}), b({ _: 2 }, [
|
|
151
|
-
|
|
151
|
+
_(t.$slots, (o, a) => ({
|
|
152
152
|
name: a,
|
|
153
153
|
fn: p(() => [
|
|
154
|
-
|
|
154
|
+
m(t.$slots, a)
|
|
155
155
|
])
|
|
156
156
|
}))
|
|
157
157
|
]), 1040, ["class"]);
|
|
@@ -190,10 +190,10 @@ const O = (e, t) => {
|
|
|
190
190
|
ref_key: "formRef",
|
|
191
191
|
ref: n
|
|
192
192
|
}, s.$attrs, { class: "m-form" }), b({ _: 2 }, [
|
|
193
|
-
|
|
193
|
+
_(s.$slots, (r, i) => ({
|
|
194
194
|
name: i,
|
|
195
195
|
fn: p(() => [
|
|
196
|
-
|
|
196
|
+
m(s.$slots, i)
|
|
197
197
|
])
|
|
198
198
|
}))
|
|
199
199
|
]), 1040);
|
|
@@ -207,10 +207,10 @@ const O = (e, t) => {
|
|
|
207
207
|
return (t, n) => {
|
|
208
208
|
const s = Se;
|
|
209
209
|
return l(), f(s, v(t.$attrs, { class: "m-form-item" }), b({ _: 2 }, [
|
|
210
|
-
|
|
210
|
+
_(t.$slots, (o, a) => ({
|
|
211
211
|
name: a,
|
|
212
212
|
fn: p(() => [
|
|
213
|
-
|
|
213
|
+
m(t.$slots, a)
|
|
214
214
|
])
|
|
215
215
|
}))
|
|
216
216
|
]), 1040);
|
|
@@ -223,7 +223,7 @@ const O = (e, t) => {
|
|
|
223
223
|
}), n;
|
|
224
224
|
};
|
|
225
225
|
function x(e, t = "popperClass") {
|
|
226
|
-
const n = j(), s =
|
|
226
|
+
const n = j(), s = $(() => Qe(n, t)), o = $(() => Je(e, n[t]));
|
|
227
227
|
return {
|
|
228
228
|
mergedAttrs: s,
|
|
229
229
|
className: o
|
|
@@ -244,10 +244,10 @@ const Xe = /* @__PURE__ */ Object.assign({
|
|
|
244
244
|
return (s, o) => {
|
|
245
245
|
const a = Te;
|
|
246
246
|
return l(), f(a, v(T(t), { "popper-class": T(n) }), b({ _: 2 }, [
|
|
247
|
-
|
|
247
|
+
_(s.$slots, (r, i) => ({
|
|
248
248
|
name: i,
|
|
249
249
|
fn: p(() => [
|
|
250
|
-
|
|
250
|
+
m(s.$slots, i)
|
|
251
251
|
])
|
|
252
252
|
}))
|
|
253
253
|
]), 1040, ["popper-class"]);
|
|
@@ -259,15 +259,15 @@ const Xe = /* @__PURE__ */ Object.assign({
|
|
|
259
259
|
__name: "Select",
|
|
260
260
|
setup(e) {
|
|
261
261
|
return (t, n) => {
|
|
262
|
-
const s =
|
|
262
|
+
const s = Ie;
|
|
263
263
|
return l(), f(s, v({
|
|
264
264
|
class: ["m-select", { solid: t.$attrs.styleType === "solid" }],
|
|
265
265
|
"show-arrow": !1
|
|
266
266
|
}, t.$attrs), b({ _: 2 }, [
|
|
267
|
-
|
|
267
|
+
_(t.$slots, (o, a) => ({
|
|
268
268
|
name: a,
|
|
269
269
|
fn: p(() => [
|
|
270
|
-
|
|
270
|
+
m(t.$slots, a)
|
|
271
271
|
])
|
|
272
272
|
}))
|
|
273
273
|
]), 1040, ["class"]);
|
|
@@ -279,12 +279,12 @@ const Xe = /* @__PURE__ */ Object.assign({
|
|
|
279
279
|
__name: "Option",
|
|
280
280
|
setup(e) {
|
|
281
281
|
return (t, n) => {
|
|
282
|
-
const s =
|
|
282
|
+
const s = we;
|
|
283
283
|
return l(), f(s, D(G(t.$attrs)), b({ _: 2 }, [
|
|
284
|
-
|
|
284
|
+
_(t.$slots, (o, a) => ({
|
|
285
285
|
name: a,
|
|
286
286
|
fn: p(() => [
|
|
287
|
-
|
|
287
|
+
m(t.$slots, a)
|
|
288
288
|
])
|
|
289
289
|
}))
|
|
290
290
|
]), 1040);
|
|
@@ -298,10 +298,10 @@ const Xe = /* @__PURE__ */ Object.assign({
|
|
|
298
298
|
return (t, n) => {
|
|
299
299
|
const s = Be;
|
|
300
300
|
return l(), f(s, D(G(t.$attrs)), b({ _: 2 }, [
|
|
301
|
-
|
|
301
|
+
_(t.$slots, (o, a) => ({
|
|
302
302
|
name: a,
|
|
303
303
|
fn: p(() => [
|
|
304
|
-
|
|
304
|
+
m(t.$slots, a)
|
|
305
305
|
])
|
|
306
306
|
}))
|
|
307
307
|
]), 1040);
|
|
@@ -315,10 +315,10 @@ const Xe = /* @__PURE__ */ Object.assign({
|
|
|
315
315
|
return (t, n) => {
|
|
316
316
|
const s = Oe;
|
|
317
317
|
return l(), f(s, v(t.$attrs, { class: "m-pagination" }), b({ _: 2 }, [
|
|
318
|
-
|
|
318
|
+
_(t.$slots, (o, a) => ({
|
|
319
319
|
name: a,
|
|
320
320
|
fn: p(() => [
|
|
321
|
-
|
|
321
|
+
m(t.$slots, a)
|
|
322
322
|
])
|
|
323
323
|
}))
|
|
324
324
|
]), 1040);
|
|
@@ -339,10 +339,10 @@ const Xe = /* @__PURE__ */ Object.assign({
|
|
|
339
339
|
return (n, s) => {
|
|
340
340
|
const o = Ee;
|
|
341
341
|
return l(), f(o, v(T(t), { class: "m-radio" }), b({ _: 2 }, [
|
|
342
|
-
|
|
342
|
+
_(n.$slots, (a, r) => ({
|
|
343
343
|
name: r,
|
|
344
344
|
fn: p(() => [
|
|
345
|
-
|
|
345
|
+
m(n.$slots, r)
|
|
346
346
|
])
|
|
347
347
|
}))
|
|
348
348
|
]), 1040);
|
|
@@ -359,10 +359,10 @@ const Xe = /* @__PURE__ */ Object.assign({
|
|
|
359
359
|
}
|
|
360
360
|
},
|
|
361
361
|
setup(e) {
|
|
362
|
-
const t = j(), n =
|
|
362
|
+
const t = j(), n = $(() => {
|
|
363
363
|
const o = "mc-radio-group-popper";
|
|
364
364
|
return t.popperClass ? `${o} ${t.popperClass}`.trim() : o;
|
|
365
|
-
}), s =
|
|
365
|
+
}), s = $(() => {
|
|
366
366
|
const r = t, { popperClass: o } = r;
|
|
367
367
|
return V(r, ["popperClass"]);
|
|
368
368
|
});
|
|
@@ -372,10 +372,10 @@ const Xe = /* @__PURE__ */ Object.assign({
|
|
|
372
372
|
"popper-class": n.value,
|
|
373
373
|
class: "m-radio-group"
|
|
374
374
|
}), b({ _: 2 }, [
|
|
375
|
-
|
|
375
|
+
_(o.$slots, (i, d) => ({
|
|
376
376
|
name: d,
|
|
377
377
|
fn: p(() => [
|
|
378
|
-
|
|
378
|
+
m(o.$slots, d)
|
|
379
379
|
])
|
|
380
380
|
}))
|
|
381
381
|
]), 1040, ["popper-class"]);
|
|
@@ -396,10 +396,10 @@ const Xe = /* @__PURE__ */ Object.assign({
|
|
|
396
396
|
return (n, s) => {
|
|
397
397
|
const o = Ne;
|
|
398
398
|
return l(), f(o, v(T(t), { class: "m-radio-button" }), b({ _: 2 }, [
|
|
399
|
-
|
|
399
|
+
_(n.$slots, (a, r) => ({
|
|
400
400
|
name: r,
|
|
401
401
|
fn: p(() => [
|
|
402
|
-
|
|
402
|
+
m(n.$slots, r)
|
|
403
403
|
])
|
|
404
404
|
}))
|
|
405
405
|
]), 1040);
|
|
@@ -423,16 +423,19 @@ const Xe = /* @__PURE__ */ Object.assign({
|
|
|
423
423
|
"popper-class": T(n),
|
|
424
424
|
class: "m-switch"
|
|
425
425
|
}), b({ _: 2 }, [
|
|
426
|
-
|
|
426
|
+
_(s.$slots, (r, i) => ({
|
|
427
427
|
name: i,
|
|
428
428
|
fn: p(() => [
|
|
429
|
-
|
|
429
|
+
m(s.$slots, i)
|
|
430
430
|
])
|
|
431
431
|
}))
|
|
432
432
|
]), 1040, ["popper-class"]);
|
|
433
433
|
};
|
|
434
434
|
}
|
|
435
|
-
}), rt =
|
|
435
|
+
}), rt = {
|
|
436
|
+
key: 0,
|
|
437
|
+
class: "custom-spinner"
|
|
438
|
+
}, it = { class: "ldio-spinner" }, lt = /* @__PURE__ */ Object.assign({
|
|
436
439
|
name: "MTag"
|
|
437
440
|
}, {
|
|
438
441
|
__name: "Tag",
|
|
@@ -448,29 +451,31 @@ const Xe = /* @__PURE__ */ Object.assign({
|
|
|
448
451
|
loading: {
|
|
449
452
|
type: Boolean,
|
|
450
453
|
default: !1
|
|
451
|
-
},
|
|
452
|
-
iconType: {
|
|
453
|
-
type: String,
|
|
454
|
-
default: "normal",
|
|
455
|
-
validator: (e) => ["normal", "color"].includes(e)
|
|
456
454
|
}
|
|
457
455
|
},
|
|
458
456
|
setup(e) {
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
457
|
+
const t = e, n = $(() => t.prefixIcon);
|
|
458
|
+
return (s, o) => {
|
|
459
|
+
const a = je;
|
|
460
|
+
return l(), f(a, v(s.$attrs, {
|
|
462
461
|
class: ["m-tag", { "is-loading": e.loading }]
|
|
463
462
|
}), b({ _: 2 }, [
|
|
464
|
-
|
|
465
|
-
name:
|
|
463
|
+
_(s.$slots, (r, i) => ({
|
|
464
|
+
name: i,
|
|
466
465
|
fn: p(() => [
|
|
467
|
-
e.prefixIcon ? (l(),
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
u(
|
|
472
|
-
e.suffixIcon ? (l(), m("i", {
|
|
466
|
+
e.loading && !e.prefixIcon ? (l(), u("div", rt, [
|
|
467
|
+
y("div", it, [
|
|
468
|
+
(l(), u(U, null, _(8, (d) => y("div", { key: d })), 64))
|
|
469
|
+
])
|
|
470
|
+
])) : n.value ? (l(), u("i", {
|
|
473
471
|
key: 1,
|
|
472
|
+
class: P(["prefixIcon", ["iconfont", n.value]])
|
|
473
|
+
}, null, 2)) : S("", !0),
|
|
474
|
+
y("div", null, [
|
|
475
|
+
m(s.$slots, i)
|
|
476
|
+
]),
|
|
477
|
+
e.suffixIcon ? (l(), u("i", {
|
|
478
|
+
key: 2,
|
|
474
479
|
class: P(["suffixIcon", ["iconfont", e.suffixIcon]])
|
|
475
480
|
}, null, 2)) : S("", !0)
|
|
476
481
|
])
|
|
@@ -478,14 +483,14 @@ const Xe = /* @__PURE__ */ Object.assign({
|
|
|
478
483
|
]), 1040, ["class"]);
|
|
479
484
|
};
|
|
480
485
|
}
|
|
481
|
-
}),
|
|
486
|
+
}), ct = ["src", "alt"], ut = ["success", "warning", "error"], mt = {
|
|
482
487
|
name: "MAlert"
|
|
483
|
-
},
|
|
488
|
+
}, dt = /* @__PURE__ */ Object.assign(mt, {
|
|
484
489
|
props: {
|
|
485
490
|
type: {
|
|
486
491
|
type: String,
|
|
487
492
|
default: "success",
|
|
488
|
-
validator: (e) =>
|
|
493
|
+
validator: (e) => ut.includes(e)
|
|
489
494
|
},
|
|
490
495
|
useCustomIcon: {
|
|
491
496
|
type: Boolean,
|
|
@@ -493,37 +498,37 @@ const Xe = /* @__PURE__ */ Object.assign({
|
|
|
493
498
|
}
|
|
494
499
|
},
|
|
495
500
|
setup(e) {
|
|
496
|
-
const t = e, n = j(), s =
|
|
501
|
+
const t = e, n = j(), s = $(() => {
|
|
497
502
|
const i = n, { useCustomIcon: a } = i, r = V(i, ["useCustomIcon"]);
|
|
498
|
-
return
|
|
503
|
+
return w(k({}, r), {
|
|
499
504
|
type: t.type
|
|
500
505
|
// 确保 type 属性正确传递给 el-alert
|
|
501
506
|
});
|
|
502
|
-
}), o =
|
|
507
|
+
}), o = $(() => t.useCustomIcon ? `https://cfdsaas-pre.oss-cn-hongkong.aliyuncs.com/mc-assets/mc-ui/alert/alert-${t.type}.png` : null);
|
|
503
508
|
return (a, r) => {
|
|
504
509
|
const i = xe;
|
|
505
510
|
return l(), f(i, v(s.value, { class: "mc-alert" }), b({ _: 2 }, [
|
|
506
511
|
o.value ? {
|
|
507
512
|
name: "icon",
|
|
508
513
|
fn: p(() => [
|
|
509
|
-
|
|
514
|
+
y("img", {
|
|
510
515
|
src: o.value,
|
|
511
516
|
alt: `${e.type} icon`,
|
|
512
517
|
class: "mc-alert-icon"
|
|
513
|
-
}, null, 8,
|
|
518
|
+
}, null, 8, ct)
|
|
514
519
|
]),
|
|
515
520
|
key: "0"
|
|
516
521
|
} : void 0,
|
|
517
|
-
|
|
522
|
+
_(a.$slots, (d, h) => ({
|
|
518
523
|
name: h,
|
|
519
524
|
fn: p(() => [
|
|
520
|
-
|
|
525
|
+
m(a.$slots, h)
|
|
521
526
|
])
|
|
522
527
|
}))
|
|
523
528
|
]), 1040);
|
|
524
529
|
};
|
|
525
530
|
}
|
|
526
|
-
}),
|
|
531
|
+
}), pt = /* @__PURE__ */ Object.assign({
|
|
527
532
|
name: "MDialog"
|
|
528
533
|
}, {
|
|
529
534
|
__name: "Dialog",
|
|
@@ -557,10 +562,10 @@ const Xe = /* @__PURE__ */ Object.assign({
|
|
|
557
562
|
}),
|
|
558
563
|
emits: /* @__PURE__ */ K(["close"], ["update:modelValue"]),
|
|
559
564
|
setup(e, { emit: t }) {
|
|
560
|
-
const n =
|
|
565
|
+
const n = pe(e, "modelValue");
|
|
561
566
|
return (s, o) => {
|
|
562
567
|
const a = Le;
|
|
563
|
-
return l(),
|
|
568
|
+
return l(), u("div", null, [
|
|
564
569
|
A(a, v({
|
|
565
570
|
modelValue: n.value,
|
|
566
571
|
"onUpdate:modelValue": o[0] || (o[0] = (r) => n.value = r),
|
|
@@ -574,21 +579,21 @@ const Xe = /* @__PURE__ */ Object.assign({
|
|
|
574
579
|
"header-class": "m-header"
|
|
575
580
|
}), b({
|
|
576
581
|
default: p(() => [
|
|
577
|
-
|
|
582
|
+
m(s.$slots, "default")
|
|
578
583
|
]),
|
|
579
584
|
_: 2
|
|
580
585
|
}, [
|
|
581
586
|
s.$slots.header ? {
|
|
582
587
|
name: "header",
|
|
583
588
|
fn: p(({ close: r, titleId: i, titleClass: d }) => [
|
|
584
|
-
|
|
589
|
+
m(s.$slots, "header", D(G({ close: r, titleId: i, titleClass: d })))
|
|
585
590
|
]),
|
|
586
591
|
key: "0"
|
|
587
592
|
} : void 0,
|
|
588
593
|
s.$slots.footer ? {
|
|
589
594
|
name: "footer",
|
|
590
595
|
fn: p(() => [
|
|
591
|
-
|
|
596
|
+
m(s.$slots, "footer")
|
|
592
597
|
]),
|
|
593
598
|
key: "1"
|
|
594
599
|
} : void 0
|
|
@@ -596,23 +601,23 @@ const Xe = /* @__PURE__ */ Object.assign({
|
|
|
596
601
|
]);
|
|
597
602
|
};
|
|
598
603
|
}
|
|
599
|
-
}),
|
|
604
|
+
}), ft = {
|
|
600
605
|
name: "MNotification"
|
|
601
606
|
};
|
|
602
|
-
function
|
|
607
|
+
function _t(e, t, n, s, o, a) {
|
|
603
608
|
const r = Re;
|
|
604
609
|
return l(), f(r, v(e.$attrs, { class: "mc-notification" }), b({ _: 2 }, [
|
|
605
|
-
|
|
610
|
+
_(e.$slots, (i, d) => ({
|
|
606
611
|
name: d,
|
|
607
612
|
fn: p(() => [
|
|
608
|
-
|
|
613
|
+
m(e.$slots, d)
|
|
609
614
|
])
|
|
610
615
|
}))
|
|
611
616
|
]), 1040);
|
|
612
617
|
}
|
|
613
|
-
const
|
|
614
|
-
let
|
|
615
|
-
const
|
|
618
|
+
const gt = /* @__PURE__ */ O(ft, [["render", _t]]), I = B([]);
|
|
619
|
+
let bt = 0;
|
|
620
|
+
const vt = {
|
|
616
621
|
// 默认配置
|
|
617
622
|
defaultOptions: {
|
|
618
623
|
message: "",
|
|
@@ -634,17 +639,17 @@ const gt = {
|
|
|
634
639
|
// 显示消息
|
|
635
640
|
show(e = {}) {
|
|
636
641
|
typeof e == "string" && (e = { message: e });
|
|
637
|
-
const t =
|
|
638
|
-
id: ++
|
|
642
|
+
const t = w(k(k({}, this.defaultOptions), e), {
|
|
643
|
+
id: ++bt
|
|
639
644
|
});
|
|
640
645
|
if (t.grouping) {
|
|
641
|
-
const n =
|
|
646
|
+
const n = I.value.findIndex(
|
|
642
647
|
(s) => s.message === t.message && s.type === t.type && s.grouping
|
|
643
648
|
);
|
|
644
649
|
if (n > -1)
|
|
645
|
-
return
|
|
650
|
+
return I.value[n].repeatNum++, { close: () => this.close(I.value[n].id) };
|
|
646
651
|
}
|
|
647
|
-
return
|
|
652
|
+
return I.value.push(t), t.duration > 0 && setTimeout(() => {
|
|
648
653
|
this.close(t.id);
|
|
649
654
|
}, t.duration), {
|
|
650
655
|
close: () => this.close(t.id)
|
|
@@ -652,59 +657,59 @@ const gt = {
|
|
|
652
657
|
},
|
|
653
658
|
// 关闭指定消息
|
|
654
659
|
close(e) {
|
|
655
|
-
const t =
|
|
660
|
+
const t = I.value.findIndex((n) => n.id === e);
|
|
656
661
|
if (t > -1) {
|
|
657
|
-
const n =
|
|
658
|
-
n.onClose && n.onClose(n),
|
|
662
|
+
const n = I.value[t];
|
|
663
|
+
n.onClose && n.onClose(n), I.value.splice(t, 1);
|
|
659
664
|
}
|
|
660
665
|
},
|
|
661
666
|
// 关闭所有消息
|
|
662
667
|
closeAll() {
|
|
663
|
-
|
|
668
|
+
I.value = [];
|
|
664
669
|
},
|
|
665
670
|
// 便捷方法
|
|
666
671
|
success(e = {}) {
|
|
667
|
-
return typeof e == "string" && (e = { message: e }), this.show(
|
|
672
|
+
return typeof e == "string" && (e = { message: e }), this.show(w(k({}, e), { type: "success" }));
|
|
668
673
|
},
|
|
669
674
|
warning(e = {}) {
|
|
670
|
-
return typeof e == "string" && (e = { message: e }), this.show(
|
|
675
|
+
return typeof e == "string" && (e = { message: e }), this.show(w(k({}, e), { type: "warning" }));
|
|
671
676
|
},
|
|
672
677
|
error(e = {}) {
|
|
673
|
-
return typeof e == "string" && (e = { message: e }), this.show(
|
|
678
|
+
return typeof e == "string" && (e = { message: e }), this.show(w(k({}, e), { type: "error" }));
|
|
674
679
|
}
|
|
675
|
-
},
|
|
676
|
-
|
|
677
|
-
},
|
|
680
|
+
}, ht = (e) => {
|
|
681
|
+
vt.close(e);
|
|
682
|
+
}, yt = {
|
|
678
683
|
name: "MMessage",
|
|
679
684
|
setup() {
|
|
680
685
|
return {
|
|
681
|
-
messages:
|
|
682
|
-
closeMessage:
|
|
686
|
+
messages: I,
|
|
687
|
+
closeMessage: ht
|
|
683
688
|
};
|
|
684
689
|
}
|
|
685
|
-
},
|
|
690
|
+
}, $t = {
|
|
686
691
|
key: 0,
|
|
687
692
|
class: "message-icon"
|
|
688
|
-
},
|
|
693
|
+
}, Mt = ["src"], Ct = {
|
|
689
694
|
key: 1,
|
|
690
695
|
src: "https://cfdsaas-pre.oss-cn-hongkong.aliyuncs.com/mc-assets/mc-ui/alert/alert-success.png",
|
|
691
696
|
alt: "success icon",
|
|
692
697
|
class: "message-icon-img"
|
|
693
|
-
},
|
|
698
|
+
}, kt = {
|
|
694
699
|
key: 2,
|
|
695
700
|
src: "https://cfdsaas-pre.oss-cn-hongkong.aliyuncs.com/mc-assets/mc-ui/alert/alert-warning.png",
|
|
696
701
|
alt: "warning icon",
|
|
697
702
|
class: "message-icon-img"
|
|
698
|
-
},
|
|
703
|
+
}, St = {
|
|
699
704
|
key: 3,
|
|
700
705
|
src: "https://cfdsaas-pre.oss-cn-hongkong.aliyuncs.com/mc-assets/mc-ui/alert/alert-error.png",
|
|
701
706
|
alt: "error icon",
|
|
702
707
|
class: "message-icon-img"
|
|
703
|
-
},
|
|
708
|
+
}, Tt = { class: "message-content" }, It = ["innerHTML"], wt = { key: 2 }, Bt = {
|
|
704
709
|
key: 3,
|
|
705
710
|
class: "message-repeat"
|
|
706
|
-
},
|
|
707
|
-
function
|
|
711
|
+
}, Ot = ["onClick"];
|
|
712
|
+
function Et(e, t, n, s, o, a) {
|
|
708
713
|
return l(), f(te, { to: "body" }, [
|
|
709
714
|
A(se, {
|
|
710
715
|
name: "message",
|
|
@@ -712,7 +717,7 @@ function Bt(e, t, n, s, o, a) {
|
|
|
712
717
|
class: "message-container"
|
|
713
718
|
}, {
|
|
714
719
|
default: p(() => [
|
|
715
|
-
(l(!0),
|
|
720
|
+
(l(!0), u(U, null, _(s.messages, (r) => (l(), u("div", {
|
|
716
721
|
key: r.id,
|
|
717
722
|
class: P([
|
|
718
723
|
"custom-message",
|
|
@@ -721,35 +726,35 @@ function Bt(e, t, n, s, o, a) {
|
|
|
721
726
|
{ "message-plain": r.plain }
|
|
722
727
|
])
|
|
723
728
|
}, [
|
|
724
|
-
r.showIcon ? (l(),
|
|
725
|
-
r.customIcon ? (l(),
|
|
729
|
+
r.showIcon ? (l(), u("div", $t, [
|
|
730
|
+
r.customIcon ? (l(), u("img", {
|
|
726
731
|
key: 0,
|
|
727
732
|
src: r.customIcon,
|
|
728
733
|
alt: "custom icon",
|
|
729
734
|
class: "message-icon-img"
|
|
730
|
-
}, null, 8,
|
|
735
|
+
}, null, 8, Mt)) : r.type === "success" ? (l(), u("img", Ct)) : r.type === "warning" ? (l(), u("img", kt)) : r.type === "error" ? (l(), u("img", St)) : S("", !0)
|
|
731
736
|
])) : S("", !0),
|
|
732
|
-
|
|
733
|
-
typeof r.message == "function" ? (l(), f(ne(r.message), { key: 0 })) : r.dangerouslyUseHTMLString ? (l(),
|
|
737
|
+
y("div", Tt, [
|
|
738
|
+
typeof r.message == "function" ? (l(), f(ne(r.message), { key: 0 })) : r.dangerouslyUseHTMLString ? (l(), u("div", {
|
|
734
739
|
key: 1,
|
|
735
740
|
innerHTML: r.message
|
|
736
|
-
}, null, 8,
|
|
737
|
-
r.repeatNum > 1 ? (l(),
|
|
741
|
+
}, null, 8, It)) : (l(), u("span", wt, N(r.message), 1)),
|
|
742
|
+
r.repeatNum > 1 ? (l(), u("span", Bt, N(r.repeatNum), 1)) : S("", !0)
|
|
738
743
|
]),
|
|
739
|
-
r.showClose ? (l(),
|
|
744
|
+
r.showClose ? (l(), u("button", {
|
|
740
745
|
key: 1,
|
|
741
746
|
class: "message-close",
|
|
742
747
|
onClick: (i) => s.closeMessage(r.id)
|
|
743
|
-
}, " × ", 8,
|
|
748
|
+
}, " × ", 8, Ot)) : S("", !0)
|
|
744
749
|
], 2))), 128))
|
|
745
750
|
]),
|
|
746
751
|
_: 1
|
|
747
752
|
})
|
|
748
753
|
]);
|
|
749
754
|
}
|
|
750
|
-
const re = /* @__PURE__ */ O(
|
|
751
|
-
let
|
|
752
|
-
const
|
|
755
|
+
const re = /* @__PURE__ */ O(yt, [["render", Et]]), E = B([]);
|
|
756
|
+
let Pt = 0;
|
|
757
|
+
const Us = {
|
|
753
758
|
// 默认配置
|
|
754
759
|
defaultOptions: {
|
|
755
760
|
title: "",
|
|
@@ -761,8 +766,8 @@ const Ds = {
|
|
|
761
766
|
},
|
|
762
767
|
// 显示通知
|
|
763
768
|
show(e = {}) {
|
|
764
|
-
const t =
|
|
765
|
-
id: ++
|
|
769
|
+
const t = w(k(k({}, this.defaultOptions), e), {
|
|
770
|
+
id: ++Pt
|
|
766
771
|
});
|
|
767
772
|
return E.value.push(t), t.duration > 0 && setTimeout(() => {
|
|
768
773
|
this.close(t.id);
|
|
@@ -789,22 +794,22 @@ const Ds = {
|
|
|
789
794
|
error(e = {}) {
|
|
790
795
|
return this.show(e);
|
|
791
796
|
}
|
|
792
|
-
},
|
|
797
|
+
}, Nt = (e) => {
|
|
793
798
|
const t = E.value.findIndex((n) => n.id === e);
|
|
794
799
|
t > -1 && E.value.splice(t, 1);
|
|
795
|
-
},
|
|
800
|
+
}, At = {
|
|
796
801
|
name: "MNotifiMessage",
|
|
797
802
|
setup() {
|
|
798
803
|
return {
|
|
799
804
|
notifications: E,
|
|
800
|
-
closeNotification:
|
|
805
|
+
closeNotification: Nt
|
|
801
806
|
};
|
|
802
807
|
}
|
|
803
|
-
},
|
|
808
|
+
}, jt = { class: "notification-content" }, xt = { class: "notification-title" }, Lt = { class: "notification-message" }, Rt = {
|
|
804
809
|
key: 0,
|
|
805
810
|
class: "notification-action"
|
|
806
|
-
},
|
|
807
|
-
function
|
|
811
|
+
}, Vt = ["onClick"];
|
|
812
|
+
function zt(e, t, n, s, o, a) {
|
|
808
813
|
return l(), f(te, { to: "body" }, [
|
|
809
814
|
A(se, {
|
|
810
815
|
name: "notification",
|
|
@@ -812,38 +817,38 @@ function Rt(e, t, n, s, o, a) {
|
|
|
812
817
|
class: "notification-container"
|
|
813
818
|
}, {
|
|
814
819
|
default: p(() => [
|
|
815
|
-
(l(!0),
|
|
820
|
+
(l(!0), u(U, null, _(s.notifications, (r) => (l(), u("div", {
|
|
816
821
|
key: r.id,
|
|
817
822
|
class: P([
|
|
818
823
|
"custom-notification",
|
|
819
824
|
`notification-${r.position}`
|
|
820
825
|
])
|
|
821
826
|
}, [
|
|
822
|
-
t[0] || (t[0] =
|
|
823
|
-
|
|
827
|
+
t[0] || (t[0] = y("div", { class: "notification-icon" }, [
|
|
828
|
+
y("img", {
|
|
824
829
|
src: "https://cfdsaas-pre.oss-cn-hongkong.aliyuncs.com/mc-assets/MCImages/userCenter/icon-quota-tip.png",
|
|
825
830
|
alt: "notification icon"
|
|
826
831
|
})
|
|
827
832
|
], -1)),
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
r.slotContent ? (l(),
|
|
833
|
+
y("div", jt, [
|
|
834
|
+
y("div", xt, N(r.title), 1),
|
|
835
|
+
y("div", Lt, N(r.message), 1),
|
|
836
|
+
r.slotContent ? (l(), u("div", Rt, [
|
|
832
837
|
(l(), f(ne(r.slotContent)))
|
|
833
838
|
])) : S("", !0)
|
|
834
839
|
]),
|
|
835
|
-
r.showClose ? (l(),
|
|
840
|
+
r.showClose ? (l(), u("button", {
|
|
836
841
|
key: 0,
|
|
837
842
|
class: "notification-close",
|
|
838
843
|
onClick: (i) => s.closeNotification(r.id)
|
|
839
|
-
}, " × ", 8,
|
|
844
|
+
}, " × ", 8, Vt)) : S("", !0)
|
|
840
845
|
], 2))), 128))
|
|
841
846
|
]),
|
|
842
847
|
_: 1
|
|
843
848
|
})
|
|
844
849
|
]);
|
|
845
850
|
}
|
|
846
|
-
const ie = /* @__PURE__ */ O(
|
|
851
|
+
const ie = /* @__PURE__ */ O(At, [["render", zt]]), Ft = /* @__PURE__ */ Object.assign({
|
|
847
852
|
name: "MDatePicker"
|
|
848
853
|
}, {
|
|
849
854
|
__name: "DatePicker",
|
|
@@ -861,16 +866,16 @@ const ie = /* @__PURE__ */ O(Pt, [["render", Rt]]), Vt = /* @__PURE__ */ Object.
|
|
|
861
866
|
return (s, o) => {
|
|
862
867
|
const a = Ve;
|
|
863
868
|
return l(), f(a, v(T(t), { "popper-class": T(n) }), b({ _: 2 }, [
|
|
864
|
-
|
|
869
|
+
_(s.$slots, (r, i) => ({
|
|
865
870
|
name: i,
|
|
866
871
|
fn: p(() => [
|
|
867
|
-
|
|
872
|
+
m(s.$slots, i)
|
|
868
873
|
])
|
|
869
874
|
}))
|
|
870
875
|
]), 1040, ["popper-class"]);
|
|
871
876
|
};
|
|
872
877
|
}
|
|
873
|
-
}),
|
|
878
|
+
}), Dt = [
|
|
874
879
|
"404",
|
|
875
880
|
"billing",
|
|
876
881
|
"cart",
|
|
@@ -887,37 +892,37 @@ const ie = /* @__PURE__ */ O(Pt, [["render", Rt]]), Vt = /* @__PURE__ */ Object.
|
|
|
887
892
|
"subscription",
|
|
888
893
|
"todo",
|
|
889
894
|
"wishlist"
|
|
890
|
-
],
|
|
895
|
+
], Gt = {
|
|
891
896
|
name: "MEmpty"
|
|
892
|
-
},
|
|
897
|
+
}, Ut = /* @__PURE__ */ Object.assign(Gt, {
|
|
893
898
|
props: {
|
|
894
899
|
image: {
|
|
895
900
|
type: String,
|
|
896
901
|
default: "orders",
|
|
897
|
-
validator: (e) => e.includes("/") || e.includes("http") ? !0 :
|
|
902
|
+
validator: (e) => e.includes("/") || e.includes("http") ? !0 : Dt.includes(e)
|
|
898
903
|
}
|
|
899
904
|
},
|
|
900
905
|
setup(e) {
|
|
901
|
-
const t = e, n = j(), s =
|
|
906
|
+
const t = e, n = j(), s = $(() => {
|
|
902
907
|
const i = n, { image: a } = i;
|
|
903
908
|
return V(i, ["image"]);
|
|
904
|
-
}), o =
|
|
909
|
+
}), o = $(() => {
|
|
905
910
|
const { image: a } = t;
|
|
906
911
|
return a.includes("/") || a.includes("http") ? a : `/images/empty/${a}.png`;
|
|
907
912
|
});
|
|
908
913
|
return (a, r) => {
|
|
909
914
|
const i = ze;
|
|
910
915
|
return l(), f(i, v(s.value, { image: o.value }), b({ _: 2 }, [
|
|
911
|
-
|
|
916
|
+
_(a.$slots, (d, h) => ({
|
|
912
917
|
name: h,
|
|
913
918
|
fn: p(() => [
|
|
914
|
-
|
|
919
|
+
m(a.$slots, h)
|
|
915
920
|
])
|
|
916
921
|
}))
|
|
917
922
|
]), 1040, ["image"]);
|
|
918
923
|
};
|
|
919
924
|
}
|
|
920
|
-
}),
|
|
925
|
+
}), qt = /* @__PURE__ */ Object.assign({
|
|
921
926
|
name: "MTable"
|
|
922
927
|
}, {
|
|
923
928
|
__name: "Table",
|
|
@@ -925,16 +930,16 @@ const ie = /* @__PURE__ */ O(Pt, [["render", Rt]]), Vt = /* @__PURE__ */ Object.
|
|
|
925
930
|
return (t, n) => {
|
|
926
931
|
const s = Fe;
|
|
927
932
|
return l(), f(s, D(G(t.$attrs)), b({ _: 2 }, [
|
|
928
|
-
|
|
933
|
+
_(t.$slots, (o, a) => ({
|
|
929
934
|
name: a,
|
|
930
935
|
fn: p(() => [
|
|
931
|
-
|
|
936
|
+
m(t.$slots, a)
|
|
932
937
|
])
|
|
933
938
|
}))
|
|
934
939
|
]), 1040);
|
|
935
940
|
};
|
|
936
941
|
}
|
|
937
|
-
}),
|
|
942
|
+
}), Ht = /* @__PURE__ */ Object.assign({
|
|
938
943
|
name: "MTableColumn"
|
|
939
944
|
}, {
|
|
940
945
|
__name: "TableColumn",
|
|
@@ -942,19 +947,19 @@ const ie = /* @__PURE__ */ O(Pt, [["render", Rt]]), Vt = /* @__PURE__ */ Object.
|
|
|
942
947
|
return (t, n) => {
|
|
943
948
|
const s = De;
|
|
944
949
|
return l(), f(s, v(t.$attrs, { class: "m-table-column" }), b({ _: 2 }, [
|
|
945
|
-
|
|
950
|
+
_(t.$slots, (o, a) => ({
|
|
946
951
|
name: a,
|
|
947
952
|
fn: p(() => [
|
|
948
|
-
|
|
953
|
+
m(t.$slots, a)
|
|
949
954
|
])
|
|
950
955
|
}))
|
|
951
956
|
]), 1040);
|
|
952
957
|
};
|
|
953
958
|
}
|
|
954
|
-
}),
|
|
959
|
+
}), Wt = { class: "m-banner__content" }, Zt = {
|
|
955
960
|
key: 0,
|
|
956
961
|
class: "m-banner__icon"
|
|
957
|
-
},
|
|
962
|
+
}, Jt = { class: "m-banner__text" }, Qt = /* @__PURE__ */ Object.assign({
|
|
958
963
|
name: "MBanner"
|
|
959
964
|
}, {
|
|
960
965
|
__name: "Banner",
|
|
@@ -1019,29 +1024,29 @@ const ie = /* @__PURE__ */ O(Pt, [["render", Rt]]), Vt = /* @__PURE__ */ Object.
|
|
|
1019
1024
|
emits: ["close", "update:visible"],
|
|
1020
1025
|
setup(e, { expose: t, emit: n }) {
|
|
1021
1026
|
const s = fe(), o = e, a = n, r = B(o.visible);
|
|
1022
|
-
z(() => o.visible, (
|
|
1023
|
-
r.value =
|
|
1027
|
+
z(() => o.visible, (M) => {
|
|
1028
|
+
r.value = M;
|
|
1024
1029
|
});
|
|
1025
|
-
const i =
|
|
1026
|
-
const
|
|
1027
|
-
return o.backgroundColor && (
|
|
1030
|
+
const i = $(() => {
|
|
1031
|
+
const M = {};
|
|
1032
|
+
return o.backgroundColor && (M.backgroundColor = o.backgroundColor), o.textColor && (M.color = o.textColor), o.borderColor && (M.borderColor = o.borderColor), M;
|
|
1028
1033
|
}), d = {
|
|
1029
1034
|
info: "info",
|
|
1030
1035
|
success: "check-circle",
|
|
1031
1036
|
warning: "warning",
|
|
1032
1037
|
error: "close-circle"
|
|
1033
1038
|
};
|
|
1034
|
-
|
|
1039
|
+
$(() => o.icon || d[o.type]);
|
|
1035
1040
|
const h = () => {
|
|
1036
1041
|
r.value = !1, a("update:visible", !1), a("close");
|
|
1037
1042
|
};
|
|
1038
|
-
return z(r, (
|
|
1039
|
-
|
|
1043
|
+
return z(r, (M) => {
|
|
1044
|
+
M && o.duration > 0 && setTimeout(() => {
|
|
1040
1045
|
h();
|
|
1041
1046
|
}, o.duration);
|
|
1042
1047
|
}), t({
|
|
1043
1048
|
close: h
|
|
1044
|
-
}), (
|
|
1049
|
+
}), (M, q) => e.visible ? (l(), u("div", {
|
|
1045
1050
|
key: 0,
|
|
1046
1051
|
class: P(["m-banner", [
|
|
1047
1052
|
`m-banner--${e.type}`,
|
|
@@ -1052,26 +1057,26 @@ const ie = /* @__PURE__ */ O(Pt, [["render", Rt]]), Vt = /* @__PURE__ */ Object.
|
|
|
1052
1057
|
]]),
|
|
1053
1058
|
style: oe(i.value)
|
|
1054
1059
|
}, [
|
|
1055
|
-
|
|
1056
|
-
e.icon || T(s).icon ? (l(),
|
|
1057
|
-
|
|
1058
|
-
A(
|
|
1060
|
+
y("div", Wt, [
|
|
1061
|
+
e.icon || T(s).icon ? (l(), u("div", Zt, [
|
|
1062
|
+
m(M.$slots, "icon", {}, () => [
|
|
1063
|
+
A(Z, {
|
|
1059
1064
|
name: e.icon,
|
|
1060
1065
|
size: e.iconSize
|
|
1061
1066
|
}, null, 8, ["name", "size"])
|
|
1062
1067
|
], !0)
|
|
1063
1068
|
])) : S("", !0),
|
|
1064
|
-
|
|
1065
|
-
|
|
1069
|
+
y("div", Jt, [
|
|
1070
|
+
m(M.$slots, "default", {}, () => [
|
|
1066
1071
|
_e(N(e.content), 1)
|
|
1067
1072
|
], !0)
|
|
1068
1073
|
]),
|
|
1069
|
-
e.closable ? (l(),
|
|
1074
|
+
e.closable ? (l(), u("div", {
|
|
1070
1075
|
key: 1,
|
|
1071
1076
|
class: "m-banner__close",
|
|
1072
1077
|
onClick: h
|
|
1073
1078
|
}, [
|
|
1074
|
-
A(
|
|
1079
|
+
A(Z, {
|
|
1075
1080
|
name: "lucide-x",
|
|
1076
1081
|
size: e.closeIconSize
|
|
1077
1082
|
}, null, 8, ["size"])
|
|
@@ -1079,7 +1084,7 @@ const ie = /* @__PURE__ */ O(Pt, [["render", Rt]]), Vt = /* @__PURE__ */ Object.
|
|
|
1079
1084
|
])
|
|
1080
1085
|
], 6)) : S("", !0);
|
|
1081
1086
|
}
|
|
1082
|
-
}),
|
|
1087
|
+
}), Xt = /* @__PURE__ */ O(Qt, [["__scopeId", "data-v-00c80323"]]), Yt = {
|
|
1083
1088
|
name: "MTabs",
|
|
1084
1089
|
props: {
|
|
1085
1090
|
modelValue: {
|
|
@@ -1099,56 +1104,56 @@ const ie = /* @__PURE__ */ O(Pt, [["render", Rt]]), Vt = /* @__PURE__ */ Object.
|
|
|
1099
1104
|
a.value = { width: "0px", left: "0px" };
|
|
1100
1105
|
return;
|
|
1101
1106
|
}
|
|
1102
|
-
const
|
|
1103
|
-
if (!
|
|
1107
|
+
const g = o.value;
|
|
1108
|
+
if (!g) {
|
|
1104
1109
|
a.value = { width: "0px", left: "0px" };
|
|
1105
1110
|
return;
|
|
1106
1111
|
}
|
|
1107
|
-
const C = s.value.findIndex((ce) => ce.name ===
|
|
1112
|
+
const C = s.value.findIndex((ce) => ce.name === g);
|
|
1108
1113
|
if (C === -1) {
|
|
1109
1114
|
a.value = { width: "0px", left: "0px" };
|
|
1110
1115
|
return;
|
|
1111
1116
|
}
|
|
1112
|
-
const
|
|
1113
|
-
if (!
|
|
1117
|
+
const H = n.value.querySelectorAll(".m-tabs__item")[C];
|
|
1118
|
+
if (!H) {
|
|
1114
1119
|
a.value = { width: "0px", left: "0px" };
|
|
1115
1120
|
return;
|
|
1116
1121
|
}
|
|
1117
|
-
const le =
|
|
1122
|
+
const le = H.offsetLeft + H.offsetWidth / 2 - 8;
|
|
1118
1123
|
a.value = {
|
|
1119
1124
|
width: "16px",
|
|
1120
1125
|
left: `${le}px`
|
|
1121
1126
|
};
|
|
1122
1127
|
});
|
|
1123
|
-
}, i = (
|
|
1124
|
-
if (
|
|
1128
|
+
}, i = (g) => {
|
|
1129
|
+
if (g === o.value) return;
|
|
1125
1130
|
const C = o.value;
|
|
1126
|
-
o.value =
|
|
1127
|
-
}, d = (
|
|
1128
|
-
t("tab-remove",
|
|
1131
|
+
o.value = g, t("update:modelValue", g), t("tab-click", g), t("tab-change", g, C), r();
|
|
1132
|
+
}, d = (g) => {
|
|
1133
|
+
t("tab-remove", g), t("edit", g, "remove");
|
|
1129
1134
|
}, h = () => {
|
|
1130
1135
|
t("tab-add"), t("edit", null, "add");
|
|
1131
|
-
},
|
|
1132
|
-
const C = s.value.findIndex((L) => L.name ===
|
|
1133
|
-
C === -1 ? s.value.push(
|
|
1134
|
-
},
|
|
1135
|
-
const C = s.value.findIndex((L) => L.name ===
|
|
1136
|
+
}, M = (g) => {
|
|
1137
|
+
const C = s.value.findIndex((L) => L.name === g.name);
|
|
1138
|
+
C === -1 ? s.value.push(g) : s.value[C] = g;
|
|
1139
|
+
}, q = (g) => {
|
|
1140
|
+
const C = s.value.findIndex((L) => L.name === g);
|
|
1136
1141
|
C > -1 && s.value.splice(C, 1);
|
|
1137
1142
|
};
|
|
1138
1143
|
return ge("tabsContext", {
|
|
1139
1144
|
activeTab: o,
|
|
1140
|
-
registerTab:
|
|
1141
|
-
unregisterTab:
|
|
1145
|
+
registerTab: M,
|
|
1146
|
+
unregisterTab: q,
|
|
1142
1147
|
handleTabRemove: d,
|
|
1143
1148
|
handleTabAdd: h
|
|
1144
|
-
}), z(() => e.modelValue, (
|
|
1145
|
-
|
|
1149
|
+
}), z(() => e.modelValue, (g, C) => {
|
|
1150
|
+
g !== o.value && (o.value = g, t("tab-change", g, C), r());
|
|
1146
1151
|
}), z(s, () => {
|
|
1147
1152
|
r();
|
|
1148
1153
|
}, { deep: !0 }), ae(() => {
|
|
1149
1154
|
if (!o.value && s.value.length > 0) {
|
|
1150
|
-
const
|
|
1151
|
-
o.value =
|
|
1155
|
+
const g = s.value[0];
|
|
1156
|
+
o.value = g.name, t("update:modelValue", o.value);
|
|
1152
1157
|
}
|
|
1153
1158
|
r();
|
|
1154
1159
|
}), {
|
|
@@ -1159,39 +1164,39 @@ const ie = /* @__PURE__ */ O(Pt, [["render", Rt]]), Vt = /* @__PURE__ */ Object.
|
|
|
1159
1164
|
handleTabClick: i,
|
|
1160
1165
|
handleTabRemove: d,
|
|
1161
1166
|
handleTabAdd: h,
|
|
1162
|
-
registerTab:
|
|
1163
|
-
unregisterTab:
|
|
1167
|
+
registerTab: M,
|
|
1168
|
+
unregisterTab: q,
|
|
1164
1169
|
updateActiveBarPosition: r
|
|
1165
1170
|
};
|
|
1166
1171
|
}
|
|
1167
|
-
},
|
|
1172
|
+
}, Kt = { class: "m-tabs" }, es = { class: "m-tabs__header" }, ts = {
|
|
1168
1173
|
class: "m-tabs__nav",
|
|
1169
1174
|
ref: "navRef"
|
|
1170
|
-
},
|
|
1171
|
-
function
|
|
1172
|
-
return l(),
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
(l(!0),
|
|
1175
|
+
}, ss = ["onClick"], ns = { class: "m-tabs__content" };
|
|
1176
|
+
function os(e, t, n, s, o, a) {
|
|
1177
|
+
return l(), u("div", Kt, [
|
|
1178
|
+
y("div", es, [
|
|
1179
|
+
y("div", ts, [
|
|
1180
|
+
(l(!0), u(U, null, _(s.tabs, (r, i) => (l(), u("div", {
|
|
1176
1181
|
key: r.name,
|
|
1177
1182
|
class: P([
|
|
1178
1183
|
"m-tabs__item",
|
|
1179
1184
|
{ "is-active": s.activeTab === r.name }
|
|
1180
1185
|
]),
|
|
1181
1186
|
onClick: (d) => s.handleTabClick(r.name)
|
|
1182
|
-
}, N(r.label), 11,
|
|
1183
|
-
|
|
1187
|
+
}, N(r.label), 11, ss))), 128)),
|
|
1188
|
+
y("div", {
|
|
1184
1189
|
class: "m-tabs__active-bar",
|
|
1185
1190
|
style: oe(s.activeBarStyle)
|
|
1186
1191
|
}, null, 4)
|
|
1187
1192
|
], 512)
|
|
1188
1193
|
]),
|
|
1189
|
-
|
|
1190
|
-
|
|
1194
|
+
y("div", ns, [
|
|
1195
|
+
m(e.$slots, "default", {}, void 0, !0)
|
|
1191
1196
|
])
|
|
1192
1197
|
]);
|
|
1193
1198
|
}
|
|
1194
|
-
const
|
|
1199
|
+
const as = /* @__PURE__ */ O(Yt, [["render", os], ["__scopeId", "data-v-402b42a8"]]), rs = {
|
|
1195
1200
|
name: "MTabPane",
|
|
1196
1201
|
props: {
|
|
1197
1202
|
label: {
|
|
@@ -1212,7 +1217,7 @@ const ns = /* @__PURE__ */ O(Qt, [["render", ss], ["__scopeId", "data-v-402b42a8
|
|
|
1212
1217
|
}
|
|
1213
1218
|
},
|
|
1214
1219
|
setup(e) {
|
|
1215
|
-
const t = ye("tabsContext"), n =
|
|
1220
|
+
const t = ye("tabsContext"), n = $(() => e.name || e.label), s = $(() => t.activeTab.value === n.value);
|
|
1216
1221
|
return ae(() => {
|
|
1217
1222
|
const o = {
|
|
1218
1223
|
label: e.label,
|
|
@@ -1221,7 +1226,7 @@ const ns = /* @__PURE__ */ O(Qt, [["render", ss], ["__scopeId", "data-v-402b42a8
|
|
|
1221
1226
|
closable: e.closable
|
|
1222
1227
|
};
|
|
1223
1228
|
t.registerTab(o);
|
|
1224
|
-
}),
|
|
1229
|
+
}), $e(() => {
|
|
1225
1230
|
t.unregisterTab(n.value);
|
|
1226
1231
|
}), {
|
|
1227
1232
|
isActive: s,
|
|
@@ -1229,23 +1234,23 @@ const ns = /* @__PURE__ */ O(Qt, [["render", ss], ["__scopeId", "data-v-402b42a8
|
|
|
1229
1234
|
};
|
|
1230
1235
|
}
|
|
1231
1236
|
};
|
|
1232
|
-
function
|
|
1233
|
-
return ve((l(),
|
|
1237
|
+
function is(e, t, n, s, o, a) {
|
|
1238
|
+
return ve((l(), u("div", {
|
|
1234
1239
|
class: P(["m-tab-pane", { "is-active": s.isActive }])
|
|
1235
1240
|
}, [
|
|
1236
|
-
|
|
1241
|
+
m(e.$slots, "default", {}, void 0, !0)
|
|
1237
1242
|
], 2)), [
|
|
1238
1243
|
[he, s.isActive]
|
|
1239
1244
|
]);
|
|
1240
1245
|
}
|
|
1241
|
-
const
|
|
1246
|
+
const ls = /* @__PURE__ */ O(rs, [["render", is], ["__scopeId", "data-v-31f89b3b"]]);
|
|
1242
1247
|
function F(e) {
|
|
1243
1248
|
e && e.classList && e.classList.add("mc-ui-override");
|
|
1244
1249
|
}
|
|
1245
|
-
function
|
|
1250
|
+
function cs(e) {
|
|
1246
1251
|
e && e.$el && F(e.$el);
|
|
1247
1252
|
}
|
|
1248
|
-
function
|
|
1253
|
+
function us() {
|
|
1249
1254
|
typeof document != "undefined" && (document.body.classList.add("mc-ui-override"), new MutationObserver((t) => {
|
|
1250
1255
|
t.forEach((n) => {
|
|
1251
1256
|
n.addedNodes.forEach((s) => {
|
|
@@ -1266,14 +1271,14 @@ function ls() {
|
|
|
1266
1271
|
subtree: !0
|
|
1267
1272
|
}));
|
|
1268
1273
|
}
|
|
1269
|
-
function
|
|
1274
|
+
function ms(e = '[class*="el-"]') {
|
|
1270
1275
|
typeof document != "undefined" && document.querySelectorAll(e).forEach((n) => {
|
|
1271
1276
|
const s = n.closest(".mc-ui-override") || n.parentElement;
|
|
1272
1277
|
s && !s.classList.contains("mc-ui-override") && s.classList.add("mc-ui-override");
|
|
1273
1278
|
});
|
|
1274
1279
|
}
|
|
1275
|
-
function
|
|
1276
|
-
return
|
|
1280
|
+
function ds(e) {
|
|
1281
|
+
return w(k({}, e), {
|
|
1277
1282
|
mounted() {
|
|
1278
1283
|
F(this.$el), e.mounted && e.mounted.call(this);
|
|
1279
1284
|
},
|
|
@@ -1282,19 +1287,19 @@ function us(e) {
|
|
|
1282
1287
|
}
|
|
1283
1288
|
});
|
|
1284
1289
|
}
|
|
1285
|
-
const
|
|
1290
|
+
const ps = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1286
1291
|
__proto__: null,
|
|
1287
|
-
addComponentOverride:
|
|
1292
|
+
addComponentOverride: cs,
|
|
1288
1293
|
addOverrideClass: F,
|
|
1289
|
-
applyGlobalOverride:
|
|
1290
|
-
createOverrideComponent:
|
|
1291
|
-
forceRefreshStyles:
|
|
1292
|
-
}, Symbol.toStringTag, { value: "Module" })), J = [
|
|
1294
|
+
applyGlobalOverride: us,
|
|
1295
|
+
createOverrideComponent: ds,
|
|
1296
|
+
forceRefreshStyles: ms
|
|
1297
|
+
}, Symbol.toStringTag, { value: "Module" })), J = [Z, qe, He, We, Ze, Xe, Ye, Ke, et, tt, st, nt, ot, at, lt, dt, pt, gt, re, ie, Ft, Ut, qt, Ht, Xt, as, ls], fs = [
|
|
1293
1298
|
{ id: "global-message-container", component: re },
|
|
1294
1299
|
{ id: "global-notification-container", component: ie }
|
|
1295
1300
|
];
|
|
1296
|
-
function
|
|
1297
|
-
return
|
|
1301
|
+
function _s(n) {
|
|
1302
|
+
return W(this, arguments, function* ({ id: e, component: t }) {
|
|
1298
1303
|
try {
|
|
1299
1304
|
if (document.getElementById(e)) return;
|
|
1300
1305
|
const { createApp: s, h: o } = yield import("vue"), a = document.createElement("div");
|
|
@@ -1306,14 +1311,14 @@ function ds(n) {
|
|
|
1306
1311
|
}
|
|
1307
1312
|
});
|
|
1308
1313
|
}
|
|
1309
|
-
function
|
|
1310
|
-
return
|
|
1311
|
-
const e =
|
|
1314
|
+
function gs() {
|
|
1315
|
+
return W(this, null, function* () {
|
|
1316
|
+
const e = fs.map(_s);
|
|
1312
1317
|
yield Promise.all(e);
|
|
1313
1318
|
});
|
|
1314
1319
|
}
|
|
1315
1320
|
const c = {};
|
|
1316
|
-
function
|
|
1321
|
+
function bs(e) {
|
|
1317
1322
|
const t = J.map((n) => {
|
|
1318
1323
|
if (n && n.name && typeof n.name == "string") {
|
|
1319
1324
|
let s = n.name.toLowerCase();
|
|
@@ -1337,8 +1342,8 @@ function _s(e) {
|
|
|
1337
1342
|
}
|
|
1338
1343
|
});
|
|
1339
1344
|
}
|
|
1340
|
-
const
|
|
1341
|
-
typeof window != "undefined" && Promise.resolve().then(() =>
|
|
1345
|
+
const vs = (e) => {
|
|
1346
|
+
typeof window != "undefined" && Promise.resolve().then(() => ps).then(({ applyGlobalOverride: t }) => {
|
|
1342
1347
|
t();
|
|
1343
1348
|
}), console.log("🚀 开始安装 @mc-markets/ui 组件库..."), J.forEach((t) => {
|
|
1344
1349
|
if (t && t.name && typeof t.name == "string") {
|
|
@@ -1352,9 +1357,9 @@ const gs = (e) => {
|
|
|
1352
1357
|
mtabpane: "m-tab-pane"
|
|
1353
1358
|
}[n] || n.replace(/^m/, "m-"), e.component(n, t);
|
|
1354
1359
|
}
|
|
1355
|
-
}),
|
|
1360
|
+
}), bs(e), typeof window != "undefined" && gs();
|
|
1356
1361
|
};
|
|
1357
|
-
function
|
|
1362
|
+
function qs(e) {
|
|
1358
1363
|
const t = Object.keys(e._context.components || {}), n = J.map((s) => {
|
|
1359
1364
|
if (s && s.name && typeof s.name == "string") {
|
|
1360
1365
|
let o = s.name.toLowerCase();
|
|
@@ -1377,75 +1382,75 @@ function Gs(e) {
|
|
|
1377
1382
|
)
|
|
1378
1383
|
};
|
|
1379
1384
|
}
|
|
1380
|
-
const
|
|
1385
|
+
const Hs = { install: vs }, Ws = ee.ElMessageBox, Zs = k({}, c), Js = c.MButtonGroup, Qs = c.MBreadcrumb, Xs = c.MBreadcrumbItem, Ys = c.MCarousel, Ks = c.MCarouselItem, en = c.MCascader, tn = c.MCascaderPanel, sn = c.MCheckTag, nn = c.MCalendar, on = c.MTimePicker, an = c.MDateTimePicker, rn = c.MColorPicker, ln = c.MTransfer, cn = c.MTree, un = c.MTreeSelect, mn = c.MUpload, dn = c.MImage, pn = c.MImageViewer, fn = c.MBacktop, _n = c.MInfiniteScroll, gn = c.MAffix, bn = c.MScrollbar, vn = c.MResult, hn = c.MSkeleton, yn = c.MLoading, $n = c.MSpinner, Mn = c.MProgress, Cn = c.MBadge, kn = c.MAvatar, Sn = c.MImagePreview, Tn = c.MTeleport, In = c.MConfigProvider;
|
|
1381
1386
|
export {
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1387
|
+
gn as MAffix,
|
|
1388
|
+
dt as MAlert,
|
|
1389
|
+
kn as MAvatar,
|
|
1390
|
+
fn as MBacktop,
|
|
1391
|
+
Cn as MBadge,
|
|
1392
|
+
Xt as MBanner,
|
|
1393
|
+
Qs as MBreadcrumb,
|
|
1394
|
+
Xs as MBreadcrumbItem,
|
|
1390
1395
|
qe as MButton,
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1396
|
+
Js as MButtonGroup,
|
|
1397
|
+
nn as MCalendar,
|
|
1398
|
+
Ys as MCarousel,
|
|
1399
|
+
Ks as MCarouselItem,
|
|
1400
|
+
en as MCascader,
|
|
1401
|
+
tn as MCascaderPanel,
|
|
1402
|
+
sn as MCheckTag,
|
|
1403
|
+
rn as MColorPicker,
|
|
1404
|
+
In as MConfigProvider,
|
|
1405
|
+
Ft as MDatePicker,
|
|
1406
|
+
an as MDateTimePicker,
|
|
1407
|
+
pt as MDialog,
|
|
1408
|
+
Ut as MEmpty,
|
|
1404
1409
|
We as MForm,
|
|
1405
1410
|
Ze as MFormItem,
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
+
Z as MIcon,
|
|
1412
|
+
dn as MImage,
|
|
1413
|
+
Sn as MImagePreview,
|
|
1414
|
+
pn as MImageViewer,
|
|
1415
|
+
_n as MInfiniteScroll,
|
|
1411
1416
|
He as MInput,
|
|
1412
|
-
|
|
1417
|
+
yn as MLoading,
|
|
1413
1418
|
re as MMessage,
|
|
1414
|
-
|
|
1419
|
+
Ws as MMessageBox,
|
|
1415
1420
|
ie as MNotifiMessage,
|
|
1416
|
-
|
|
1421
|
+
gt as MNotification,
|
|
1417
1422
|
tt as MPagination,
|
|
1418
|
-
|
|
1423
|
+
Mn as MProgress,
|
|
1419
1424
|
st as MRadio,
|
|
1420
1425
|
ot as MRadioButton,
|
|
1421
1426
|
nt as MRadioGroup,
|
|
1422
|
-
|
|
1423
|
-
|
|
1427
|
+
vn as MResult,
|
|
1428
|
+
bn as MScrollbar,
|
|
1424
1429
|
Ye as MSelect,
|
|
1425
|
-
|
|
1426
|
-
|
|
1430
|
+
hn as MSkeleton,
|
|
1431
|
+
$n as MSpinner,
|
|
1427
1432
|
at as MSwitch,
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1433
|
+
ls as MTabPane,
|
|
1434
|
+
qt as MTable,
|
|
1435
|
+
Ht as MTableColumn,
|
|
1436
|
+
as as MTabs,
|
|
1437
|
+
lt as MTag,
|
|
1438
|
+
Tn as MTeleport,
|
|
1439
|
+
on as MTimePicker,
|
|
1435
1440
|
Xe as MTooltip,
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1441
|
+
ln as MTransfer,
|
|
1442
|
+
cn as MTree,
|
|
1443
|
+
un as MTreeSelect,
|
|
1444
|
+
mn as MUpload,
|
|
1445
|
+
vt as Message,
|
|
1446
|
+
Us as NotifiMessage,
|
|
1447
|
+
cs as addComponentOverride,
|
|
1443
1448
|
F as addOverrideClass,
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1449
|
+
us as applyGlobalOverride,
|
|
1450
|
+
qs as checkComponentRegistration,
|
|
1451
|
+
ds as createOverrideComponent,
|
|
1452
|
+
Hs as default,
|
|
1453
|
+
ms as forceRefreshStyles,
|
|
1454
|
+
Zs as mComponents
|
|
1450
1455
|
};
|
|
1451
1456
|
//# sourceMappingURL=index.mjs.map
|