@mc-markets/ui 1.0.64 → 1.0.68
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/Alert/Alert.vue.d.ts +8 -0
- package/dist/components/Alert/Alert.vue.d.ts.map +1 -0
- package/dist/components/Banner/Banner.vue.d.ts +38 -0
- package/dist/components/Banner/Banner.vue.d.ts.map +1 -0
- package/dist/components/Button/Button.vue.d.ts +8 -0
- package/dist/components/Button/Button.vue.d.ts.map +1 -0
- package/dist/components/Card/Card.vue.d.ts +8 -0
- package/dist/components/Card/Card.vue.d.ts.map +1 -0
- package/dist/components/DatePicker/DatePicker.vue.d.ts +13 -0
- package/dist/components/DatePicker/DatePicker.vue.d.ts.map +1 -0
- package/dist/components/Dialog/Dialog.vue.d.ts +30 -0
- package/dist/components/Dialog/Dialog.vue.d.ts.map +1 -0
- package/dist/components/Empty/Empty.vue.d.ts +11 -0
- package/dist/components/Empty/Empty.vue.d.ts.map +1 -0
- package/dist/components/Form/Form.vue.d.ts +8 -0
- package/dist/components/Form/Form.vue.d.ts.map +1 -0
- package/dist/components/FormItem/FormItem.vue.d.ts +8 -0
- package/dist/components/FormItem/FormItem.vue.d.ts.map +1 -0
- package/dist/components/Icon/Icon.vue.d.ts +30 -0
- package/dist/components/Icon/Icon.vue.d.ts.map +1 -0
- package/dist/components/Input/Input.vue.d.ts +8 -0
- package/dist/components/Input/Input.vue.d.ts.map +1 -0
- package/dist/components/Notification/Notification.vue.d.ts +8 -0
- package/dist/components/Notification/Notification.vue.d.ts.map +1 -0
- package/dist/components/Option/Option.vue.d.ts +8 -0
- package/dist/components/Option/Option.vue.d.ts.map +1 -0
- package/dist/components/OptionGroup/OptionGroup.vue.d.ts +8 -0
- package/dist/components/OptionGroup/OptionGroup.vue.d.ts.map +1 -0
- package/dist/components/Pagination/Pagination.vue.d.ts +8 -0
- package/dist/components/Pagination/Pagination.vue.d.ts.map +1 -0
- package/dist/components/Radio/Radio.vue.d.ts +13 -0
- package/dist/components/Radio/Radio.vue.d.ts.map +1 -0
- package/dist/components/RadioButton/RadioButton.vue.d.ts +13 -0
- package/dist/components/RadioButton/RadioButton.vue.d.ts.map +1 -0
- package/dist/components/RadioGroup/RadioGroup.vue.d.ts +13 -0
- package/dist/components/RadioGroup/RadioGroup.vue.d.ts.map +1 -0
- package/dist/components/Select/Select.vue.d.ts +8 -0
- package/dist/components/Select/Select.vue.d.ts.map +1 -0
- package/dist/components/Switch/Switch.vue.d.ts +13 -0
- package/dist/components/Switch/Switch.vue.d.ts.map +1 -0
- package/dist/components/Table/Table.vue.d.ts +8 -0
- package/dist/components/Table/Table.vue.d.ts.map +1 -0
- package/dist/components/Table/TableColumn.vue.d.ts +8 -0
- package/dist/components/Table/TableColumn.vue.d.ts.map +1 -0
- package/dist/components/Tabs/TabPane.vue.d.ts +23 -0
- package/dist/components/Tabs/TabPane.vue.d.ts.map +1 -0
- package/dist/components/Tabs/Tabs.vue.d.ts +31 -0
- package/dist/components/Tabs/Tabs.vue.d.ts.map +1 -0
- package/dist/components/Tag/Tag.vue.d.ts +8 -0
- package/dist/components/Tag/Tag.vue.d.ts.map +1 -0
- package/dist/components/Tooltip/Tooltip.vue.d.ts +13 -0
- package/dist/components/Tooltip/Tooltip.vue.d.ts.map +1 -0
- package/dist/hooks/useClassName.d.ts +8 -0
- package/dist/hooks/useClassName.d.ts.map +1 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +76 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +1136 -0
- package/dist/index.mjs.map +1 -0
- package/dist/style.css +1 -0
- package/dist/styles/font/iconfont.d.ts +1 -0
- package/dist/styles/font/iconfont.d.ts.map +1 -0
- package/dist/utils/classNames.d.ts +3 -0
- package/dist/utils/classNames.d.ts.map +1 -0
- package/dist/utils/styleUtils.d.ts +31 -0
- package/dist/utils/styleUtils.d.ts.map +1 -0
- package/package.json +19 -18
- package/packages/components/Alert/Alert.vue +13 -0
- package/packages/components/Banner/Banner.vue +299 -0
- package/packages/components/Button/Button.vue +18 -0
- package/packages/components/Card/Card.vue +20 -0
- package/packages/components/DatePicker/DatePicker.vue +71 -0
- package/packages/components/Dialog/Dialog.vue +102 -0
- package/packages/components/Empty/Empty.vue +74 -0
- package/packages/components/Form/Form.vue +17 -0
- package/packages/components/FormItem/FormItem.vue +20 -0
- package/packages/components/Icon/Icon.vue +210 -0
- package/packages/components/Input/Input.vue +25 -0
- package/packages/components/Notification/Notification.vue +13 -0
- package/packages/components/Option/Option.vue +13 -0
- package/packages/components/OptionGroup/OptionGroup.vue +13 -0
- package/packages/components/Pagination/Pagination.vue +23 -0
- package/packages/components/Radio/Radio.vue +130 -0
- package/packages/components/RadioButton/RadioButton.vue +110 -0
- package/packages/components/RadioGroup/RadioGroup.vue +155 -0
- package/packages/components/Select/Select.vue +22 -0
- package/packages/components/Switch/Switch.vue +134 -0
- package/packages/components/Table/Table.vue +17 -0
- package/packages/components/Table/TableColumn.vue +20 -0
- package/packages/components/Tabs/TabPane.vue +98 -0
- package/packages/components/Tabs/Tabs.vue +414 -0
- package/packages/components/Tag/Tag.vue +61 -0
- package/packages/components/Tooltip/Tooltip.vue +58 -0
- package/packages/hooks/useClassName.js +23 -0
- package/packages/styles/README.md +129 -0
- package/packages/styles/components/button.scss +89 -87
- package/packages/styles/components/checkbox.scss +12 -8
- package/packages/styles/components/form.scss +18 -16
- package/packages/styles/components/override.scss +0 -0
- package/packages/styles/components/select.scss +45 -45
- package/packages/styles/components/table.scss +54 -52
- package/packages/styles/components/tabs.scss +6 -4
- package/packages/styles/index.scss +74 -209
- package/packages/utils/classNames.js +23 -0
- package/packages/utils/styleUtils.js +105 -0
- package/dist/index.js +0 -19255
- package/dist/index.js.css +0 -1
- package/packages/styles/components/input.scss +0 -3
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,1136 @@
|
|
|
1
|
+
var ee = Object.defineProperty, te = Object.defineProperties;
|
|
2
|
+
var se = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var N = Object.getOwnPropertySymbols;
|
|
4
|
+
var W = Object.prototype.hasOwnProperty, Z = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var q = (t, e, o) => e in t ? ee(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o, j = (t, e) => {
|
|
6
|
+
for (var o in e || (e = {}))
|
|
7
|
+
W.call(e, o) && q(t, o, e[o]);
|
|
8
|
+
if (N)
|
|
9
|
+
for (var o of N(e))
|
|
10
|
+
Z.call(e, o) && q(t, o, e[o]);
|
|
11
|
+
return t;
|
|
12
|
+
}, H = (t, e) => te(t, se(e));
|
|
13
|
+
var V = (t, e) => {
|
|
14
|
+
var o = {};
|
|
15
|
+
for (var s in t)
|
|
16
|
+
W.call(t, s) && e.indexOf(s) < 0 && (o[s] = t[s]);
|
|
17
|
+
if (t != null && N)
|
|
18
|
+
for (var s of N(t))
|
|
19
|
+
e.indexOf(s) < 0 && Z.call(t, s) && (o[s] = t[s]);
|
|
20
|
+
return o;
|
|
21
|
+
};
|
|
22
|
+
var J = (t, e, o) => new Promise((s, a) => {
|
|
23
|
+
var n = (g) => {
|
|
24
|
+
try {
|
|
25
|
+
l(o.next(g));
|
|
26
|
+
} catch ($) {
|
|
27
|
+
a($);
|
|
28
|
+
}
|
|
29
|
+
}, r = (g) => {
|
|
30
|
+
try {
|
|
31
|
+
l(o.throw(g));
|
|
32
|
+
} catch ($) {
|
|
33
|
+
a($);
|
|
34
|
+
}
|
|
35
|
+
}, l = (g) => g.done ? s(g.value) : Promise.resolve(g.value).then(n, r);
|
|
36
|
+
l((o = o.apply(t, e)).next());
|
|
37
|
+
});
|
|
38
|
+
import * as D from "element-plus";
|
|
39
|
+
import { computed as y, createElementBlock as h, openBlock as c, mergeProps as M, renderSlot as m, createBlock as b, createSlots as _, renderList as f, withCtx as p, useAttrs as F, unref as C, normalizeProps as T, guardReactiveProps as B, mergeModels as Q, useModel as oe, createVNode as P, createTextVNode as X, useSlots as G, ref as R, watch as A, createCommentVNode as O, normalizeStyle as ne, normalizeClass as z, createElementVNode as k, toDisplayString as Y, provide as ae, Fragment as re, withModifiers as le, inject as ie, onMounted as ce, onUnmounted as ue, withDirectives as me, vShow as pe } from "vue";
|
|
40
|
+
import { ElButton as de, ElCard as _e, ElInput as fe, ElForm as be, ElFormItem as ge, ElTooltip as Me, ElSelect as $e, ElOption as ve, ElOptionGroup as he, ElPagination as ye, ElRadio as Ce, ElRadioGroup as Se, ElRadioButton as ke, ElSwitch as Te, ElTag as Be, ElAlert as Ee, ElDialog as Oe, ElNotification as Pe, ElDatePicker as we, ElEmpty as Ie, ElTable as Ne, ElTableColumn as je } from "element-plus/es";
|
|
41
|
+
import "element-plus/es/components/base/style/index";
|
|
42
|
+
import "element-plus/es/components/button/style/index";
|
|
43
|
+
import "element-plus/es/components/card/style/index";
|
|
44
|
+
import "element-plus/es/components/input/style/index";
|
|
45
|
+
import "element-plus/es/components/form/style/index";
|
|
46
|
+
import "element-plus/es/components/form-item/style/index";
|
|
47
|
+
import "element-plus/es/components/tooltip/style/index";
|
|
48
|
+
import "element-plus/es/components/select/style/index";
|
|
49
|
+
import "element-plus/es/components/option/style/index";
|
|
50
|
+
import "element-plus/es/components/option-group/style/index";
|
|
51
|
+
import "element-plus/es/components/pagination/style/index";
|
|
52
|
+
import "element-plus/es/components/radio/style/index";
|
|
53
|
+
import "element-plus/es/components/radio-group/style/index";
|
|
54
|
+
import "element-plus/es/components/radio-button/style/index";
|
|
55
|
+
import "element-plus/es/components/switch/style/index";
|
|
56
|
+
import "element-plus/es/components/tag/style/index";
|
|
57
|
+
import "element-plus/es/components/alert/style/index";
|
|
58
|
+
import "element-plus/es/components/dialog/style/index";
|
|
59
|
+
import "element-plus/es/components/notification/style/index";
|
|
60
|
+
import "element-plus/es/components/date-picker/style/index";
|
|
61
|
+
import "element-plus/es/components/empty/style/index";
|
|
62
|
+
import "element-plus/es/components/table/style/index";
|
|
63
|
+
import "element-plus/es/components/table-column/style/index";
|
|
64
|
+
const E = (t, e) => {
|
|
65
|
+
const o = t.__vccOpts || t;
|
|
66
|
+
for (const [s, a] of e)
|
|
67
|
+
o[s] = a;
|
|
68
|
+
return o;
|
|
69
|
+
}, Ae = /* @__PURE__ */ Object.assign({
|
|
70
|
+
name: "MIcon"
|
|
71
|
+
}, {
|
|
72
|
+
__name: "Icon",
|
|
73
|
+
props: {
|
|
74
|
+
name: {
|
|
75
|
+
type: String,
|
|
76
|
+
required: !0
|
|
77
|
+
},
|
|
78
|
+
size: {
|
|
79
|
+
type: [String, Number],
|
|
80
|
+
default: "16px"
|
|
81
|
+
},
|
|
82
|
+
color: {
|
|
83
|
+
type: String,
|
|
84
|
+
default: "inherit"
|
|
85
|
+
},
|
|
86
|
+
spin: {
|
|
87
|
+
type: Boolean,
|
|
88
|
+
default: !1
|
|
89
|
+
},
|
|
90
|
+
pulse: {
|
|
91
|
+
type: Boolean,
|
|
92
|
+
default: !1
|
|
93
|
+
},
|
|
94
|
+
rotate: {
|
|
95
|
+
type: Number,
|
|
96
|
+
default: 0
|
|
97
|
+
},
|
|
98
|
+
flip: {
|
|
99
|
+
type: String,
|
|
100
|
+
default: void 0
|
|
101
|
+
},
|
|
102
|
+
prefix: {
|
|
103
|
+
type: String,
|
|
104
|
+
default: "icon"
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
emits: ["click"],
|
|
108
|
+
setup(t, { emit: e }) {
|
|
109
|
+
const o = t, s = e, a = y(() => {
|
|
110
|
+
const l = ["iconfont"];
|
|
111
|
+
return o.name && l.push(`${o.prefix}-${o.name}`), o.spin && l.push("icon-spin"), o.pulse && l.push("icon-pulse"), o.flip && l.push(`icon-flip-${o.flip}`), l;
|
|
112
|
+
}), n = y(() => {
|
|
113
|
+
const l = {};
|
|
114
|
+
return o.size && (typeof o.size == "number" ? l.fontSize = `${o.size}px` : l.fontSize = o.size), o.color && (l.color = o.color), o.rotate !== 0 && (l.transform = `rotate(${o.rotate}deg)`), l;
|
|
115
|
+
}), r = (l) => {
|
|
116
|
+
s("click", l);
|
|
117
|
+
};
|
|
118
|
+
return (l, g) => (c(), h("i", M({
|
|
119
|
+
class: a.value,
|
|
120
|
+
style: n.value
|
|
121
|
+
}, l.$attrs, { onClick: r }), [
|
|
122
|
+
m(l.$slots, "default", {}, void 0, !0)
|
|
123
|
+
], 16));
|
|
124
|
+
}
|
|
125
|
+
}), w = /* @__PURE__ */ E(Ae, [["__scopeId", "data-v-90f84c9e"]]), ze = /* @__PURE__ */ Object.assign({
|
|
126
|
+
name: "MButton"
|
|
127
|
+
}, {
|
|
128
|
+
__name: "Button",
|
|
129
|
+
setup(t) {
|
|
130
|
+
return (e, o) => {
|
|
131
|
+
const s = de;
|
|
132
|
+
return c(), b(s, M(e.$attrs, { class: "m-button" }), _({ _: 2 }, [
|
|
133
|
+
f(e.$slots, (a, n) => ({
|
|
134
|
+
name: n,
|
|
135
|
+
fn: p(() => [
|
|
136
|
+
m(e.$slots, n, {}, void 0, !0)
|
|
137
|
+
])
|
|
138
|
+
}))
|
|
139
|
+
]), 1040);
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
}), Le = /* @__PURE__ */ E(ze, [["__scopeId", "data-v-9c99add1"]]), Ve = /* @__PURE__ */ Object.assign({
|
|
143
|
+
name: "MCard"
|
|
144
|
+
}, {
|
|
145
|
+
__name: "Card",
|
|
146
|
+
setup(t) {
|
|
147
|
+
return (e, o) => {
|
|
148
|
+
const s = _e;
|
|
149
|
+
return c(), b(s, M(e.$attrs, { class: "m-card" }), _({ _: 2 }, [
|
|
150
|
+
f(e.$slots, (a, n) => ({
|
|
151
|
+
name: n,
|
|
152
|
+
fn: p(() => [
|
|
153
|
+
m(e.$slots, n)
|
|
154
|
+
])
|
|
155
|
+
}))
|
|
156
|
+
]), 1040);
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
}), Re = /* @__PURE__ */ Object.assign({
|
|
160
|
+
name: "MInput"
|
|
161
|
+
}, {
|
|
162
|
+
__name: "Input",
|
|
163
|
+
setup(t) {
|
|
164
|
+
return (e, o) => {
|
|
165
|
+
const s = fe;
|
|
166
|
+
return c(), b(s, M(e.$attrs, {
|
|
167
|
+
class: ["m-input", { solid: e.$attrs.styleType === "solid" }]
|
|
168
|
+
}), _({ _: 2 }, [
|
|
169
|
+
f(e.$slots, (a, n) => ({
|
|
170
|
+
name: n,
|
|
171
|
+
fn: p(() => [
|
|
172
|
+
m(e.$slots, n)
|
|
173
|
+
])
|
|
174
|
+
}))
|
|
175
|
+
]), 1040, ["class"]);
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
}), De = /* @__PURE__ */ Object.assign({
|
|
179
|
+
name: "MForm"
|
|
180
|
+
}, {
|
|
181
|
+
__name: "Form",
|
|
182
|
+
setup(t) {
|
|
183
|
+
return (e, o) => {
|
|
184
|
+
const s = be;
|
|
185
|
+
return c(), b(s, M(e.$attrs, { class: "m-form" }), _({ _: 2 }, [
|
|
186
|
+
f(e.$slots, (a, n) => ({
|
|
187
|
+
name: n,
|
|
188
|
+
fn: p(() => [
|
|
189
|
+
m(e.$slots, n)
|
|
190
|
+
])
|
|
191
|
+
}))
|
|
192
|
+
]), 1040);
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
}), Fe = /* @__PURE__ */ Object.assign({
|
|
196
|
+
name: "MFormItem"
|
|
197
|
+
}, {
|
|
198
|
+
__name: "FormItem",
|
|
199
|
+
setup(t) {
|
|
200
|
+
return (e, o) => {
|
|
201
|
+
const s = ge;
|
|
202
|
+
return c(), b(s, M(e.$attrs, { class: "m-form-item" }), _({ _: 2 }, [
|
|
203
|
+
f(e.$slots, (a, n) => ({
|
|
204
|
+
name: n,
|
|
205
|
+
fn: p(() => [
|
|
206
|
+
m(e.$slots, n)
|
|
207
|
+
])
|
|
208
|
+
}))
|
|
209
|
+
]), 1040);
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
}), Ge = (...t) => t.filter(Boolean).join(" "), Ue = (t, ...e) => {
|
|
213
|
+
const o = j({}, t);
|
|
214
|
+
return e.forEach((s) => {
|
|
215
|
+
delete o[s];
|
|
216
|
+
}), o;
|
|
217
|
+
};
|
|
218
|
+
function I(t, e = "popperClass") {
|
|
219
|
+
const o = F(), s = y(() => Ue(o, e)), a = y(() => Ge(t, o[e]));
|
|
220
|
+
return {
|
|
221
|
+
mergedAttrs: s,
|
|
222
|
+
className: a
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
const qe = /* @__PURE__ */ Object.assign({
|
|
226
|
+
name: "MTooltip"
|
|
227
|
+
}, {
|
|
228
|
+
__name: "Tooltip",
|
|
229
|
+
props: {
|
|
230
|
+
popperClass: {
|
|
231
|
+
type: String,
|
|
232
|
+
default: ""
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
setup(t) {
|
|
236
|
+
const { mergedAttrs: e, className: o } = I("mc-tooltip-popper");
|
|
237
|
+
return (s, a) => {
|
|
238
|
+
const n = Me;
|
|
239
|
+
return c(), b(n, M(C(e), { "popper-class": C(o) }), _({ _: 2 }, [
|
|
240
|
+
f(s.$slots, (r, l) => ({
|
|
241
|
+
name: l,
|
|
242
|
+
fn: p(() => [
|
|
243
|
+
m(s.$slots, l)
|
|
244
|
+
])
|
|
245
|
+
}))
|
|
246
|
+
]), 1040, ["popper-class"]);
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
}), We = /* @__PURE__ */ Object.assign({
|
|
250
|
+
name: "MSelect"
|
|
251
|
+
}, {
|
|
252
|
+
__name: "Select",
|
|
253
|
+
setup(t) {
|
|
254
|
+
return (e, o) => {
|
|
255
|
+
const s = $e;
|
|
256
|
+
return c(), b(s, M({
|
|
257
|
+
class: ["m-select2", { solid: e.$attrs.styleType === "solid" }],
|
|
258
|
+
"show-arrow": !1
|
|
259
|
+
}, e.$attrs), _({ _: 2 }, [
|
|
260
|
+
f(e.$slots, (a, n) => ({
|
|
261
|
+
name: n,
|
|
262
|
+
fn: p(() => [
|
|
263
|
+
m(e.$slots, n)
|
|
264
|
+
])
|
|
265
|
+
}))
|
|
266
|
+
]), 1040, ["class"]);
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
}), Ze = /* @__PURE__ */ Object.assign({
|
|
270
|
+
name: "MOption"
|
|
271
|
+
}, {
|
|
272
|
+
__name: "Option",
|
|
273
|
+
setup(t) {
|
|
274
|
+
return (e, o) => {
|
|
275
|
+
const s = ve;
|
|
276
|
+
return c(), b(s, T(B(e.$attrs)), _({ _: 2 }, [
|
|
277
|
+
f(e.$slots, (a, n) => ({
|
|
278
|
+
name: n,
|
|
279
|
+
fn: p(() => [
|
|
280
|
+
m(e.$slots, n)
|
|
281
|
+
])
|
|
282
|
+
}))
|
|
283
|
+
]), 1040);
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
}), He = /* @__PURE__ */ Object.assign({
|
|
287
|
+
name: "MOptionGroup"
|
|
288
|
+
}, {
|
|
289
|
+
__name: "OptionGroup",
|
|
290
|
+
setup(t) {
|
|
291
|
+
return (e, o) => {
|
|
292
|
+
const s = he;
|
|
293
|
+
return c(), b(s, T(B(e.$attrs)), _({ _: 2 }, [
|
|
294
|
+
f(e.$slots, (a, n) => ({
|
|
295
|
+
name: n,
|
|
296
|
+
fn: p(() => [
|
|
297
|
+
m(e.$slots, n)
|
|
298
|
+
])
|
|
299
|
+
}))
|
|
300
|
+
]), 1040);
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
}), Je = /* @__PURE__ */ Object.assign({
|
|
304
|
+
name: "MPagination"
|
|
305
|
+
}, {
|
|
306
|
+
__name: "Pagination",
|
|
307
|
+
setup(t) {
|
|
308
|
+
return (e, o) => {
|
|
309
|
+
const s = ye;
|
|
310
|
+
return c(), b(s, M(e.$attrs, { class: "m-pagination" }), _({ _: 2 }, [
|
|
311
|
+
f(e.$slots, (a, n) => ({
|
|
312
|
+
name: n,
|
|
313
|
+
fn: p(() => [
|
|
314
|
+
m(e.$slots, n)
|
|
315
|
+
])
|
|
316
|
+
}))
|
|
317
|
+
]), 1040);
|
|
318
|
+
};
|
|
319
|
+
}
|
|
320
|
+
}), Qe = /* @__PURE__ */ Object.assign({
|
|
321
|
+
name: "MRadio"
|
|
322
|
+
}, {
|
|
323
|
+
__name: "Radio",
|
|
324
|
+
props: {
|
|
325
|
+
popperClass: {
|
|
326
|
+
type: String,
|
|
327
|
+
default: ""
|
|
328
|
+
}
|
|
329
|
+
},
|
|
330
|
+
setup(t) {
|
|
331
|
+
const { mergedAttrs: e } = I("mc-radio-popper");
|
|
332
|
+
return (o, s) => {
|
|
333
|
+
const a = Ce;
|
|
334
|
+
return c(), b(a, M(C(e), { class: "m-radio" }), _({ _: 2 }, [
|
|
335
|
+
f(o.$slots, (n, r) => ({
|
|
336
|
+
name: r,
|
|
337
|
+
fn: p(() => [
|
|
338
|
+
m(o.$slots, r)
|
|
339
|
+
])
|
|
340
|
+
}))
|
|
341
|
+
]), 1040);
|
|
342
|
+
};
|
|
343
|
+
}
|
|
344
|
+
}), Xe = /* @__PURE__ */ Object.assign({
|
|
345
|
+
name: "MRadioGroup"
|
|
346
|
+
}, {
|
|
347
|
+
__name: "RadioGroup",
|
|
348
|
+
props: {
|
|
349
|
+
popperClass: {
|
|
350
|
+
type: String,
|
|
351
|
+
default: ""
|
|
352
|
+
}
|
|
353
|
+
},
|
|
354
|
+
setup(t) {
|
|
355
|
+
const e = F(), o = y(() => {
|
|
356
|
+
const a = "mc-radio-group-popper";
|
|
357
|
+
return e.popperClass ? `${a} ${e.popperClass}`.trim() : a;
|
|
358
|
+
}), s = y(() => {
|
|
359
|
+
const r = e, { popperClass: a } = r;
|
|
360
|
+
return V(r, ["popperClass"]);
|
|
361
|
+
});
|
|
362
|
+
return (a, n) => {
|
|
363
|
+
const r = Se;
|
|
364
|
+
return c(), b(r, M(s.value, {
|
|
365
|
+
"popper-class": o.value,
|
|
366
|
+
class: "m-radio-group"
|
|
367
|
+
}), _({ _: 2 }, [
|
|
368
|
+
f(a.$slots, (l, g) => ({
|
|
369
|
+
name: g,
|
|
370
|
+
fn: p(() => [
|
|
371
|
+
m(a.$slots, g)
|
|
372
|
+
])
|
|
373
|
+
}))
|
|
374
|
+
]), 1040, ["popper-class"]);
|
|
375
|
+
};
|
|
376
|
+
}
|
|
377
|
+
}), Ye = /* @__PURE__ */ Object.assign({
|
|
378
|
+
name: "MRadioButton"
|
|
379
|
+
}, {
|
|
380
|
+
__name: "RadioButton",
|
|
381
|
+
props: {
|
|
382
|
+
popperClass: {
|
|
383
|
+
type: String,
|
|
384
|
+
default: ""
|
|
385
|
+
}
|
|
386
|
+
},
|
|
387
|
+
setup(t) {
|
|
388
|
+
const { mergedAttrs: e } = I("mc-radio-button-popper");
|
|
389
|
+
return (o, s) => {
|
|
390
|
+
const a = ke;
|
|
391
|
+
return c(), b(a, M(C(e), { class: "m-radio-button" }), _({ _: 2 }, [
|
|
392
|
+
f(o.$slots, (n, r) => ({
|
|
393
|
+
name: r,
|
|
394
|
+
fn: p(() => [
|
|
395
|
+
m(o.$slots, r)
|
|
396
|
+
])
|
|
397
|
+
}))
|
|
398
|
+
]), 1040);
|
|
399
|
+
};
|
|
400
|
+
}
|
|
401
|
+
}), Ke = /* @__PURE__ */ Object.assign({
|
|
402
|
+
name: "MSwitch"
|
|
403
|
+
}, {
|
|
404
|
+
__name: "Switch",
|
|
405
|
+
props: {
|
|
406
|
+
popperClass: {
|
|
407
|
+
type: String,
|
|
408
|
+
default: ""
|
|
409
|
+
}
|
|
410
|
+
},
|
|
411
|
+
setup(t) {
|
|
412
|
+
const { mergedAttrs: e, className: o } = I("mc-switch-popper");
|
|
413
|
+
return (s, a) => {
|
|
414
|
+
const n = Te;
|
|
415
|
+
return c(), b(n, M(C(e), {
|
|
416
|
+
"popper-class": C(o),
|
|
417
|
+
class: "m-switch"
|
|
418
|
+
}), _({ _: 2 }, [
|
|
419
|
+
f(s.$slots, (r, l) => ({
|
|
420
|
+
name: l,
|
|
421
|
+
fn: p(() => [
|
|
422
|
+
m(s.$slots, l)
|
|
423
|
+
])
|
|
424
|
+
}))
|
|
425
|
+
]), 1040, ["popper-class"]);
|
|
426
|
+
};
|
|
427
|
+
}
|
|
428
|
+
}), xe = /* @__PURE__ */ Object.assign({
|
|
429
|
+
name: "MTag"
|
|
430
|
+
}, {
|
|
431
|
+
__name: "Tag",
|
|
432
|
+
setup(t) {
|
|
433
|
+
return (e, o) => {
|
|
434
|
+
const s = Be;
|
|
435
|
+
return c(), b(s, M(e.$attrs, { class: "m-tag" }), _({ _: 2 }, [
|
|
436
|
+
f(e.$slots, (a, n) => ({
|
|
437
|
+
name: n,
|
|
438
|
+
fn: p(() => [
|
|
439
|
+
m(e.$slots, n)
|
|
440
|
+
])
|
|
441
|
+
}))
|
|
442
|
+
]), 1040);
|
|
443
|
+
};
|
|
444
|
+
}
|
|
445
|
+
}), et = /* @__PURE__ */ Object.assign({
|
|
446
|
+
name: "MAlert"
|
|
447
|
+
}, {
|
|
448
|
+
__name: "Alert",
|
|
449
|
+
setup(t) {
|
|
450
|
+
return (e, o) => {
|
|
451
|
+
const s = Ee;
|
|
452
|
+
return c(), b(s, T(B(e.$attrs)), _({ _: 2 }, [
|
|
453
|
+
f(e.$slots, (a, n) => ({
|
|
454
|
+
name: n,
|
|
455
|
+
fn: p(() => [
|
|
456
|
+
m(e.$slots, n)
|
|
457
|
+
])
|
|
458
|
+
}))
|
|
459
|
+
]), 1040);
|
|
460
|
+
};
|
|
461
|
+
}
|
|
462
|
+
}), tt = {
|
|
463
|
+
__name: "Dialog",
|
|
464
|
+
props: /* @__PURE__ */ Q({
|
|
465
|
+
width: {
|
|
466
|
+
type: String,
|
|
467
|
+
default: "440px"
|
|
468
|
+
},
|
|
469
|
+
center: {
|
|
470
|
+
type: Boolean,
|
|
471
|
+
default: !0
|
|
472
|
+
},
|
|
473
|
+
draggable: {
|
|
474
|
+
type: Boolean,
|
|
475
|
+
default: !0
|
|
476
|
+
},
|
|
477
|
+
closeOnClickModal: {
|
|
478
|
+
type: Boolean,
|
|
479
|
+
default: !1
|
|
480
|
+
},
|
|
481
|
+
title: {
|
|
482
|
+
type: String,
|
|
483
|
+
default: ""
|
|
484
|
+
}
|
|
485
|
+
}, {
|
|
486
|
+
modelValue: {
|
|
487
|
+
type: Boolean,
|
|
488
|
+
default: !1
|
|
489
|
+
},
|
|
490
|
+
modelModifiers: {}
|
|
491
|
+
}),
|
|
492
|
+
emits: /* @__PURE__ */ Q(["close"], ["update:modelValue"]),
|
|
493
|
+
setup(t, { emit: e }) {
|
|
494
|
+
const o = oe(t, "modelValue");
|
|
495
|
+
return (s, a) => {
|
|
496
|
+
const n = Oe;
|
|
497
|
+
return c(), h("div", null, [
|
|
498
|
+
P(n, M({
|
|
499
|
+
modelValue: o.value,
|
|
500
|
+
"onUpdate:modelValue": a[0] || (a[0] = (r) => o.value = r),
|
|
501
|
+
width: t.width,
|
|
502
|
+
title: t.title,
|
|
503
|
+
draggable: t.draggable,
|
|
504
|
+
"close-on-click-modal": t.closeOnClickModal,
|
|
505
|
+
center: t.center
|
|
506
|
+
}, s.$attrs, {
|
|
507
|
+
class: "m-dialog",
|
|
508
|
+
"header-class": "m-header"
|
|
509
|
+
}), _({
|
|
510
|
+
default: p(() => [
|
|
511
|
+
a[1] || (a[1] = X("测试组 ", -1)),
|
|
512
|
+
m(s.$slots, "default", {}, void 0, !0)
|
|
513
|
+
]),
|
|
514
|
+
_: 2
|
|
515
|
+
}, [
|
|
516
|
+
s.$slots.header ? {
|
|
517
|
+
name: "header",
|
|
518
|
+
fn: p(({ close: r, titleId: l, titleClass: g }) => [
|
|
519
|
+
m(s.$slots, "header", T(B({ close: r, titleId: l, titleClass: g })), void 0, !0)
|
|
520
|
+
]),
|
|
521
|
+
key: "0"
|
|
522
|
+
} : void 0,
|
|
523
|
+
s.$slots.footer ? {
|
|
524
|
+
name: "footer",
|
|
525
|
+
fn: p(() => [
|
|
526
|
+
m(s.$slots, "footer", {}, void 0, !0)
|
|
527
|
+
]),
|
|
528
|
+
key: "1"
|
|
529
|
+
} : void 0
|
|
530
|
+
]), 1040, ["modelValue", "width", "title", "draggable", "close-on-click-modal", "center"])
|
|
531
|
+
]);
|
|
532
|
+
};
|
|
533
|
+
}
|
|
534
|
+
}, st = /* @__PURE__ */ E(tt, [["__scopeId", "data-v-a9d393b9"]]), ot = /* @__PURE__ */ Object.assign({
|
|
535
|
+
name: "MNotification"
|
|
536
|
+
}, {
|
|
537
|
+
__name: "Notification",
|
|
538
|
+
setup(t) {
|
|
539
|
+
return (e, o) => {
|
|
540
|
+
const s = Pe;
|
|
541
|
+
return c(), b(s, T(B(e.$attrs)), _({ _: 2 }, [
|
|
542
|
+
f(e.$slots, (a, n) => ({
|
|
543
|
+
name: n,
|
|
544
|
+
fn: p(() => [
|
|
545
|
+
m(e.$slots, n)
|
|
546
|
+
])
|
|
547
|
+
}))
|
|
548
|
+
]), 1040);
|
|
549
|
+
};
|
|
550
|
+
}
|
|
551
|
+
}), nt = /* @__PURE__ */ Object.assign({
|
|
552
|
+
name: "MDatePicker"
|
|
553
|
+
}, {
|
|
554
|
+
__name: "DatePicker",
|
|
555
|
+
props: {
|
|
556
|
+
popperClass: {
|
|
557
|
+
type: String,
|
|
558
|
+
default: ""
|
|
559
|
+
}
|
|
560
|
+
},
|
|
561
|
+
setup(t) {
|
|
562
|
+
const { mergedAttrs: e, className: o } = I(
|
|
563
|
+
"mc-datepicker-popper",
|
|
564
|
+
"popperClass"
|
|
565
|
+
);
|
|
566
|
+
return (s, a) => {
|
|
567
|
+
const n = we;
|
|
568
|
+
return c(), b(n, M(C(e), { "popper-class": C(o) }), _({ _: 2 }, [
|
|
569
|
+
f(s.$slots, (r, l) => ({
|
|
570
|
+
name: l,
|
|
571
|
+
fn: p(() => [
|
|
572
|
+
m(s.$slots, l)
|
|
573
|
+
])
|
|
574
|
+
}))
|
|
575
|
+
]), 1040, ["popper-class"]);
|
|
576
|
+
};
|
|
577
|
+
}
|
|
578
|
+
}), at = [
|
|
579
|
+
"404",
|
|
580
|
+
"billing",
|
|
581
|
+
"cart",
|
|
582
|
+
"comments",
|
|
583
|
+
"dashboard",
|
|
584
|
+
"files",
|
|
585
|
+
"inbox",
|
|
586
|
+
"location",
|
|
587
|
+
"network",
|
|
588
|
+
"notifications",
|
|
589
|
+
"orders",
|
|
590
|
+
"records",
|
|
591
|
+
"session",
|
|
592
|
+
"subscription",
|
|
593
|
+
"todo",
|
|
594
|
+
"wishlist"
|
|
595
|
+
], rt = {
|
|
596
|
+
name: "MEmpty"
|
|
597
|
+
}, lt = /* @__PURE__ */ Object.assign(rt, {
|
|
598
|
+
props: {
|
|
599
|
+
image: {
|
|
600
|
+
type: String,
|
|
601
|
+
default: "orders",
|
|
602
|
+
validator: (t) => t.includes("/") || t.includes("http") ? !0 : at.includes(t)
|
|
603
|
+
}
|
|
604
|
+
},
|
|
605
|
+
setup(t) {
|
|
606
|
+
const e = t, o = F(), s = y(() => {
|
|
607
|
+
const l = o, { image: n } = l;
|
|
608
|
+
return V(l, ["image"]);
|
|
609
|
+
}), a = y(() => {
|
|
610
|
+
const { image: n } = e;
|
|
611
|
+
return n.includes("/") || n.includes("http") ? n : `/images/empty/${n}.png`;
|
|
612
|
+
});
|
|
613
|
+
return (n, r) => {
|
|
614
|
+
const l = Ie;
|
|
615
|
+
return c(), b(l, M(s.value, { image: a.value }), _({ _: 2 }, [
|
|
616
|
+
f(n.$slots, (g, $) => ({
|
|
617
|
+
name: $,
|
|
618
|
+
fn: p(() => [
|
|
619
|
+
m(n.$slots, $)
|
|
620
|
+
])
|
|
621
|
+
}))
|
|
622
|
+
]), 1040, ["image"]);
|
|
623
|
+
};
|
|
624
|
+
}
|
|
625
|
+
}), it = /* @__PURE__ */ Object.assign({
|
|
626
|
+
name: "MTable"
|
|
627
|
+
}, {
|
|
628
|
+
__name: "Table",
|
|
629
|
+
setup(t) {
|
|
630
|
+
return (e, o) => {
|
|
631
|
+
const s = Ne;
|
|
632
|
+
return c(), b(s, T(B(e.$attrs)), _({ _: 2 }, [
|
|
633
|
+
f(e.$slots, (a, n) => ({
|
|
634
|
+
name: n,
|
|
635
|
+
fn: p(() => [
|
|
636
|
+
m(e.$slots, n)
|
|
637
|
+
])
|
|
638
|
+
}))
|
|
639
|
+
]), 1040);
|
|
640
|
+
};
|
|
641
|
+
}
|
|
642
|
+
}), ct = /* @__PURE__ */ Object.assign({
|
|
643
|
+
name: "MTableColumn"
|
|
644
|
+
}, {
|
|
645
|
+
__name: "TableColumn",
|
|
646
|
+
setup(t) {
|
|
647
|
+
return (e, o) => {
|
|
648
|
+
const s = je;
|
|
649
|
+
return c(), b(s, M(e.$attrs, { class: "m-table-column" }), _({ _: 2 }, [
|
|
650
|
+
f(e.$slots, (a, n) => ({
|
|
651
|
+
name: n,
|
|
652
|
+
fn: p(() => [
|
|
653
|
+
m(e.$slots, n)
|
|
654
|
+
])
|
|
655
|
+
}))
|
|
656
|
+
]), 1040);
|
|
657
|
+
};
|
|
658
|
+
}
|
|
659
|
+
}), ut = { class: "m-banner__content" }, mt = {
|
|
660
|
+
key: 0,
|
|
661
|
+
class: "m-banner__icon"
|
|
662
|
+
}, pt = { class: "m-banner__text" }, dt = /* @__PURE__ */ Object.assign({
|
|
663
|
+
name: "MBanner"
|
|
664
|
+
}, {
|
|
665
|
+
__name: "Banner",
|
|
666
|
+
props: {
|
|
667
|
+
// 横幅内容
|
|
668
|
+
content: {
|
|
669
|
+
type: String,
|
|
670
|
+
default: ""
|
|
671
|
+
},
|
|
672
|
+
// 横幅类型
|
|
673
|
+
type: {
|
|
674
|
+
type: String,
|
|
675
|
+
default: "info",
|
|
676
|
+
validator: (t) => ["info", "success", "warning", "error"].includes(t)
|
|
677
|
+
},
|
|
678
|
+
// 是否可关闭
|
|
679
|
+
closable: {
|
|
680
|
+
type: Boolean,
|
|
681
|
+
default: !0
|
|
682
|
+
},
|
|
683
|
+
// 是否显示
|
|
684
|
+
visible: {
|
|
685
|
+
type: Boolean,
|
|
686
|
+
default: !0
|
|
687
|
+
},
|
|
688
|
+
// 图标名称
|
|
689
|
+
icon: {
|
|
690
|
+
type: String,
|
|
691
|
+
default: ""
|
|
692
|
+
},
|
|
693
|
+
// 图标大小
|
|
694
|
+
iconSize: {
|
|
695
|
+
type: [String, Number],
|
|
696
|
+
default: "16px"
|
|
697
|
+
},
|
|
698
|
+
// 关闭图标大小
|
|
699
|
+
closeIconSize: {
|
|
700
|
+
type: [String, Number],
|
|
701
|
+
default: "16px"
|
|
702
|
+
},
|
|
703
|
+
// 自定义背景色
|
|
704
|
+
backgroundColor: {
|
|
705
|
+
type: String,
|
|
706
|
+
default: ""
|
|
707
|
+
},
|
|
708
|
+
// 自定义文字颜色
|
|
709
|
+
textColor: {
|
|
710
|
+
type: String,
|
|
711
|
+
default: ""
|
|
712
|
+
},
|
|
713
|
+
// 自定义边框颜色
|
|
714
|
+
borderColor: {
|
|
715
|
+
type: String,
|
|
716
|
+
default: ""
|
|
717
|
+
},
|
|
718
|
+
// 持续时间(毫秒),0 表示不自动关闭
|
|
719
|
+
duration: {
|
|
720
|
+
type: Number,
|
|
721
|
+
default: 0
|
|
722
|
+
}
|
|
723
|
+
},
|
|
724
|
+
emits: ["close", "update:visible"],
|
|
725
|
+
setup(t, { expose: e, emit: o }) {
|
|
726
|
+
const s = G(), a = t, n = o, r = R(a.visible);
|
|
727
|
+
A(() => a.visible, (u) => {
|
|
728
|
+
r.value = u;
|
|
729
|
+
});
|
|
730
|
+
const l = y(() => {
|
|
731
|
+
const u = {};
|
|
732
|
+
return a.backgroundColor && (u.backgroundColor = a.backgroundColor), a.textColor && (u.color = a.textColor), a.borderColor && (u.borderColor = a.borderColor), u;
|
|
733
|
+
}), g = {
|
|
734
|
+
info: "info",
|
|
735
|
+
success: "check-circle",
|
|
736
|
+
warning: "warning",
|
|
737
|
+
error: "close-circle"
|
|
738
|
+
};
|
|
739
|
+
y(() => a.icon || g[a.type]);
|
|
740
|
+
const $ = () => {
|
|
741
|
+
r.value = !1, n("update:visible", !1), n("close");
|
|
742
|
+
};
|
|
743
|
+
return A(r, (u) => {
|
|
744
|
+
u && a.duration > 0 && setTimeout(() => {
|
|
745
|
+
$();
|
|
746
|
+
}, a.duration);
|
|
747
|
+
}), e({
|
|
748
|
+
close: $
|
|
749
|
+
}), (u, v) => t.visible ? (c(), h("div", {
|
|
750
|
+
key: 0,
|
|
751
|
+
class: z(["m-banner", [
|
|
752
|
+
`m-banner--${t.type}`,
|
|
753
|
+
{
|
|
754
|
+
"m-banner--closable": t.closable,
|
|
755
|
+
"m-banner--with-icon": t.icon || C(s).icon
|
|
756
|
+
}
|
|
757
|
+
]]),
|
|
758
|
+
style: ne(l.value)
|
|
759
|
+
}, [
|
|
760
|
+
k("div", ut, [
|
|
761
|
+
t.icon || C(s).icon ? (c(), h("div", mt, [
|
|
762
|
+
m(u.$slots, "icon", {}, () => [
|
|
763
|
+
P(w, {
|
|
764
|
+
name: t.icon,
|
|
765
|
+
size: t.iconSize
|
|
766
|
+
}, null, 8, ["name", "size"])
|
|
767
|
+
], !0)
|
|
768
|
+
])) : O("", !0),
|
|
769
|
+
k("div", pt, [
|
|
770
|
+
m(u.$slots, "default", {}, () => [
|
|
771
|
+
X(Y(t.content), 1)
|
|
772
|
+
], !0)
|
|
773
|
+
]),
|
|
774
|
+
t.closable ? (c(), h("div", {
|
|
775
|
+
key: 1,
|
|
776
|
+
class: "m-banner__close",
|
|
777
|
+
onClick: $
|
|
778
|
+
}, [
|
|
779
|
+
P(w, {
|
|
780
|
+
name: "lucide-x",
|
|
781
|
+
size: t.closeIconSize
|
|
782
|
+
}, null, 8, ["size"])
|
|
783
|
+
])) : O("", !0)
|
|
784
|
+
])
|
|
785
|
+
], 6)) : O("", !0);
|
|
786
|
+
}
|
|
787
|
+
}), _t = /* @__PURE__ */ E(dt, [["__scopeId", "data-v-00c80323"]]), ft = { class: "m-tabs__header" }, bt = { class: "m-tabs__nav" }, gt = ["onClick"], Mt = { class: "m-tabs__item-text" }, $t = { key: 1 }, vt = ["onClick"], ht = { class: "m-tabs__content" }, yt = {
|
|
788
|
+
__name: "Tabs",
|
|
789
|
+
props: {
|
|
790
|
+
// 当前激活的标签页
|
|
791
|
+
modelValue: {
|
|
792
|
+
type: [String, Number],
|
|
793
|
+
default: ""
|
|
794
|
+
},
|
|
795
|
+
// 标签页类型
|
|
796
|
+
type: {
|
|
797
|
+
type: String,
|
|
798
|
+
default: "",
|
|
799
|
+
validator: (t) => ["", "card", "border-card"].includes(t)
|
|
800
|
+
},
|
|
801
|
+
// 标签位置
|
|
802
|
+
tabPosition: {
|
|
803
|
+
type: String,
|
|
804
|
+
default: "top",
|
|
805
|
+
validator: (t) => ["top", "right", "bottom", "left"].includes(t)
|
|
806
|
+
},
|
|
807
|
+
// 是否可关闭
|
|
808
|
+
closable: {
|
|
809
|
+
type: Boolean,
|
|
810
|
+
default: !1
|
|
811
|
+
},
|
|
812
|
+
// 是否可添加
|
|
813
|
+
addable: {
|
|
814
|
+
type: Boolean,
|
|
815
|
+
default: !1
|
|
816
|
+
},
|
|
817
|
+
// 是否可编辑(同时可添加和关闭)
|
|
818
|
+
editable: {
|
|
819
|
+
type: Boolean,
|
|
820
|
+
default: !1
|
|
821
|
+
},
|
|
822
|
+
// 标签宽度是否自撑开
|
|
823
|
+
stretch: {
|
|
824
|
+
type: Boolean,
|
|
825
|
+
default: !1
|
|
826
|
+
},
|
|
827
|
+
// 切换前的钩子函数
|
|
828
|
+
beforeLeave: {
|
|
829
|
+
type: Function,
|
|
830
|
+
default: null
|
|
831
|
+
}
|
|
832
|
+
},
|
|
833
|
+
emits: ["update:modelValue", "tab-click", "tab-change", "tab-remove", "tab-add", "edit"],
|
|
834
|
+
setup(t, { expose: e, emit: o }) {
|
|
835
|
+
const s = t, a = o;
|
|
836
|
+
G();
|
|
837
|
+
const n = R([]), r = R(s.modelValue);
|
|
838
|
+
A(() => s.modelValue, (u) => {
|
|
839
|
+
r.value = u;
|
|
840
|
+
}), A(r, (u) => {
|
|
841
|
+
a("update:modelValue", u), a("tab-change", u);
|
|
842
|
+
}), ae("tabsContext", {
|
|
843
|
+
registerTab: (u) => {
|
|
844
|
+
const v = n.value.findIndex((d) => d.name === u.name);
|
|
845
|
+
v >= 0 ? n.value[v] = u : n.value.push(u), !r.value && n.value.length > 0 && (r.value = n.value[0].name || 0);
|
|
846
|
+
},
|
|
847
|
+
unregisterTab: (u) => {
|
|
848
|
+
const v = n.value.findIndex((d) => d.name === u);
|
|
849
|
+
v >= 0 && n.value.splice(v, 1);
|
|
850
|
+
}
|
|
851
|
+
});
|
|
852
|
+
const l = (u, v) => J(this, null, function* () {
|
|
853
|
+
if (u.disabled) return;
|
|
854
|
+
const d = u.name || v;
|
|
855
|
+
if (r.value !== d) {
|
|
856
|
+
if (s.beforeLeave)
|
|
857
|
+
try {
|
|
858
|
+
if ((yield s.beforeLeave(r.value, d)) === !1) return;
|
|
859
|
+
} catch (S) {
|
|
860
|
+
return;
|
|
861
|
+
}
|
|
862
|
+
r.value = d, a("tab-click", { name: d, index: v, disabled: u.disabled });
|
|
863
|
+
}
|
|
864
|
+
}), g = (u, v) => {
|
|
865
|
+
const d = u.name || v;
|
|
866
|
+
a("tab-remove", d), a("edit", d, "remove");
|
|
867
|
+
}, $ = () => {
|
|
868
|
+
a("tab-add"), a("edit", "", "add");
|
|
869
|
+
};
|
|
870
|
+
return e({
|
|
871
|
+
activeName: y(() => r.value)
|
|
872
|
+
}), (u, v) => (c(), h("div", {
|
|
873
|
+
class: z(["m-tabs", [`m-tabs--${t.type}`, `m-tabs--${t.tabPosition}`]])
|
|
874
|
+
}, [
|
|
875
|
+
k("div", ft, [
|
|
876
|
+
k("div", bt, [
|
|
877
|
+
(c(!0), h(re, null, f(n.value, (d, S) => {
|
|
878
|
+
var U;
|
|
879
|
+
return c(), h("div", {
|
|
880
|
+
key: d.name || S,
|
|
881
|
+
class: z([
|
|
882
|
+
"m-tabs__item",
|
|
883
|
+
{
|
|
884
|
+
"m-tabs__item--active": r.value === (d.name || S),
|
|
885
|
+
"m-tabs__item--disabled": d.disabled,
|
|
886
|
+
"m-tabs__item--closable": d.closable
|
|
887
|
+
}
|
|
888
|
+
]),
|
|
889
|
+
onClick: (x) => l(d, S)
|
|
890
|
+
}, [
|
|
891
|
+
k("span", Mt, [
|
|
892
|
+
(U = d.$slots) != null && U.label ? m(u.$slots, `tab-${d.name || S}`, { key: 0 }, void 0, !0) : (c(), h("span", $t, Y(d.label), 1))
|
|
893
|
+
]),
|
|
894
|
+
d.closable ? (c(), h("span", {
|
|
895
|
+
key: 0,
|
|
896
|
+
class: "m-tabs__item-close",
|
|
897
|
+
onClick: le((x) => g(d, S), ["stop"])
|
|
898
|
+
}, [
|
|
899
|
+
P(w, {
|
|
900
|
+
name: "lucide-x",
|
|
901
|
+
size: 12
|
|
902
|
+
})
|
|
903
|
+
], 8, vt)) : O("", !0)
|
|
904
|
+
], 10, gt);
|
|
905
|
+
}), 128)),
|
|
906
|
+
t.addable || t.editable ? (c(), h("div", {
|
|
907
|
+
key: 0,
|
|
908
|
+
class: "m-tabs__item m-tabs__item--add",
|
|
909
|
+
onClick: $
|
|
910
|
+
}, [
|
|
911
|
+
P(w, {
|
|
912
|
+
name: "plus",
|
|
913
|
+
size: 12
|
|
914
|
+
})
|
|
915
|
+
])) : O("", !0)
|
|
916
|
+
])
|
|
917
|
+
]),
|
|
918
|
+
k("div", ht, [
|
|
919
|
+
m(u.$slots, "default", {}, void 0, !0)
|
|
920
|
+
])
|
|
921
|
+
], 2));
|
|
922
|
+
}
|
|
923
|
+
}, Ct = /* @__PURE__ */ E(yt, [["__scopeId", "data-v-23508d30"]]), St = /* @__PURE__ */ Object.assign({
|
|
924
|
+
name: "MTabPane"
|
|
925
|
+
}, {
|
|
926
|
+
__name: "TabPane",
|
|
927
|
+
props: {
|
|
928
|
+
// 选项卡标题
|
|
929
|
+
label: {
|
|
930
|
+
type: String,
|
|
931
|
+
default: ""
|
|
932
|
+
},
|
|
933
|
+
// 是否禁用
|
|
934
|
+
disabled: {
|
|
935
|
+
type: Boolean,
|
|
936
|
+
default: !1
|
|
937
|
+
},
|
|
938
|
+
// 选项卡名称,用于标识
|
|
939
|
+
name: {
|
|
940
|
+
type: [String, Number],
|
|
941
|
+
default: ""
|
|
942
|
+
},
|
|
943
|
+
// 是否可关闭
|
|
944
|
+
closable: {
|
|
945
|
+
type: Boolean,
|
|
946
|
+
default: !1
|
|
947
|
+
},
|
|
948
|
+
// 是否延迟渲染
|
|
949
|
+
lazy: {
|
|
950
|
+
type: Boolean,
|
|
951
|
+
default: !1
|
|
952
|
+
}
|
|
953
|
+
},
|
|
954
|
+
setup(t) {
|
|
955
|
+
const e = t, o = G(), s = ie("tabsContext"), a = y(() => s ? s.activeName === (e.name || s.tabIndex) : !1);
|
|
956
|
+
return ce(() => {
|
|
957
|
+
if (s) {
|
|
958
|
+
const n = {
|
|
959
|
+
name: e.name,
|
|
960
|
+
label: e.label,
|
|
961
|
+
disabled: e.disabled,
|
|
962
|
+
closable: e.closable,
|
|
963
|
+
$slots: o
|
|
964
|
+
};
|
|
965
|
+
s.registerTab(n);
|
|
966
|
+
}
|
|
967
|
+
}), ue(() => {
|
|
968
|
+
s && s.unregisterTab(e.name);
|
|
969
|
+
}), (n, r) => me((c(), h("div", {
|
|
970
|
+
class: z(["m-tab-pane", {
|
|
971
|
+
"m-tab-pane--active": a.value,
|
|
972
|
+
"m-tab-pane--disabled": t.disabled
|
|
973
|
+
}])
|
|
974
|
+
}, [
|
|
975
|
+
m(n.$slots, "default", {}, void 0, !0)
|
|
976
|
+
], 2)), [
|
|
977
|
+
[pe, a.value]
|
|
978
|
+
]);
|
|
979
|
+
}
|
|
980
|
+
}), kt = /* @__PURE__ */ E(St, [["__scopeId", "data-v-722bb248"]]);
|
|
981
|
+
function L(t) {
|
|
982
|
+
t && t.classList && t.classList.add("mc-ui-override");
|
|
983
|
+
}
|
|
984
|
+
function Tt(t) {
|
|
985
|
+
t && t.$el && L(t.$el);
|
|
986
|
+
}
|
|
987
|
+
function Bt() {
|
|
988
|
+
typeof document != "undefined" && (document.body.classList.add("mc-ui-override"), new MutationObserver((e) => {
|
|
989
|
+
e.forEach((o) => {
|
|
990
|
+
o.addedNodes.forEach((s) => {
|
|
991
|
+
if (s.nodeType === 1 && s.classList) {
|
|
992
|
+
if (s.className && s.className.includes("el-")) {
|
|
993
|
+
const n = s.closest(".mc-ui-override") || s.parentElement;
|
|
994
|
+
n && !n.classList.contains("mc-ui-override") && n.classList.add("mc-ui-override");
|
|
995
|
+
}
|
|
996
|
+
s.querySelectorAll('[class*="el-"]').forEach((n) => {
|
|
997
|
+
const r = n.closest(".mc-ui-override") || n.parentElement;
|
|
998
|
+
r && !r.classList.contains("mc-ui-override") && r.classList.add("mc-ui-override");
|
|
999
|
+
});
|
|
1000
|
+
}
|
|
1001
|
+
});
|
|
1002
|
+
});
|
|
1003
|
+
}).observe(document.body, {
|
|
1004
|
+
childList: !0,
|
|
1005
|
+
subtree: !0
|
|
1006
|
+
}));
|
|
1007
|
+
}
|
|
1008
|
+
function Et(t = '[class*="el-"]') {
|
|
1009
|
+
typeof document != "undefined" && document.querySelectorAll(t).forEach((o) => {
|
|
1010
|
+
const s = o.closest(".mc-ui-override") || o.parentElement;
|
|
1011
|
+
s && !s.classList.contains("mc-ui-override") && s.classList.add("mc-ui-override");
|
|
1012
|
+
});
|
|
1013
|
+
}
|
|
1014
|
+
function Ot(t) {
|
|
1015
|
+
return H(j({}, t), {
|
|
1016
|
+
mounted() {
|
|
1017
|
+
L(this.$el), t.mounted && t.mounted.call(this);
|
|
1018
|
+
},
|
|
1019
|
+
updated() {
|
|
1020
|
+
L(this.$el), t.updated && t.updated.call(this);
|
|
1021
|
+
}
|
|
1022
|
+
});
|
|
1023
|
+
}
|
|
1024
|
+
const Pt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1025
|
+
__proto__: null,
|
|
1026
|
+
addComponentOverride: Tt,
|
|
1027
|
+
addOverrideClass: L,
|
|
1028
|
+
applyGlobalOverride: Bt,
|
|
1029
|
+
createOverrideComponent: Ot,
|
|
1030
|
+
forceRefreshStyles: Et
|
|
1031
|
+
}, Symbol.toStringTag, { value: "Module" })), K = [w, Le, Ve, Re, De, Fe, qe, We, Ze, He, Je, Qe, Xe, Ye, Ke, xe, et, st, ot, nt, lt, it, ct, _t, Ct, kt], i = {};
|
|
1032
|
+
function wt(t) {
|
|
1033
|
+
const e = K.map((o) => {
|
|
1034
|
+
if (o && o.name && typeof o.name == "string") {
|
|
1035
|
+
let s = o.name.toLowerCase();
|
|
1036
|
+
return {
|
|
1037
|
+
mradiogroup: "m-radio-group",
|
|
1038
|
+
mradiobutton: "m-radio-button",
|
|
1039
|
+
mformitem: "m-form-item",
|
|
1040
|
+
moptiongroup: "m-option-group"
|
|
1041
|
+
}[s] || s.replace(/^m/, "m-");
|
|
1042
|
+
}
|
|
1043
|
+
return null;
|
|
1044
|
+
}).filter(Boolean);
|
|
1045
|
+
Object.entries(D).forEach(([o, s]) => {
|
|
1046
|
+
if (s && s.name && typeof s.name == "string" && s.name.startsWith("El")) {
|
|
1047
|
+
const a = "m-" + s.name.slice(2).replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
|
|
1048
|
+
e.includes(a) || t._context.components[a] || t.component(a, s);
|
|
1049
|
+
const n = "M" + s.name.slice(2);
|
|
1050
|
+
i[n] = s;
|
|
1051
|
+
}
|
|
1052
|
+
});
|
|
1053
|
+
}
|
|
1054
|
+
const It = (t) => {
|
|
1055
|
+
typeof window != "undefined" && Promise.resolve().then(() => Pt).then(({ applyGlobalOverride: e }) => {
|
|
1056
|
+
e();
|
|
1057
|
+
}), K.forEach((e) => {
|
|
1058
|
+
if (e && e.name && typeof e.name == "string") {
|
|
1059
|
+
let o = e.name.toLowerCase();
|
|
1060
|
+
o = {
|
|
1061
|
+
mradiogroup: "m-radio-group",
|
|
1062
|
+
mradiobutton: "m-radio-button",
|
|
1063
|
+
mformitem: "m-form-item",
|
|
1064
|
+
moptiongroup: "m-option-group"
|
|
1065
|
+
}[o] || o.replace(/^m/, "m-"), t.component(o, e);
|
|
1066
|
+
}
|
|
1067
|
+
}), wt(t);
|
|
1068
|
+
}, as = { install: It }, rs = D.ElMessage, ls = D.ElMessageBox, is = j({}, i), cs = i.MButtonGroup, us = i.MBreadcrumb, ms = i.MBreadcrumbItem, ps = i.MCarousel, ds = i.MCarouselItem, _s = i.MCascader, fs = i.MCascaderPanel, bs = i.MCheckTag, gs = i.MCalendar, Ms = i.MTimePicker, $s = i.MDateTimePicker, vs = i.MColorPicker, hs = i.MTransfer, ys = i.MTree, Cs = i.MTreeSelect, Ss = i.MUpload, ks = i.MImage, Ts = i.MImageViewer, Bs = i.MBacktop, Es = i.MInfiniteScroll, Os = i.MAffix, Ps = i.MScrollbar, ws = i.MResult, Is = i.MSkeleton, Ns = i.MLoading, js = i.MSpinner, As = i.MProgress, zs = i.MBadge, Ls = i.MAvatar, Vs = i.MImagePreview, Rs = i.MTeleport, Ds = i.MConfigProvider;
|
|
1069
|
+
export {
|
|
1070
|
+
Os as MAffix,
|
|
1071
|
+
et as MAlert,
|
|
1072
|
+
Ls as MAvatar,
|
|
1073
|
+
Bs as MBacktop,
|
|
1074
|
+
zs as MBadge,
|
|
1075
|
+
_t as MBanner,
|
|
1076
|
+
us as MBreadcrumb,
|
|
1077
|
+
ms as MBreadcrumbItem,
|
|
1078
|
+
Le as MButton,
|
|
1079
|
+
cs as MButtonGroup,
|
|
1080
|
+
gs as MCalendar,
|
|
1081
|
+
Ve as MCard,
|
|
1082
|
+
ps as MCarousel,
|
|
1083
|
+
ds as MCarouselItem,
|
|
1084
|
+
_s as MCascader,
|
|
1085
|
+
fs as MCascaderPanel,
|
|
1086
|
+
bs as MCheckTag,
|
|
1087
|
+
vs as MColorPicker,
|
|
1088
|
+
Ds as MConfigProvider,
|
|
1089
|
+
nt as MDatePicker,
|
|
1090
|
+
$s as MDateTimePicker,
|
|
1091
|
+
st as MDialog,
|
|
1092
|
+
lt as MEmpty,
|
|
1093
|
+
De as MForm,
|
|
1094
|
+
Fe as MFormItem,
|
|
1095
|
+
w as MIcon,
|
|
1096
|
+
ks as MImage,
|
|
1097
|
+
Vs as MImagePreview,
|
|
1098
|
+
Ts as MImageViewer,
|
|
1099
|
+
Es as MInfiniteScroll,
|
|
1100
|
+
Re as MInput,
|
|
1101
|
+
Ns as MLoading,
|
|
1102
|
+
rs as MMessage,
|
|
1103
|
+
ls as MMessageBox,
|
|
1104
|
+
ot as MNotification,
|
|
1105
|
+
Je as MPagination,
|
|
1106
|
+
As as MProgress,
|
|
1107
|
+
Qe as MRadio,
|
|
1108
|
+
Ye as MRadioButton,
|
|
1109
|
+
Xe as MRadioGroup,
|
|
1110
|
+
ws as MResult,
|
|
1111
|
+
Ps as MScrollbar,
|
|
1112
|
+
We as MSelect,
|
|
1113
|
+
Is as MSkeleton,
|
|
1114
|
+
js as MSpinner,
|
|
1115
|
+
Ke as MSwitch,
|
|
1116
|
+
kt as MTabPane,
|
|
1117
|
+
it as MTable,
|
|
1118
|
+
ct as MTableColumn,
|
|
1119
|
+
Ct as MTabs,
|
|
1120
|
+
xe as MTag,
|
|
1121
|
+
Rs as MTeleport,
|
|
1122
|
+
Ms as MTimePicker,
|
|
1123
|
+
qe as MTooltip,
|
|
1124
|
+
hs as MTransfer,
|
|
1125
|
+
ys as MTree,
|
|
1126
|
+
Cs as MTreeSelect,
|
|
1127
|
+
Ss as MUpload,
|
|
1128
|
+
Tt as addComponentOverride,
|
|
1129
|
+
L as addOverrideClass,
|
|
1130
|
+
Bt as applyGlobalOverride,
|
|
1131
|
+
Ot as createOverrideComponent,
|
|
1132
|
+
as as default,
|
|
1133
|
+
Et as forceRefreshStyles,
|
|
1134
|
+
is as mComponents
|
|
1135
|
+
};
|
|
1136
|
+
//# sourceMappingURL=index.mjs.map
|