br-dionysus 0.2.0 → 0.3.0
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/br-dionysus.es.js +438 -253
- package/dist/br-dionysus.umd.js +2 -2
- package/dist/index.css +1 -1
- package/dist/packages/SkinConfig/index.d.ts +4 -0
- package/dist/packages/SkinConfig/src/index.vue.d.ts +5 -0
- package/dist/packages/SkinConfig/src/useSkin.d.ts +27 -0
- package/dist/packages/index.d.ts +1 -0
- package/docs/packages/TabPage/docs/demo.vue +0 -1
- package/package.json +1 -1
- package/packages/MInputNumber/docs/README.md +1 -1
- package/packages/MInputNumber/index.ts +6 -6
- package/packages/SkinConfig/docs/README.md +29 -0
- package/packages/SkinConfig/docs/demo.vue +599 -0
- package/packages/SkinConfig/index.ts +10 -0
- package/packages/SkinConfig/src/index.vue +243 -0
- package/packages/SkinConfig/src/useSkin.ts +150 -0
- package/packages/TabPage/docs/demo.vue +0 -1
- package/packages/index.ts +3 -0
- package/packages/list.json +6 -0
- package/script/genNewComp/tplReplacer.js +0 -2
- package/src/App.vue +0 -2
- package/src/assets/theme.scss +22 -0
- package/src/router.ts +5 -0
package/dist/br-dionysus.es.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as W, openBlock as _, createElementBlock as g, renderSlot as K, onMounted as E, ref as B, watch as T, computed as I, nextTick as Q, createCommentVNode as F, createElementVNode as d, normalizeStyle as Y, Fragment as Z, renderList as ee, toDisplayString as ce, withModifiers as de, pushScopeId as te, popScopeId as oe, reactive as ne, resolveComponent as w, createVNode as S, useSlots as ue, unref as h, normalizeClass as me, createBlock as le, withCtx as N, createTextVNode as D } from "vue";
|
|
2
|
+
const pe = /* @__PURE__ */ W({
|
|
3
3
|
__name: "index",
|
|
4
4
|
emits: ["click"],
|
|
5
|
-
setup(
|
|
6
|
-
const
|
|
7
|
-
return (o,
|
|
5
|
+
setup(t, { emit: a }) {
|
|
6
|
+
const e = a;
|
|
7
|
+
return (o, l) => (_(), g("button", {
|
|
8
8
|
class: "my-button",
|
|
9
|
-
onClick:
|
|
9
|
+
onClick: l[0] || (l[0] = (r) => e("click", r))
|
|
10
10
|
}, [
|
|
11
|
-
|
|
11
|
+
K(o.$slots, "default", {}, void 0, !0)
|
|
12
12
|
]));
|
|
13
13
|
}
|
|
14
|
-
}),
|
|
15
|
-
const
|
|
16
|
-
for (const [o,
|
|
17
|
-
|
|
18
|
-
return
|
|
19
|
-
},
|
|
20
|
-
install(
|
|
21
|
-
|
|
14
|
+
}), j = (t, a) => {
|
|
15
|
+
const e = t.__vccOpts || t;
|
|
16
|
+
for (const [o, l] of a)
|
|
17
|
+
e[o] = l;
|
|
18
|
+
return e;
|
|
19
|
+
}, fe = /* @__PURE__ */ j(pe, [["__scopeId", "data-v-2a480934"]]), H = {
|
|
20
|
+
install(t) {
|
|
21
|
+
t.component("my-button", fe);
|
|
22
22
|
}
|
|
23
|
-
},
|
|
24
|
-
function
|
|
25
|
-
return
|
|
23
|
+
}, ve = {}, ye = { class: "my-foo" };
|
|
24
|
+
function he(t, a) {
|
|
25
|
+
return _(), g("div", ye, " 我是测试组件组件 ");
|
|
26
26
|
}
|
|
27
|
-
const
|
|
28
|
-
install(
|
|
29
|
-
|
|
27
|
+
const _e = /* @__PURE__ */ j(ve, [["render", he], ["__scopeId", "data-v-1f1035fb"]]), L = {
|
|
28
|
+
install(t) {
|
|
29
|
+
t.component("my-foo", _e);
|
|
30
30
|
}
|
|
31
|
-
},
|
|
31
|
+
}, A = (t) => (te("data-v-edfffe70"), t = t(), oe(), t), be = { class: "g-box" }, ge = /* @__PURE__ */ A(() => /* @__PURE__ */ d("svg", {
|
|
32
32
|
t: "1704703004061",
|
|
33
33
|
class: "icon",
|
|
34
34
|
viewBox: "0 0 1024 1024",
|
|
@@ -38,16 +38,16 @@ const pe = /* @__PURE__ */ F(de, [["render", me], ["__scopeId", "data-v-1f1035fb
|
|
|
38
38
|
width: "16",
|
|
39
39
|
height: "16"
|
|
40
40
|
}, [
|
|
41
|
-
/* @__PURE__ */
|
|
41
|
+
/* @__PURE__ */ d("path", {
|
|
42
42
|
d: "M671.807 927.804l-415.632-415.804 415.632-415.803 63.445 63.616-352.017 352.209 352.017 352.102z",
|
|
43
43
|
fill: "#272636",
|
|
44
44
|
"p-id": "4357"
|
|
45
45
|
})
|
|
46
|
-
], -1)),
|
|
47
|
-
|
|
48
|
-
],
|
|
49
|
-
|
|
50
|
-
],
|
|
46
|
+
], -1)), ke = [
|
|
47
|
+
ge
|
|
48
|
+
], Ce = { class: "g-dionysus-box" }, Se = ["data-active", "data-active-before", "data-active-after", "onMouseenter", "data-hover", "data-hover-before", "data-hover-after", "onClick"], we = { class: "u-gp" }, xe = /* @__PURE__ */ A(() => /* @__PURE__ */ d("i", { class: "u-icon j-icon" }, null, -1)), Ve = { class: "u-sn" }, $e = ["onClick"], ze = /* @__PURE__ */ A(() => /* @__PURE__ */ d("i", { class: "s-icon" }, null, -1)), Me = [
|
|
49
|
+
ze
|
|
50
|
+
], Ie = { class: "u-icon-box" }, Be = /* @__PURE__ */ A(() => /* @__PURE__ */ d("svg", {
|
|
51
51
|
t: "1704703004061",
|
|
52
52
|
class: "icon",
|
|
53
53
|
viewBox: "0 0 1024 1024",
|
|
@@ -57,14 +57,14 @@ const pe = /* @__PURE__ */ F(de, [["render", me], ["__scopeId", "data-v-1f1035fb
|
|
|
57
57
|
width: "16",
|
|
58
58
|
height: "16"
|
|
59
59
|
}, [
|
|
60
|
-
/* @__PURE__ */
|
|
60
|
+
/* @__PURE__ */ d("path", {
|
|
61
61
|
d: "M671.807 927.804l-415.632-415.804 415.632-415.803 63.445 63.616-352.017 352.209 352.017 352.102z",
|
|
62
62
|
fill: "#272636",
|
|
63
63
|
"p-id": "4357"
|
|
64
64
|
})
|
|
65
|
-
], -1)),
|
|
66
|
-
|
|
67
|
-
],
|
|
65
|
+
], -1)), Fe = [
|
|
66
|
+
Be
|
|
67
|
+
], Pe = /* @__PURE__ */ W({
|
|
68
68
|
__name: "index",
|
|
69
69
|
props: {
|
|
70
70
|
modelValue: { default: () => [] },
|
|
@@ -74,158 +74,158 @@ const pe = /* @__PURE__ */ F(de, [["render", me], ["__scopeId", "data-v-1f1035fb
|
|
|
74
74
|
primaryBackgroundColor: { default: null }
|
|
75
75
|
},
|
|
76
76
|
emits: ["close", "click"],
|
|
77
|
-
setup(
|
|
78
|
-
const
|
|
79
|
-
horizontal:
|
|
80
|
-
vertical:
|
|
81
|
-
}), o =
|
|
82
|
-
|
|
83
|
-
let
|
|
84
|
-
return
|
|
77
|
+
setup(t, { emit: a }) {
|
|
78
|
+
const e = (n) => ({
|
|
79
|
+
horizontal: n.scrollWidth > n.clientWidth,
|
|
80
|
+
vertical: n.scrollHeight > n.clientHeight
|
|
81
|
+
}), o = t, l = (n, m = 100) => {
|
|
82
|
+
n = n.replace("#", "").toLowerCase(), n.length === 3 && (n = n.split("").map((O) => O + O).join(""));
|
|
83
|
+
let i = parseInt(n.substring(0, 2), 16), k = parseInt(n.substring(2, 4), 16), z = parseInt(n.substring(4, 6), 16);
|
|
84
|
+
return i += Math.round((255 - i) * (m / 100)), k += Math.round((255 - k) * (m / 100)), z += Math.round((255 - z) * (m / 100)), i = i.toString(16).padStart(2, "0"), k = k.toString(16).padStart(2, "0"), z = z.toString(16).padStart(2, "0"), `#${i}${k}${z}`;
|
|
85
85
|
};
|
|
86
|
-
|
|
86
|
+
E(() => {
|
|
87
87
|
if (document.documentElement.style.setProperty("--br-dionysus-primary-color", o.primaryColor), o.primaryBackgroundColor)
|
|
88
88
|
return !1;
|
|
89
|
-
document.documentElement.style.setProperty("--br-dionysus-primary-bg-color",
|
|
89
|
+
document.documentElement.style.setProperty("--br-dionysus-primary-bg-color", l(o.primaryColor, 90));
|
|
90
90
|
});
|
|
91
|
-
const
|
|
92
|
-
|
|
91
|
+
const r = B(o.activeKey);
|
|
92
|
+
T(
|
|
93
93
|
() => o.activeKey,
|
|
94
|
-
(
|
|
95
|
-
|
|
94
|
+
(n) => {
|
|
95
|
+
r.value = n;
|
|
96
96
|
}
|
|
97
97
|
);
|
|
98
|
-
const
|
|
99
|
-
key:
|
|
100
|
-
title:
|
|
101
|
-
}))),
|
|
102
|
-
|
|
103
|
-
const
|
|
104
|
-
if (!
|
|
98
|
+
const b = a, c = I(() => o.modelValue.map((n) => ({
|
|
99
|
+
key: n.key,
|
|
100
|
+
title: n.title
|
|
101
|
+
}))), f = () => {
|
|
102
|
+
c.value.forEach((n, m) => {
|
|
103
|
+
const i = ".j-dionysus-list-box .j-li:nth-of-type(" + (m + 1) + ") .j-icon", k = document.querySelector(i);
|
|
104
|
+
if (!k || k.children.length)
|
|
105
105
|
return !1;
|
|
106
|
-
const
|
|
107
|
-
if (!
|
|
106
|
+
const z = document.querySelector('[data-key="' + n.key + '"]');
|
|
107
|
+
if (!z)
|
|
108
108
|
return !1;
|
|
109
|
-
const
|
|
110
|
-
|
|
109
|
+
const O = z.cloneNode(!0);
|
|
110
|
+
k.appendChild(O);
|
|
111
111
|
});
|
|
112
112
|
};
|
|
113
|
-
|
|
114
|
-
() =>
|
|
113
|
+
T(
|
|
114
|
+
() => c.value,
|
|
115
115
|
() => {
|
|
116
|
-
|
|
117
|
-
|
|
116
|
+
Q(() => {
|
|
117
|
+
f();
|
|
118
118
|
});
|
|
119
119
|
}
|
|
120
|
-
),
|
|
121
|
-
|
|
120
|
+
), E(() => {
|
|
121
|
+
f();
|
|
122
122
|
});
|
|
123
|
-
const
|
|
124
|
-
const
|
|
123
|
+
const u = B(!1), s = B(0), v = B(0), $ = I(() => {
|
|
124
|
+
const n = v.value > s.value ? s.value : v.value;
|
|
125
125
|
return {
|
|
126
|
-
transform: "translateX(-" + (
|
|
126
|
+
transform: "translateX(-" + (u.value ? n : 0) + "px)"
|
|
127
127
|
};
|
|
128
|
-
}),
|
|
129
|
-
|
|
130
|
-
},
|
|
131
|
-
|
|
128
|
+
}), p = () => {
|
|
129
|
+
v.value = v.value < 300 ? 0 : v.value - 300;
|
|
130
|
+
}, C = () => {
|
|
131
|
+
v.value = v.value > s.value - 300 ? s.value : v.value + 300;
|
|
132
132
|
}, x = () => {
|
|
133
|
-
const
|
|
134
|
-
if (!
|
|
133
|
+
const n = document.querySelector(".g-tab-page-box");
|
|
134
|
+
if (!n)
|
|
135
135
|
return !1;
|
|
136
|
-
const { horizontal:
|
|
137
|
-
|
|
136
|
+
const { horizontal: m } = e(n);
|
|
137
|
+
u.value = m, m && (s.value = n.scrollWidth - n.clientWidth);
|
|
138
138
|
};
|
|
139
|
-
|
|
140
|
-
() =>
|
|
139
|
+
T(
|
|
140
|
+
() => c.value,
|
|
141
141
|
() => {
|
|
142
|
-
|
|
142
|
+
Q(() => {
|
|
143
143
|
x();
|
|
144
144
|
});
|
|
145
145
|
}
|
|
146
|
-
),
|
|
146
|
+
), E(() => {
|
|
147
147
|
x();
|
|
148
148
|
});
|
|
149
|
-
const
|
|
149
|
+
const V = new ResizeObserver(() => {
|
|
150
150
|
x();
|
|
151
151
|
});
|
|
152
|
-
|
|
153
|
-
const
|
|
154
|
-
if (!
|
|
152
|
+
E(() => {
|
|
153
|
+
const n = document.querySelector(".g-tab-page-box");
|
|
154
|
+
if (!n)
|
|
155
155
|
return !1;
|
|
156
|
-
|
|
156
|
+
V.observe(n);
|
|
157
157
|
});
|
|
158
|
-
const
|
|
159
|
-
var
|
|
160
|
-
const
|
|
161
|
-
return
|
|
162
|
-
}),
|
|
163
|
-
var
|
|
164
|
-
const
|
|
165
|
-
return
|
|
166
|
-
}),
|
|
167
|
-
var
|
|
168
|
-
const
|
|
169
|
-
return
|
|
170
|
-
}),
|
|
171
|
-
var
|
|
172
|
-
const
|
|
173
|
-
return
|
|
174
|
-
}),
|
|
175
|
-
|
|
176
|
-
},
|
|
177
|
-
|
|
158
|
+
const q = I(() => {
|
|
159
|
+
var m;
|
|
160
|
+
const n = c.value.findIndex((i) => i.key === o.activeKey);
|
|
161
|
+
return n === -1 ? -1 : (m = c.value[n - 1]) == null ? void 0 : m.key;
|
|
162
|
+
}), y = I(() => {
|
|
163
|
+
var m;
|
|
164
|
+
const n = c.value.findIndex((i) => i.key === o.activeKey);
|
|
165
|
+
return n === -1 ? -1 : (m = c.value[n + 1]) == null ? void 0 : m.key;
|
|
166
|
+
}), P = B(2), ae = I(() => {
|
|
167
|
+
var m;
|
|
168
|
+
const n = c.value.findIndex((i) => i.key === P.value);
|
|
169
|
+
return n === -1 ? -1 : (m = c.value[n - 1]) == null ? void 0 : m.key;
|
|
170
|
+
}), se = I(() => {
|
|
171
|
+
var m;
|
|
172
|
+
const n = c.value.findIndex((i) => i.key === P.value);
|
|
173
|
+
return n === -1 ? -1 : (m = c.value[n + 1]) == null ? void 0 : m.key;
|
|
174
|
+
}), re = (n) => {
|
|
175
|
+
b("click", n);
|
|
176
|
+
}, ie = (n = []) => {
|
|
177
|
+
b("close", n);
|
|
178
178
|
};
|
|
179
|
-
return (
|
|
180
|
-
|
|
179
|
+
return (n, m) => (_(), g("div", be, [
|
|
180
|
+
u.value ? (_(), g("button", {
|
|
181
181
|
key: 0,
|
|
182
182
|
class: "u-page-btn s-previous-btn",
|
|
183
|
-
onClick:
|
|
184
|
-
},
|
|
185
|
-
|
|
186
|
-
|
|
183
|
+
onClick: p
|
|
184
|
+
}, ke)) : F("", !0),
|
|
185
|
+
d("div", Ce, [
|
|
186
|
+
d("ul", {
|
|
187
187
|
class: "g-tab-page-box j-dionysus-list-box",
|
|
188
|
-
style:
|
|
189
|
-
onMouseleave:
|
|
188
|
+
style: Y($.value),
|
|
189
|
+
onMouseleave: m[0] || (m[0] = (i) => P.value = -1)
|
|
190
190
|
}, [
|
|
191
|
-
(
|
|
191
|
+
(_(!0), g(Z, null, ee(o.modelValue, (i) => (_(), g("li", {
|
|
192
192
|
class: "u-li j-li",
|
|
193
|
-
key:
|
|
194
|
-
"data-active": o.activeKey ===
|
|
195
|
-
"data-active-before":
|
|
196
|
-
"data-active-after":
|
|
197
|
-
onMouseenter: (
|
|
198
|
-
"data-hover":
|
|
199
|
-
"data-hover-before":
|
|
200
|
-
"data-hover-after":
|
|
201
|
-
onClick: (
|
|
193
|
+
key: i.key,
|
|
194
|
+
"data-active": o.activeKey === i.key,
|
|
195
|
+
"data-active-before": q.value === i.key,
|
|
196
|
+
"data-active-after": y.value === i.key,
|
|
197
|
+
onMouseenter: (k) => P.value = i.key,
|
|
198
|
+
"data-hover": P.value === i.key,
|
|
199
|
+
"data-hover-before": ae.value === i.key,
|
|
200
|
+
"data-hover-after": se.value === i.key,
|
|
201
|
+
onClick: (k) => re(i.key)
|
|
202
202
|
}, [
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
203
|
+
d("div", we, [
|
|
204
|
+
xe,
|
|
205
|
+
d("span", Ve, ce(i.title), 1),
|
|
206
|
+
d("div", {
|
|
207
207
|
class: "u-btn",
|
|
208
|
-
onClick:
|
|
209
|
-
},
|
|
208
|
+
onClick: de((k) => ie([i.key]), ["stop"])
|
|
209
|
+
}, Me, 8, $e)
|
|
210
210
|
])
|
|
211
|
-
], 40,
|
|
211
|
+
], 40, Se))), 128))
|
|
212
212
|
], 36)
|
|
213
213
|
]),
|
|
214
|
-
|
|
215
|
-
|
|
214
|
+
d("div", Ie, [
|
|
215
|
+
K(n.$slots, "icon", {}, void 0, !0)
|
|
216
216
|
]),
|
|
217
|
-
|
|
217
|
+
u.value ? (_(), g("button", {
|
|
218
218
|
key: 1,
|
|
219
219
|
class: "u-page-btn s-next-btn",
|
|
220
|
-
onClick:
|
|
221
|
-
},
|
|
220
|
+
onClick: C
|
|
221
|
+
}, Fe)) : F("", !0)
|
|
222
222
|
]));
|
|
223
223
|
}
|
|
224
|
-
}),
|
|
225
|
-
install(
|
|
226
|
-
|
|
224
|
+
}), Ne = /* @__PURE__ */ j(Pe, [["__scopeId", "data-v-edfffe70"]]), R = {
|
|
225
|
+
install(t) {
|
|
226
|
+
t.component("tab-page", Ne);
|
|
227
227
|
}
|
|
228
|
-
},
|
|
228
|
+
}, Ee = ["data-is-table-mini", "data-no-spacing"], Te = ["data-size", "data-thousandth-place", "data-focus", "value", "data-disabled"], je = /* @__PURE__ */ W({
|
|
229
229
|
__name: "index",
|
|
230
230
|
props: {
|
|
231
231
|
modelValue: {
|
|
@@ -274,186 +274,371 @@ const pe = /* @__PURE__ */ F(de, [["render", me], ["__scopeId", "data-v-1f1035fb
|
|
|
274
274
|
}
|
|
275
275
|
},
|
|
276
276
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
277
|
-
setup(
|
|
278
|
-
const
|
|
277
|
+
setup(t, { emit: a }) {
|
|
278
|
+
const e = t, o = ne({
|
|
279
279
|
vValue: null,
|
|
280
280
|
isFocus: !1,
|
|
281
281
|
vSize: null,
|
|
282
282
|
isTableMini: !1
|
|
283
|
-
}),
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
}),
|
|
287
|
-
|
|
283
|
+
}), l = a, r = I(() => (o.vValue || "").toLocaleString("en-US", { maximumFractionDigits: 6 })), b = I(() => e.max >= e.min ? e.max : e.min);
|
|
284
|
+
T(() => e.modelValue, () => {
|
|
285
|
+
c();
|
|
286
|
+
}), T(() => e.size, () => {
|
|
287
|
+
f();
|
|
288
288
|
});
|
|
289
|
-
const
|
|
290
|
-
if (
|
|
289
|
+
const c = () => {
|
|
290
|
+
if (e.modelValue === "" || e.modelValue === null || e.modelValue === void 0)
|
|
291
291
|
return o.vValue = void 0, !1;
|
|
292
|
-
if (
|
|
293
|
-
return
|
|
294
|
-
o.vValue =
|
|
295
|
-
},
|
|
296
|
-
const
|
|
292
|
+
if (e.modelValue > e.max || e.modelValue < e.min)
|
|
293
|
+
return l("update:modelValue", o.vValue), !1;
|
|
294
|
+
o.vValue = e.modelValue;
|
|
295
|
+
}, f = () => {
|
|
296
|
+
const p = {
|
|
297
297
|
large: "large",
|
|
298
298
|
small: "small",
|
|
299
299
|
mini: "mini",
|
|
300
300
|
"table-mini": "mini"
|
|
301
301
|
};
|
|
302
|
-
o.vSize =
|
|
303
|
-
},
|
|
302
|
+
o.vSize = p[e.size], o.isTableMini = e.size === "table-mini";
|
|
303
|
+
}, u = () => {
|
|
304
304
|
if (o.vValue === void 0)
|
|
305
|
-
return
|
|
306
|
-
|
|
307
|
-
},
|
|
308
|
-
if (
|
|
309
|
-
return
|
|
310
|
-
|
|
311
|
-
},
|
|
312
|
-
o.isFocus = !0,
|
|
313
|
-
},
|
|
314
|
-
o.isFocus = !1,
|
|
305
|
+
return l("update:modelValue", null), !1;
|
|
306
|
+
l("update:modelValue", o.vValue);
|
|
307
|
+
}, s = (p) => {
|
|
308
|
+
if (p === void 0)
|
|
309
|
+
return l("update:modelValue", null), !1;
|
|
310
|
+
u(), l("change", p);
|
|
311
|
+
}, v = () => {
|
|
312
|
+
o.isFocus = !0, l("focus", o.vValue);
|
|
313
|
+
}, $ = () => {
|
|
314
|
+
o.isFocus = !1, l("blur", o.vValue);
|
|
315
315
|
};
|
|
316
|
-
return
|
|
317
|
-
const x =
|
|
318
|
-
return
|
|
316
|
+
return c(), f(), (p, C) => {
|
|
317
|
+
const x = w("el-input-number");
|
|
318
|
+
return _(), g("div", {
|
|
319
319
|
class: "g-m-input-number-box",
|
|
320
320
|
"data-is-table-mini": o.isTableMini,
|
|
321
|
-
"data-no-spacing":
|
|
321
|
+
"data-no-spacing": e.noSpacing
|
|
322
322
|
}, [
|
|
323
|
-
|
|
323
|
+
S(x, {
|
|
324
324
|
class: "m-input-number",
|
|
325
325
|
modelValue: o.vValue,
|
|
326
|
-
"onUpdate:modelValue":
|
|
326
|
+
"onUpdate:modelValue": C[0] || (C[0] = (V) => o.vValue = V),
|
|
327
327
|
size: o.vSize,
|
|
328
|
-
min:
|
|
329
|
-
max:
|
|
328
|
+
min: e.min,
|
|
329
|
+
max: b.value,
|
|
330
330
|
controls: !1,
|
|
331
|
-
disabled:
|
|
332
|
-
placeholder:
|
|
333
|
-
step:
|
|
334
|
-
stepStrictly:
|
|
335
|
-
"data-thousandth-place":
|
|
331
|
+
disabled: e.disabled,
|
|
332
|
+
placeholder: e.placeholder,
|
|
333
|
+
step: e.step,
|
|
334
|
+
stepStrictly: e.stepStrictly,
|
|
335
|
+
"data-thousandth-place": e.thousandthPlace,
|
|
336
336
|
"data-focus": o.isFocus,
|
|
337
|
-
noBorder:
|
|
338
|
-
onChange:
|
|
339
|
-
|
|
337
|
+
noBorder: e.noBorder,
|
|
338
|
+
onChange: C[1] || (C[1] = (V) => {
|
|
339
|
+
s(V), u();
|
|
340
340
|
}),
|
|
341
|
-
onFocus:
|
|
342
|
-
onBlur:
|
|
341
|
+
onFocus: v,
|
|
342
|
+
onBlur: $
|
|
343
343
|
}, null, 8, ["modelValue", "size", "min", "max", "disabled", "placeholder", "step", "stepStrictly", "data-thousandth-place", "data-focus", "noBorder"]),
|
|
344
|
-
|
|
344
|
+
e.thousandthPlace ? (_(), g("input", {
|
|
345
345
|
key: 0,
|
|
346
346
|
class: "u-text",
|
|
347
347
|
type: "text",
|
|
348
348
|
"data-size": o.vSize,
|
|
349
|
-
"data-thousandth-place":
|
|
349
|
+
"data-thousandth-place": e.thousandthPlace,
|
|
350
350
|
"data-focus": o.isFocus,
|
|
351
|
-
value:
|
|
352
|
-
"data-disabled":
|
|
351
|
+
value: r.value,
|
|
352
|
+
"data-disabled": e.disabled,
|
|
353
353
|
readonly: ""
|
|
354
|
-
}, null, 8,
|
|
355
|
-
], 8,
|
|
354
|
+
}, null, 8, Te)) : F("", !0)
|
|
355
|
+
], 8, Ee);
|
|
356
356
|
};
|
|
357
357
|
}
|
|
358
|
-
}), Ke = /* @__PURE__ */
|
|
359
|
-
install(
|
|
360
|
-
|
|
358
|
+
}), Ke = /* @__PURE__ */ j(je, [["__scopeId", "data-v-0539abf7"]]), J = {
|
|
359
|
+
install(t) {
|
|
360
|
+
t.component("m-input-number", Ke);
|
|
361
361
|
}
|
|
362
|
-
},
|
|
362
|
+
}, We = { class: "g-inline-box" }, Oe = {
|
|
363
363
|
key: 1,
|
|
364
364
|
class: "m-inline",
|
|
365
365
|
dataCover: ""
|
|
366
|
-
},
|
|
366
|
+
}, Ae = ["data-unfold", "data-single-line"], Ue = { class: "u-btn-gp" }, qe = /* @__PURE__ */ W({
|
|
367
367
|
__name: "index",
|
|
368
368
|
props: {
|
|
369
369
|
minWidth: { default: "200px" },
|
|
370
370
|
maxWidth: { default: "300px" }
|
|
371
371
|
},
|
|
372
372
|
emits: ["switch"],
|
|
373
|
-
setup(
|
|
374
|
-
const
|
|
375
|
-
document.documentElement.style.setProperty("--m-inline-min-width",
|
|
373
|
+
setup(t, { emit: a }) {
|
|
374
|
+
const e = t, o = (p = 24) => Array.from(Array(Number(p) || 24), () => Math.floor(Math.random() * 36).toString(36)).join(""), l = () => {
|
|
375
|
+
document.documentElement.style.setProperty("--m-inline-min-width", e.minWidth), document.documentElement.style.setProperty("--m-inline-max-width", e.maxWidth);
|
|
376
376
|
};
|
|
377
|
-
|
|
378
|
-
() => [
|
|
377
|
+
T(
|
|
378
|
+
() => [e.minWidth, e.maxWidth],
|
|
379
379
|
() => {
|
|
380
|
-
|
|
380
|
+
l();
|
|
381
381
|
}
|
|
382
|
-
),
|
|
383
|
-
const
|
|
384
|
-
const
|
|
385
|
-
if (!
|
|
382
|
+
), l();
|
|
383
|
+
const r = ue(), b = a, c = "j-" + o(8), f = () => {
|
|
384
|
+
const p = document.querySelector("." + c + " [data-box]");
|
|
385
|
+
if (!p)
|
|
386
386
|
return !1;
|
|
387
|
-
const
|
|
388
|
-
return
|
|
389
|
-
},
|
|
390
|
-
|
|
391
|
-
}),
|
|
392
|
-
|
|
393
|
-
const
|
|
394
|
-
if (!
|
|
387
|
+
const C = p.querySelectorAll("." + c + " [data-item]");
|
|
388
|
+
return p.clientWidth < C.length * 200;
|
|
389
|
+
}, u = new ResizeObserver(() => {
|
|
390
|
+
s.value = f();
|
|
391
|
+
}), s = B(!1);
|
|
392
|
+
E(() => {
|
|
393
|
+
const p = document.querySelector("[data-box]");
|
|
394
|
+
if (!p)
|
|
395
395
|
return !1;
|
|
396
|
-
|
|
396
|
+
s.value = f(), u.observe(p);
|
|
397
397
|
});
|
|
398
|
-
const
|
|
399
|
-
|
|
398
|
+
const v = B(!1), $ = () => {
|
|
399
|
+
v.value = !v.value, b("switch", v.value);
|
|
400
400
|
};
|
|
401
|
-
return (
|
|
402
|
-
const x =
|
|
403
|
-
return
|
|
404
|
-
|
|
401
|
+
return (p, C) => {
|
|
402
|
+
const x = w("DArrowRight"), V = w("el-icon");
|
|
403
|
+
return _(), g("div", We, [
|
|
404
|
+
h(r).inlineBtn ? (_(), g("div", {
|
|
405
405
|
key: 0,
|
|
406
406
|
class: "m-inline-btn",
|
|
407
|
-
onClick:
|
|
407
|
+
onClick: f
|
|
408
408
|
}, [
|
|
409
|
-
|
|
410
|
-
])) :
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
class:
|
|
414
|
-
"data-unfold":
|
|
415
|
-
"data-single-line": !
|
|
409
|
+
K(p.$slots, "inlineBtn", {}, void 0, !0)
|
|
410
|
+
])) : F("", !0),
|
|
411
|
+
h(r).default ? (_(), g("div", Oe, [
|
|
412
|
+
d("div", {
|
|
413
|
+
class: me(["u-row", c]),
|
|
414
|
+
"data-unfold": v.value,
|
|
415
|
+
"data-single-line": !s.value
|
|
416
416
|
}, [
|
|
417
|
-
|
|
418
|
-
], 8,
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
417
|
+
K(p.$slots, "default", {}, void 0, !0)
|
|
418
|
+
], 8, Ae),
|
|
419
|
+
d("div", Ue, [
|
|
420
|
+
K(p.$slots, "submitBtn", {}, void 0, !0),
|
|
421
|
+
s.value ? (_(), le(V, {
|
|
422
422
|
key: 0,
|
|
423
423
|
class: "u-btn-unfold",
|
|
424
|
-
onClick:
|
|
425
|
-
"data-unfold":
|
|
424
|
+
onClick: $,
|
|
425
|
+
"data-unfold": v.value
|
|
426
426
|
}, {
|
|
427
|
-
default:
|
|
428
|
-
|
|
427
|
+
default: N(() => [
|
|
428
|
+
S(x)
|
|
429
429
|
]),
|
|
430
430
|
_: 1
|
|
431
|
-
}, 8, ["data-unfold"])) :
|
|
431
|
+
}, 8, ["data-unfold"])) : F("", !0)
|
|
432
432
|
])
|
|
433
|
-
])) :
|
|
433
|
+
])) : F("", !0)
|
|
434
434
|
]);
|
|
435
435
|
};
|
|
436
436
|
}
|
|
437
|
-
}),
|
|
438
|
-
install(
|
|
439
|
-
|
|
437
|
+
}), De = /* @__PURE__ */ j(qe, [["__scopeId", "data-v-6b32beca"]]), X = {
|
|
438
|
+
install(t) {
|
|
439
|
+
t.component("m-inline", De);
|
|
440
440
|
}
|
|
441
|
-
},
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
441
|
+
}, M = (t, a = 100) => {
|
|
442
|
+
t = t.replace("#", "").toLowerCase(), t.length === 3 && (t = t.split("").map((r) => r + r).join(""));
|
|
443
|
+
let e = parseInt(t.substring(0, 2), 16), o = parseInt(t.substring(2, 4), 16), l = parseInt(t.substring(4, 6), 16);
|
|
444
|
+
return a > 0 && (e += Math.round((255 - e) * (a / 100)), o += Math.round((255 - o) * (a / 100)), l += Math.round((255 - l) * (a / 100))), a <= 0 && (e += Math.round(e * (a / 100)), o += Math.round(o * (a / 100)), l += Math.round(l * (a / 100))), e = e.toString(16).padStart(2, "0"), o = o.toString(16).padStart(2, "0"), l = l.toString(16).padStart(2, "0"), `#${e}${o}${l}`;
|
|
445
|
+
}, He = () => {
|
|
446
|
+
const t = {
|
|
447
|
+
darkTheme: !1,
|
|
448
|
+
followSystem: !1,
|
|
449
|
+
primaryColor: "#646CFF"
|
|
450
|
+
};
|
|
451
|
+
localStorage.getItem("skinConfig") === null && localStorage.setItem("skinConfig", JSON.stringify(t));
|
|
452
|
+
const a = ne(JSON.parse(localStorage.getItem("skinConfig"))), e = (c) => {
|
|
453
|
+
a.primaryColor = c, l(), b();
|
|
454
|
+
}, o = () => {
|
|
455
|
+
a.darkTheme = t.darkTheme, a.followSystem = t.followSystem, a.primaryColor = t.primaryColor, l(), b();
|
|
456
|
+
}, l = () => {
|
|
457
|
+
const c = a.darkTheme || a.followSystem && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches, f = (s) => c ? -s : s, u = document.documentElement.style;
|
|
458
|
+
u.setProperty("--el-color-primary", a.primaryColor), u.setProperty("--el-color-primary-dark-2", M(a.primaryColor, f(50))), u.setProperty("--el-color-primary-light-3", M(a.primaryColor, f(25))), u.setProperty("--el-color-primary-light-5", M(a.primaryColor, f(40))), u.setProperty("--el-color-primary-light-7", M(a.primaryColor, f(60))), u.setProperty("--el-color-primary-light-8", M(a.primaryColor, f(75))), u.setProperty("--el-color-primary-light-9", M(a.primaryColor, f(90))), u.setProperty("--m-scrollbar-thumb-color", M(a.primaryColor, f(70))), u.setProperty("--m-scrollbar-thumb-hover-color", M(a.primaryColor, f(50))), r(c);
|
|
459
|
+
}, r = (c = !1) => {
|
|
460
|
+
document.documentElement.setAttribute("data-dark", String(c));
|
|
461
|
+
}, b = () => {
|
|
462
|
+
localStorage.setItem("skinConfig", JSON.stringify(a));
|
|
463
|
+
};
|
|
464
|
+
return {
|
|
465
|
+
skinConfig: a,
|
|
466
|
+
reset: o,
|
|
467
|
+
setPrimaryColor: e,
|
|
468
|
+
apply: l,
|
|
469
|
+
save: b,
|
|
470
|
+
switchDark: r
|
|
471
|
+
};
|
|
472
|
+
}, U = (t) => (te("data-v-b9f65c6d"), t = t(), oe(), t), Le = { class: "g-skin-config-box" }, Re = /* @__PURE__ */ U(() => /* @__PURE__ */ d("svg", {
|
|
473
|
+
t: "1706517168459",
|
|
474
|
+
class: "icon",
|
|
475
|
+
viewBox: "0 0 1024 1024",
|
|
476
|
+
version: "1.1",
|
|
477
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
478
|
+
"p-id": "4378",
|
|
479
|
+
width: "24",
|
|
480
|
+
height: "24"
|
|
481
|
+
}, [
|
|
482
|
+
/* @__PURE__ */ d("path", {
|
|
483
|
+
d: "M533.333333 853.333333c179.2 0 320-145.066667 320-320S708.266667 213.333333 533.333333 213.333333 213.333333 358.4 213.333333 533.333333c0 93.866667 34.133333 132.266667 115.2 157.866667 8.533333 4.266667 12.8 4.266667 21.333334 8.533333 4.266667 0 21.333333 4.266667 21.333333 8.533334 51.2 17.066667 76.8 25.6 98.133333 51.2 17.066667 17.066667 29.866667 38.4 42.666667 59.733333 4.266667 8.533333 8.533333 17.066667 8.533333 21.333333 8.533333 0 8.533333 8.533333 12.8 12.8z m0 42.666667c-59.733333 0-21.333333-42.666667-89.6-110.933333-64-64-273.066667-25.6-273.066666-251.733334C170.666667 332.8 332.8 170.666667 533.333333 170.666667S896 332.8 896 533.333333 733.866667 896 533.333333 896z m72.533334-106.666667c-42.666667 0-76.8-34.133333-76.8-76.8s34.133333-72.533333 76.8-72.533333 76.8 34.133333 76.8 72.533333-34.133333 76.8-76.8 76.8z m0-42.666666c17.066667 0 34.133333-12.8 34.133333-34.133334s-12.8-29.866667-34.133333-29.866666-34.133333 12.8-34.133334 29.866666 17.066667 34.133333 34.133334 34.133334zM640 384c-25.6 0-42.666667-17.066667-42.666667-42.666667s17.066667-42.666667 42.666667-42.666666 42.666667 17.066667 42.666667 42.666666-17.066667 42.666667-42.666667 42.666667z m-119.466667-34.133333c-25.6 0-42.666667-17.066667-42.666666-42.666667s17.066667-42.666667 42.666666-42.666667 42.666667 17.066667 42.666667 42.666667-17.066667 42.666667-42.666667 42.666667zM725.333333 469.333333c-25.6 0-42.666667-17.066667-42.666666-42.666666s17.066667-42.666667 42.666666-42.666667 42.666667 17.066667 42.666667 42.666667-17.066667 42.666667-42.666667 42.666666zM405.333333 384c-25.6 0-42.666667-17.066667-42.666666-42.666667s17.066667-42.666667 42.666666-42.666666 42.666667 17.066667 42.666667 42.666666-17.066667 42.666667-42.666667 42.666667z",
|
|
484
|
+
fill: "#444444",
|
|
485
|
+
"p-id": "4379"
|
|
486
|
+
})
|
|
487
|
+
], -1)), Je = [
|
|
488
|
+
Re
|
|
489
|
+
], Xe = /* @__PURE__ */ U(() => /* @__PURE__ */ d("h2", { class: "u-tt" }, "主题配置", -1)), Ge = { class: "u-box" }, Qe = { class: "u-group" }, Ye = /* @__PURE__ */ U(() => /* @__PURE__ */ d("label", null, "深色主题", -1)), Ze = { class: "u-group" }, et = /* @__PURE__ */ U(() => /* @__PURE__ */ d("label", null, "跟随系统", -1)), tt = { class: "u-list" }, ot = ["onClick"], nt = { class: "u-pc" }, lt = /* @__PURE__ */ W({
|
|
490
|
+
__name: "index",
|
|
491
|
+
setup(t, { expose: a }) {
|
|
492
|
+
const e = B(!1), o = () => {
|
|
493
|
+
e.value = !0;
|
|
494
|
+
}, l = He(), r = l.skinConfig, b = [
|
|
495
|
+
"#1690ff",
|
|
496
|
+
"#419eff",
|
|
497
|
+
"#007aff",
|
|
498
|
+
"#59c8fa",
|
|
499
|
+
"#646CFF",
|
|
500
|
+
"#536dfe",
|
|
501
|
+
"#646cff",
|
|
502
|
+
"#9c28b0",
|
|
503
|
+
"#af52de",
|
|
504
|
+
"#0096c7",
|
|
505
|
+
"#04c1d4",
|
|
506
|
+
"#35c759",
|
|
507
|
+
"#42a047",
|
|
508
|
+
"#7cb342",
|
|
509
|
+
"#c0ca34",
|
|
510
|
+
"#78dec7",
|
|
511
|
+
"#e53834",
|
|
512
|
+
"#d81a60",
|
|
513
|
+
"#f4511e",
|
|
514
|
+
"#fb8c01",
|
|
515
|
+
"#ffb300",
|
|
516
|
+
"#fdd835",
|
|
517
|
+
"#6d4c41",
|
|
518
|
+
"#546e7a"
|
|
519
|
+
], c = (u) => ({
|
|
520
|
+
background: u
|
|
521
|
+
});
|
|
522
|
+
return E(() => {
|
|
523
|
+
l.apply();
|
|
524
|
+
}), a({
|
|
525
|
+
setSkin: (u) => {
|
|
526
|
+
r.darkTheme = u.darkTheme, r.followSystem = u.followSystem, r.primaryColor = u.primaryColor, l.apply(), l.save();
|
|
527
|
+
}
|
|
528
|
+
}), (u, s) => {
|
|
529
|
+
const v = w("el-divider"), $ = w("el-switch"), p = w("Check"), C = w("el-icon"), x = w("el-color-picker"), V = w("el-button"), q = w("el-drawer");
|
|
530
|
+
return _(), g("div", Le, [
|
|
531
|
+
d("div", {
|
|
532
|
+
class: "u-btn",
|
|
533
|
+
onClick: o
|
|
534
|
+
}, Je),
|
|
535
|
+
S(q, {
|
|
536
|
+
modelValue: e.value,
|
|
537
|
+
"onUpdate:modelValue": s[6] || (s[6] = (y) => e.value = y),
|
|
538
|
+
direction: "rtl",
|
|
539
|
+
withHeader: !1,
|
|
540
|
+
size: "300"
|
|
541
|
+
}, {
|
|
542
|
+
default: N(() => [
|
|
543
|
+
Xe,
|
|
544
|
+
d("div", Ge, [
|
|
545
|
+
S(v, { class: "u-box-tt" }, {
|
|
546
|
+
default: N(() => [
|
|
547
|
+
D("主题模式")
|
|
548
|
+
]),
|
|
549
|
+
_: 1
|
|
550
|
+
}),
|
|
551
|
+
d("div", Qe, [
|
|
552
|
+
Ye,
|
|
553
|
+
S($, {
|
|
554
|
+
modelValue: h(r).darkTheme,
|
|
555
|
+
"onUpdate:modelValue": s[0] || (s[0] = (y) => h(r).darkTheme = y),
|
|
556
|
+
onChange: s[1] || (s[1] = (y) => {
|
|
557
|
+
h(l).apply(), h(l).save();
|
|
558
|
+
})
|
|
559
|
+
}, null, 8, ["modelValue"])
|
|
560
|
+
]),
|
|
561
|
+
d("div", Ze, [
|
|
562
|
+
et,
|
|
563
|
+
S($, {
|
|
564
|
+
modelValue: h(r).followSystem,
|
|
565
|
+
"onUpdate:modelValue": s[2] || (s[2] = (y) => h(r).followSystem = y),
|
|
566
|
+
onChange: s[3] || (s[3] = (y) => {
|
|
567
|
+
h(l).apply(), h(l).save();
|
|
568
|
+
})
|
|
569
|
+
}, null, 8, ["modelValue"])
|
|
570
|
+
]),
|
|
571
|
+
S(v, { class: "u-box-tt" }, {
|
|
572
|
+
default: N(() => [
|
|
573
|
+
D("系统主题")
|
|
574
|
+
]),
|
|
575
|
+
_: 1
|
|
576
|
+
}),
|
|
577
|
+
d("ul", tt, [
|
|
578
|
+
(_(), g(Z, null, ee(b, (y) => d("li", {
|
|
579
|
+
class: "u-li",
|
|
580
|
+
key: y
|
|
581
|
+
}, [
|
|
582
|
+
d("div", {
|
|
583
|
+
class: "u-color",
|
|
584
|
+
style: Y(c(y)),
|
|
585
|
+
onClick: (P) => h(l).setPrimaryColor(y)
|
|
586
|
+
}, [
|
|
587
|
+
h(r).primaryColor === y ? (_(), le(C, { key: 0 }, {
|
|
588
|
+
default: N(() => [
|
|
589
|
+
S(p)
|
|
590
|
+
]),
|
|
591
|
+
_: 1
|
|
592
|
+
})) : F("", !0)
|
|
593
|
+
], 12, ot)
|
|
594
|
+
])), 64))
|
|
595
|
+
]),
|
|
596
|
+
d("div", nt, [
|
|
597
|
+
S(x, {
|
|
598
|
+
modelValue: h(r).primaryColor,
|
|
599
|
+
"onUpdate:modelValue": s[4] || (s[4] = (y) => h(r).primaryColor = y),
|
|
600
|
+
"color-format": "hex",
|
|
601
|
+
onChange: s[5] || (s[5] = (y) => h(l).setPrimaryColor(h(r).primaryColor))
|
|
602
|
+
}, null, 8, ["modelValue"])
|
|
603
|
+
]),
|
|
604
|
+
S(V, {
|
|
605
|
+
type: "warning",
|
|
606
|
+
onClick: h(l).reset
|
|
607
|
+
}, {
|
|
608
|
+
default: N(() => [
|
|
609
|
+
D(" 重置当前配置 ")
|
|
610
|
+
]),
|
|
611
|
+
_: 1
|
|
612
|
+
}, 8, ["onClick"])
|
|
613
|
+
])
|
|
614
|
+
]),
|
|
615
|
+
_: 1
|
|
616
|
+
}, 8, ["modelValue"])
|
|
617
|
+
]);
|
|
618
|
+
};
|
|
619
|
+
}
|
|
620
|
+
}), at = /* @__PURE__ */ j(lt, [["__scopeId", "data-v-b9f65c6d"]]), G = {
|
|
621
|
+
install(t) {
|
|
622
|
+
t.component("skin-config", at);
|
|
623
|
+
}
|
|
624
|
+
}, rt = {
|
|
625
|
+
install(t) {
|
|
626
|
+
var a, e, o, l, r, b;
|
|
627
|
+
(a = H.install) == null || a.call(H, t), (e = L.install) == null || e.call(L, t), (o = R.install) == null || o.call(R, t), (l = J.install) == null || l.call(J, t), (r = X.install) == null || r.call(X, t), (b = G.install) == null || b.call(G, t);
|
|
445
628
|
}
|
|
446
629
|
};
|
|
447
630
|
export {
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
631
|
+
fe as Button,
|
|
632
|
+
H as ButtonPlugin,
|
|
633
|
+
_e as Foo,
|
|
634
|
+
L as FooPlugin,
|
|
635
|
+
De as MInline,
|
|
636
|
+
X as MInlinePlugin,
|
|
454
637
|
Ke as MInputNumber,
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
638
|
+
J as MInputNumberPlugin,
|
|
639
|
+
at as SkinConfig,
|
|
640
|
+
G as SkinConfigPlugin,
|
|
641
|
+
Ne as TabPage,
|
|
642
|
+
R as TabPagePlugin,
|
|
643
|
+
rt as default
|
|
459
644
|
};
|