@xiaou66/u-web-ui 0.92.0 → 0.93.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/index.d.ts +861 -4
- package/dist/index.es.js +315 -386
- package/dist/u-web-ui.css +1 -1
- package/package.json +5 -2
- package/dist/components/BackTop/BackTop.vue.d.ts +0 -27
- package/dist/components/BackTop/BackTop.vue.d.ts.map +0 -1
- package/dist/components/BackTop/index.d.ts +0 -3
- package/dist/components/BackTop/index.d.ts.map +0 -1
- package/dist/components/BackTop/interface.d.ts +0 -51
- package/dist/components/BackTop/interface.d.ts.map +0 -1
- package/dist/components/PageHeader/PageHeader.vue.d.ts +0 -26
- package/dist/components/PageHeader/PageHeader.vue.d.ts.map +0 -1
- package/dist/components/PageHeader/index.d.ts +0 -3
- package/dist/components/PageHeader/index.d.ts.map +0 -1
- package/dist/components/PageHeader/interface.d.ts +0 -29
- package/dist/components/PageHeader/interface.d.ts.map +0 -1
- package/dist/components/Result/403.vue.d.ts +0 -4
- package/dist/components/Result/403.vue.d.ts.map +0 -1
- package/dist/components/Result/404.vue.d.ts +0 -4
- package/dist/components/Result/404.vue.d.ts.map +0 -1
- package/dist/components/Result/500.vue.d.ts +0 -4
- package/dist/components/Result/500.vue.d.ts.map +0 -1
- package/dist/components/Result/Result.vue.d.ts +0 -20
- package/dist/components/Result/Result.vue.d.ts.map +0 -1
- package/dist/components/Result/index.d.ts +0 -3
- package/dist/components/Result/index.d.ts.map +0 -1
- package/dist/components/Result/interface.d.ts +0 -52
- package/dist/components/Result/interface.d.ts.map +0 -1
- package/dist/components/Scrollbar/Scrollbar.d.ts +0 -2
- package/dist/components/Scrollbar/Scrollbar.d.ts.map +0 -1
- package/dist/components/Scrollbar/Scrollbar.vue.d.ts +0 -165
- package/dist/components/Scrollbar/Scrollbar.vue.d.ts.map +0 -1
- package/dist/components/Scrollbar/index.d.ts +0 -5
- package/dist/components/Scrollbar/index.d.ts.map +0 -1
- package/dist/components/Scrollbar/interface.d.ts +0 -138
- package/dist/components/Scrollbar/interface.d.ts.map +0 -1
- package/dist/components/Scrollbar/thumb.vue.d.ts +0 -19
- package/dist/components/Scrollbar/thumb.vue.d.ts.map +0 -1
- package/dist/components/Setting/SettingDivision/SettingDivision.vue.d.ts +0 -4
- package/dist/components/Setting/SettingDivision/SettingDivision.vue.d.ts.map +0 -1
- package/dist/components/Setting/SettingDivision/index.d.ts +0 -2
- package/dist/components/Setting/SettingDivision/index.d.ts.map +0 -1
- package/dist/components/Setting/SettingGroup/SettingGroup.vue.d.ts +0 -23
- package/dist/components/Setting/SettingGroup/SettingGroup.vue.d.ts.map +0 -1
- package/dist/components/Setting/SettingGroup/index.d.ts +0 -2
- package/dist/components/Setting/SettingGroup/index.d.ts.map +0 -1
- package/dist/components/Setting/SettingItem/SettingItem.vue.d.ts +0 -33
- package/dist/components/Setting/SettingItem/SettingItem.vue.d.ts.map +0 -1
- package/dist/components/Setting/SettingItem/index.d.ts +0 -2
- package/dist/components/Setting/SettingItem/index.d.ts.map +0 -1
- package/dist/components/Setting/index.d.ts +0 -4
- package/dist/components/Setting/index.d.ts.map +0 -1
- package/dist/components/TimeSelect/TimeSelect.vue.d.ts +0 -190
- package/dist/components/TimeSelect/TimeSelect.vue.d.ts.map +0 -1
- package/dist/components/TimeSelect/index.d.ts +0 -5
- package/dist/components/TimeSelect/index.d.ts.map +0 -1
- package/dist/components/TimeSelect/interface.d.ts +0 -59
- package/dist/components/TimeSelect/interface.d.ts.map +0 -1
- package/dist/components/container/LazyLoader/LazyLoader.vue.d.ts +0 -36
- package/dist/components/container/LazyLoader/LazyLoader.vue.d.ts.map +0 -1
- package/dist/components/container/LazyLoader/index.d.ts +0 -2
- package/dist/components/container/LazyLoader/index.d.ts.map +0 -1
- package/dist/components/container/LazyLoader/useGlobalIntersectionObserver.d.ts +0 -13
- package/dist/components/container/LazyLoader/useGlobalIntersectionObserver.d.ts.map +0 -1
- package/dist/components/container/index.d.ts +0 -2
- package/dist/components/container/index.d.ts.map +0 -1
- package/dist/components/index.d.ts +0 -11
- package/dist/components/index.d.ts.map +0 -1
- package/dist/components/layout/SplitPanel/SplitPanel.vue.d.ts +0 -39
- package/dist/components/layout/SplitPanel/SplitPanel.vue.d.ts.map +0 -1
- package/dist/components/layout/SplitPanel/index.d.ts +0 -3
- package/dist/components/layout/SplitPanel/index.d.ts.map +0 -1
- package/dist/components/layout/SplitPanel/interface.d.ts +0 -83
- package/dist/components/layout/SplitPanel/interface.d.ts.map +0 -1
- package/dist/components/layout/UtoolsLayout/UtoolsBaseLayout.vue.d.ts +0 -20
- package/dist/components/layout/UtoolsLayout/UtoolsBaseLayout.vue.d.ts.map +0 -1
- package/dist/components/layout/UtoolsLayout/UtoolsLayout.vue.d.ts +0 -184
- package/dist/components/layout/UtoolsLayout/UtoolsLayout.vue.d.ts.map +0 -1
- package/dist/components/layout/UtoolsLayout/index.d.ts +0 -3
- package/dist/components/layout/UtoolsLayout/index.d.ts.map +0 -1
- package/dist/components/layout/WebLayout/WebBaseLayout.vue.d.ts +0 -31
- package/dist/components/layout/WebLayout/WebBaseLayout.vue.d.ts.map +0 -1
- package/dist/components/layout/WebLayout/WebLayout.vue.d.ts +0 -18
- package/dist/components/layout/WebLayout/WebLayout.vue.d.ts.map +0 -1
- package/dist/components/layout/WebLayout/index.d.ts +0 -4
- package/dist/components/layout/WebLayout/index.d.ts.map +0 -1
- package/dist/components/layout/WebLayout/interface.d.ts +0 -12
- package/dist/components/layout/WebLayout/interface.d.ts.map +0 -1
- package/dist/components/layout/index.d.ts +0 -4
- package/dist/components/layout/index.d.ts.map +0 -1
- package/dist/components/menu/ContextMenu/ContextMenu.vue.d.ts +0 -35
- package/dist/components/menu/ContextMenu/ContextMenu.vue.d.ts.map +0 -1
- package/dist/components/menu/ContextMenu/ContextMenuDivider.vue.d.ts +0 -4
- package/dist/components/menu/ContextMenu/ContextMenuDivider.vue.d.ts.map +0 -1
- package/dist/components/menu/ContextMenu/ContextMenuGroup.vue.d.ts +0 -20
- package/dist/components/menu/ContextMenu/ContextMenuGroup.vue.d.ts.map +0 -1
- package/dist/components/menu/ContextMenu/ContextMenuItem.vue.d.ts +0 -29
- package/dist/components/menu/ContextMenu/ContextMenuItem.vue.d.ts.map +0 -1
- package/dist/components/menu/ContextMenu/ContextMenuSubmenu.vue.d.ts +0 -32
- package/dist/components/menu/ContextMenu/ContextMenuSubmenu.vue.d.ts.map +0 -1
- package/dist/components/menu/ContextMenu/index.d.ts +0 -7
- package/dist/components/menu/ContextMenu/index.d.ts.map +0 -1
- package/dist/components/menu/ContextMenu/interface.d.ts +0 -102
- package/dist/components/menu/ContextMenu/interface.d.ts.map +0 -1
- package/dist/components/menu/LeftMenu/LeftMenu.vue.d.ts +0 -35
- package/dist/components/menu/LeftMenu/LeftMenu.vue.d.ts.map +0 -1
- package/dist/components/menu/LeftMenu/index.d.ts +0 -3
- package/dist/components/menu/LeftMenu/index.d.ts.map +0 -1
- package/dist/components/menu/LeftMenu/interface.d.ts +0 -60
- package/dist/components/menu/LeftMenu/interface.d.ts.map +0 -1
- package/dist/components/menu/LeftMenu/style/index.d.ts +0 -1
- package/dist/components/menu/LeftMenu/style/index.d.ts.map +0 -1
- package/dist/components/menu/index.d.ts +0 -3
- package/dist/components/menu/index.d.ts.map +0 -1
- package/dist/components/switch/SwitchPlus/SwitchPlus.vue.d.ts +0 -42
- package/dist/components/switch/SwitchPlus/SwitchPlus.vue.d.ts.map +0 -1
- package/dist/components/switch/SwitchPlus/SwitchPlusEnable.vue.d.ts +0 -22
- package/dist/components/switch/SwitchPlus/SwitchPlusEnable.vue.d.ts.map +0 -1
- package/dist/components/switch/SwitchPlus/index.d.ts +0 -4
- package/dist/components/switch/SwitchPlus/index.d.ts.map +0 -1
- package/dist/components/switch/SwitchPlus/interface.d.ts +0 -123
- package/dist/components/switch/SwitchPlus/interface.d.ts.map +0 -1
- package/dist/components/switch/index.d.ts +0 -2
- package/dist/components/switch/index.d.ts.map +0 -1
- package/dist/hooks/index.d.ts +0 -3
- package/dist/hooks/index.d.ts.map +0 -1
- package/dist/hooks/useLoading.d.ts +0 -19
- package/dist/hooks/useLoading.d.ts.map +0 -1
- package/dist/hooks/useTheme.d.ts +0 -13
- package/dist/hooks/useTheme.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/resolver.d.ts +0 -29
- package/dist/resolver.d.ts.map +0 -1
- package/dist/utils/cssUtils.d.ts +0 -3
- package/dist/utils/cssUtils.d.ts.map +0 -1
- package/dist/utils/domUtils.d.ts +0 -15
- package/dist/utils/domUtils.d.ts.map +0 -1
- package/dist/utils/index.d.ts +0 -5
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/typeUtils.d.ts +0 -31
- package/dist/utils/typeUtils.d.ts.map +0 -1
- package/dist/utils/vueUtils.d.ts +0 -11
- package/dist/utils/vueUtils.d.ts.map +0 -1
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Fragment, Teleport, Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode,
|
|
1
|
+
import { Fragment, Teleport, Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, getCurrentInstance, inject, mergeModels, mergeProps, nextTick, normalizeClass, normalizeStyle, onMounted, onUnmounted, openBlock, provide, reactive, ref, renderList, renderSlot, resolveComponent, resolveDynamicComponent, toDisplayString, toHandlers, toRefs, unref, useAttrs, useModel, useSlots, watch, withCtx, withModifiers } from "vue";
|
|
2
2
|
import { ElAside, ElButton, ElContainer, ElDivider, ElHeader, ElIcon, ElMain, ElMenu, ElMenuItem, ElSubMenu } from "element-plus/es";
|
|
3
3
|
import { useRoute, useRouter } from "vue-router";
|
|
4
4
|
import { useEventListener } from "@vueuse/core";
|
|
@@ -82,15 +82,15 @@ var BackTop_default = /* @__PURE__ */ defineComponent({
|
|
|
82
82
|
let { visibleHeight: e } = c;
|
|
83
83
|
d.value = (p.value ? window.pageYOffset : f.value.scrollTop) >= e;
|
|
84
84
|
}
|
|
85
|
-
}),
|
|
85
|
+
}), b = (e) => typeof e == "string" ? (console.log("container: ", document.querySelector(e)), document.querySelector(e)) : e, x = (e, t, n) => {
|
|
86
86
|
e.addEventListener(t, n);
|
|
87
|
-
},
|
|
87
|
+
}, S = (e, t, n) => {
|
|
88
88
|
e.removeEventListener(t, n);
|
|
89
89
|
};
|
|
90
90
|
onMounted(() => {
|
|
91
|
-
f.value = p.value ? document?.documentElement :
|
|
91
|
+
f.value = p.value ? document?.documentElement : b(c.targetContainer), f.value && (x(p.value ? window : f.value, "scroll", h), h());
|
|
92
92
|
}), onUnmounted(() => {
|
|
93
|
-
h.cancel(), f.value &&
|
|
93
|
+
h.cancel(), f.value && S(p.value ? window : f.value, "scroll", h);
|
|
94
94
|
});
|
|
95
95
|
let w = () => {
|
|
96
96
|
if (!f.value) return;
|
|
@@ -100,7 +100,7 @@ var BackTop_default = /* @__PURE__ */ defineComponent({
|
|
|
100
100
|
p.value ? window.scrollTo(0, s) : f.value && (f.value.scrollTop = s), o < 1 && requestAnimationFrame(r);
|
|
101
101
|
};
|
|
102
102
|
requestAnimationFrame(r);
|
|
103
|
-
},
|
|
103
|
+
}, T = computed(() => {
|
|
104
104
|
let { right: e = 28, bottom: t = 50 } = c.position || {};
|
|
105
105
|
return {
|
|
106
106
|
right: `${e}px`,
|
|
@@ -111,7 +111,7 @@ var BackTop_default = /* @__PURE__ */ defineComponent({
|
|
|
111
111
|
default: withCtx(() => [d.value ? (openBlock(), createElementBlock("div", {
|
|
112
112
|
key: 0,
|
|
113
113
|
class: normalizeClass([unref(u), { [`${unref(u)}-${e.size}`]: e.size !== "default" }]),
|
|
114
|
-
style: normalizeStyle(
|
|
114
|
+
style: normalizeStyle(T.value),
|
|
115
115
|
onClick: w
|
|
116
116
|
}, [renderSlot(e.$slots, "default", {}, () => [createElementVNode("button", { class: normalizeClass(`${unref(u)}-btn`) }, [(openBlock(), createElementBlock("svg", {
|
|
117
117
|
class: normalizeClass(`${unref(u)}-icon`),
|
|
@@ -177,7 +177,7 @@ var LeftMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
177
177
|
emits: ["update:collapsed"],
|
|
178
178
|
setup(t, { expose: n }) {
|
|
179
179
|
let r = t, c = useModel(t, "collapsed");
|
|
180
|
-
function
|
|
180
|
+
function u() {
|
|
181
181
|
c.value = !c.value;
|
|
182
182
|
}
|
|
183
183
|
let d = useRouter(), f = useRoute(), p = ref([]);
|
|
@@ -190,17 +190,17 @@ var LeftMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
190
190
|
onMounted(() => {
|
|
191
191
|
h();
|
|
192
192
|
});
|
|
193
|
-
function
|
|
193
|
+
function _(e) {
|
|
194
194
|
d.push({ name: e.name });
|
|
195
195
|
}
|
|
196
|
-
function
|
|
196
|
+
function y(e) {
|
|
197
197
|
return e.children ? e.children.filter((e) => e.meta?.menu) : [];
|
|
198
198
|
}
|
|
199
199
|
return r.refreshEventListener && useEventListener(document, LeftMenuEvents.Refresh, h), n({
|
|
200
|
-
changeCollapsed:
|
|
200
|
+
changeCollapsed: u,
|
|
201
201
|
refreshRouter: h
|
|
202
202
|
}), (t, n) => {
|
|
203
|
-
let r = ElIcon,
|
|
203
|
+
let r = ElIcon, u = ElMenuItem, d = ElSubMenu, m = ElMenu;
|
|
204
204
|
return openBlock(), createElementBlock("div", {
|
|
205
205
|
class: normalizeClass(["left-menu horizontal-collapse-transition", {
|
|
206
206
|
"collapsed-width": c.value,
|
|
@@ -216,24 +216,24 @@ var LeftMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
216
216
|
"popper-class": t.size === "small" ? "u-web-left-menu u-web-left-menu-small" : "u-web-left-menu",
|
|
217
217
|
class: normalizeClass(["u-web-left-menu", { "u-web-left-menu-small": t.size === "small" }])
|
|
218
218
|
}, {
|
|
219
|
-
default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(p.value, (t) => (openBlock(), createElementBlock(Fragment, { key: String(t.name) }, [
|
|
219
|
+
default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(p.value, (t) => (openBlock(), createElementBlock(Fragment, { key: String(t.name) }, [y(t).length > 0 ? (openBlock(), createBlock(d, {
|
|
220
220
|
key: 0,
|
|
221
221
|
index: String(t.name)
|
|
222
222
|
}, {
|
|
223
223
|
title: withCtx(() => [createVNode(r, { class: normalizeClass(t.meta.icon) }, null, 8, ["class"]), createElementVNode("span", null, toDisplayString(t.meta.title), 1)]),
|
|
224
|
-
default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
224
|
+
default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(y(t), (e) => (openBlock(), createBlock(u, {
|
|
225
225
|
key: String(e.name),
|
|
226
226
|
index: String(e.name),
|
|
227
|
-
onClick: (t) =>
|
|
227
|
+
onClick: (t) => _(e)
|
|
228
228
|
}, {
|
|
229
229
|
default: withCtx(() => [createVNode(r, { class: normalizeClass(e.meta.icon) }, null, 8, ["class"]), createElementVNode("span", null, toDisplayString(e.meta.title), 1)]),
|
|
230
230
|
_: 2
|
|
231
231
|
}, 1032, ["index", "onClick"]))), 128))]),
|
|
232
232
|
_: 2
|
|
233
|
-
}, 1032, ["index"])) : (openBlock(), createBlock(
|
|
233
|
+
}, 1032, ["index"])) : (openBlock(), createBlock(u, {
|
|
234
234
|
key: 1,
|
|
235
235
|
index: String(t.name),
|
|
236
|
-
onClick: (e) =>
|
|
236
|
+
onClick: (e) => _(t)
|
|
237
237
|
}, {
|
|
238
238
|
default: withCtx(() => [createVNode(r, { class: normalizeClass(t.meta.icon) }, null, 8, ["class"]), createElementVNode("span", null, toDisplayString(t.meta.title), 1)]),
|
|
239
239
|
_: 2
|
|
@@ -315,69 +315,69 @@ var LeftMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
315
315
|
},
|
|
316
316
|
emits: ["select"],
|
|
317
317
|
setup(e, { emit: t }) {
|
|
318
|
-
let n = e, r = t, i = getBuildCurrentClassPrefix("context-menu", "item"), c = getBuildCurrentClassPrefix("context-menu", "submenu"), l = getBuildCurrentClassPrefix("context-menu", "menu"), u = ref(), d = ref(),
|
|
318
|
+
let n = e, r = t, i = getBuildCurrentClassPrefix("context-menu", "item"), c = getBuildCurrentClassPrefix("context-menu", "submenu"), l = getBuildCurrentClassPrefix("context-menu", "menu"), u = ref(), d = ref(), p = ref(!1), m = reactive({
|
|
319
319
|
left: "0px",
|
|
320
320
|
top: "0px"
|
|
321
|
-
}),
|
|
322
|
-
w &&= (clearTimeout(w), null),
|
|
323
|
-
},
|
|
324
|
-
n.disabled || !u.value || (
|
|
325
|
-
|
|
321
|
+
}), S = inject("handleSelect", null), w = null, T = null, D = !1, O = !1, k = () => {
|
|
322
|
+
w &&= (clearTimeout(w), null), T &&= (clearTimeout(T), null);
|
|
323
|
+
}, A = () => {
|
|
324
|
+
n.disabled || !u.value || (k(), m.left = "100%", m.top = "0px", p.value = !0, nextTick(() => {
|
|
325
|
+
M();
|
|
326
326
|
}));
|
|
327
|
-
},
|
|
328
|
-
!D && !
|
|
329
|
-
!D && !
|
|
327
|
+
}, j = () => {
|
|
328
|
+
!D && !O && (k(), T = setTimeout(() => {
|
|
329
|
+
!D && !O && (p.value = !1);
|
|
330
330
|
}, 100));
|
|
331
|
-
},
|
|
331
|
+
}, M = () => {
|
|
332
332
|
if (!d.value || !u.value) return;
|
|
333
333
|
let e = d.value, t = u.value, n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerWidth, a = window.innerHeight, o = r.right + 4, s = r.left - n.width - 4;
|
|
334
334
|
o + n.width > i && s > 4 ? m.left = "-" + (n.width + 4) + "px" : m.left = "100%", r.top + n.height > a ? m.top = Math.min(0, a - r.top - n.height - 4) + "px" : r.top < 4 ? m.top = 4 - r.top + "px" : m.top = "0px";
|
|
335
|
-
},
|
|
336
|
-
n.disabled || (D = !0,
|
|
337
|
-
|
|
335
|
+
}, N = () => {
|
|
336
|
+
n.disabled || (D = !0, k(), w = setTimeout(() => {
|
|
337
|
+
A();
|
|
338
338
|
}, 150));
|
|
339
339
|
}, F = () => {
|
|
340
|
-
D = !1,
|
|
340
|
+
D = !1, j();
|
|
341
|
+
}, I = () => {
|
|
342
|
+
O = !0, k();
|
|
341
343
|
}, L = () => {
|
|
342
|
-
|
|
343
|
-
}, R = () => {
|
|
344
|
-
|
|
345
|
-
}, z = (e
|
|
346
|
-
f.value = !1, r("select", e, t), h && h(e, t);
|
|
347
|
-
}, B = (e) => {
|
|
344
|
+
O = !1, j();
|
|
345
|
+
}, R = (e, t) => {
|
|
346
|
+
p.value = !1, r("select", e, t), S && S(e, t);
|
|
347
|
+
}, z = (e) => {
|
|
348
348
|
let { value: t, originalEvent: n } = e.detail;
|
|
349
|
-
|
|
349
|
+
R(t, n);
|
|
350
|
+
}, B = (e) => {
|
|
351
|
+
e.preventDefault(), e.stopPropagation(), e.stopImmediatePropagation();
|
|
350
352
|
}, V = (e) => {
|
|
351
353
|
e.preventDefault(), e.stopPropagation(), e.stopImmediatePropagation();
|
|
352
354
|
}, H = (e) => {
|
|
353
|
-
|
|
354
|
-
}, U = (e) => {
|
|
355
|
-
if (!n.disabled) if (e.stopPropagation(), e.preventDefault(), A(), f.value) f.value = !1;
|
|
355
|
+
if (!n.disabled) if (e.stopPropagation(), e.preventDefault(), k(), p.value) p.value = !1;
|
|
356
356
|
else {
|
|
357
357
|
if (!u.value) return;
|
|
358
|
-
m.left = "100%", m.top = "0px",
|
|
359
|
-
|
|
358
|
+
m.left = "100%", m.top = "0px", p.value = !0, nextTick(() => {
|
|
359
|
+
M();
|
|
360
360
|
});
|
|
361
361
|
}
|
|
362
362
|
};
|
|
363
|
-
provide("handleSelect",
|
|
364
|
-
|
|
363
|
+
provide("handleSelect", R), provide("closeMenu", () => {
|
|
364
|
+
p.value = !1;
|
|
365
365
|
});
|
|
366
|
-
let
|
|
367
|
-
if (!
|
|
366
|
+
let U = (e) => {
|
|
367
|
+
if (!p.value) return;
|
|
368
368
|
let t = e.target, n = d.value, r = u.value;
|
|
369
369
|
if (e.button === 2 || e.which === 3) return;
|
|
370
370
|
let i = n && n.contains(t), a = r && r.contains(t);
|
|
371
|
-
!i && !a && (
|
|
371
|
+
!i && !a && (p.value = !1);
|
|
372
|
+
}, W = (e) => {
|
|
373
|
+
e.key === "Escape" && p.value && (p.value = !1);
|
|
372
374
|
}, G = (e) => {
|
|
373
|
-
|
|
374
|
-
}, K = (e) => {
|
|
375
|
-
f.value && (e.preventDefault(), e.stopPropagation(), e.stopImmediatePropagation());
|
|
375
|
+
p.value && (e.preventDefault(), e.stopPropagation(), e.stopImmediatePropagation());
|
|
376
376
|
};
|
|
377
377
|
return onMounted(() => {
|
|
378
|
-
document.addEventListener("click",
|
|
378
|
+
document.addEventListener("click", U), document.addEventListener("mousedown", U), document.addEventListener("keydown", W), document.addEventListener("contextmenu", G);
|
|
379
379
|
}), onUnmounted(() => {
|
|
380
|
-
|
|
380
|
+
k(), document.removeEventListener("click", U), document.removeEventListener("mousedown", U), document.removeEventListener("keydown", W), document.removeEventListener("contextmenu", G);
|
|
381
381
|
}), (e, t) => (openBlock(), createElementBlock("div", {
|
|
382
382
|
ref_key: "triggerRef",
|
|
383
383
|
ref: u,
|
|
@@ -386,13 +386,13 @@ var LeftMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
386
386
|
unref(c)(),
|
|
387
387
|
{
|
|
388
388
|
[unref(i)("disabled")]: e.disabled,
|
|
389
|
-
[unref(c)("active")]:
|
|
389
|
+
[unref(c)("active")]: p.value
|
|
390
390
|
}
|
|
391
391
|
]),
|
|
392
|
-
onContextmenu: withModifiers(
|
|
393
|
-
onMouseenter:
|
|
392
|
+
onContextmenu: withModifiers(B, ["prevent", "stop"]),
|
|
393
|
+
onMouseenter: N,
|
|
394
394
|
onMouseleave: F,
|
|
395
|
-
onClick:
|
|
395
|
+
onClick: H
|
|
396
396
|
}, [
|
|
397
397
|
e.icon ? (openBlock(), createElementBlock("span", {
|
|
398
398
|
key: 0,
|
|
@@ -400,16 +400,16 @@ var LeftMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
400
400
|
}, toDisplayString(e.icon), 3)) : createCommentVNode("", !0),
|
|
401
401
|
createElementVNode("span", { class: normalizeClass(unref(i)("label")) }, toDisplayString(e.label), 3),
|
|
402
402
|
createElementVNode("span", { class: normalizeClass(unref(c)("arrow")) }, "▶", 2),
|
|
403
|
-
|
|
403
|
+
p.value ? (openBlock(), createElementBlock("div", {
|
|
404
404
|
key: 1,
|
|
405
405
|
ref_key: "submenuRef",
|
|
406
406
|
ref: d,
|
|
407
407
|
class: normalizeClass([unref(l)(), unref(c)("popup")]),
|
|
408
408
|
style: normalizeStyle(m),
|
|
409
|
-
onContextmenu: withModifiers(
|
|
410
|
-
onMouseenter:
|
|
411
|
-
onMouseleave:
|
|
412
|
-
onContextMenuSelect:
|
|
409
|
+
onContextmenu: withModifiers(V, ["prevent", "stop"]),
|
|
410
|
+
onMouseenter: I,
|
|
411
|
+
onMouseleave: L,
|
|
412
|
+
onContextMenuSelect: z
|
|
413
413
|
}, [renderSlot(e.$slots, "default")], 38)) : createCommentVNode("", !0)
|
|
414
414
|
], 34));
|
|
415
415
|
}
|
|
@@ -425,56 +425,56 @@ var LeftMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
425
425
|
},
|
|
426
426
|
emits: ["select"],
|
|
427
427
|
setup(r, { emit: c }) {
|
|
428
|
-
let
|
|
428
|
+
let u = r, d = c, f = getBuildCurrentClassPrefix("context-menu"), p = ref(), S = ref(), w = ref(!1), T = reactive({
|
|
429
429
|
left: "0px",
|
|
430
430
|
top: "0px"
|
|
431
431
|
});
|
|
432
|
-
function
|
|
433
|
-
let e = Array.isArray(
|
|
434
|
-
return e.includes("click") && (t.onClick =
|
|
432
|
+
function E() {
|
|
433
|
+
let e = Array.isArray(u.trigger) ? u.trigger : [u.trigger], t = {};
|
|
434
|
+
return e.includes("click") && (t.onClick = D), e.includes("context-menu") && (t.onContextmenu = D), t;
|
|
435
435
|
}
|
|
436
|
-
let
|
|
437
|
-
e.preventDefault(), e.stopPropagation(),
|
|
438
|
-
|
|
436
|
+
let D = (e) => {
|
|
437
|
+
e.preventDefault(), e.stopPropagation(), T.left = e.clientX + "px", T.top = e.clientY + "px", w.value = !0, nextTick(() => {
|
|
438
|
+
O(e.clientX, e.clientY);
|
|
439
439
|
});
|
|
440
|
-
},
|
|
441
|
-
if (!
|
|
442
|
-
let n =
|
|
443
|
-
e + n.width > r && (a = r - n.width - 4), t + n.height > i && (o = i - n.height - 4), a = Math.max(4, a), o = Math.max(4, o),
|
|
444
|
-
},
|
|
440
|
+
}, O = (e, t) => {
|
|
441
|
+
if (!S.value) return;
|
|
442
|
+
let n = S.value.getBoundingClientRect(), r = window.innerWidth, i = window.innerHeight, a = e, o = t;
|
|
443
|
+
e + n.width > r && (a = r - n.width - 4), t + n.height > i && (o = i - n.height - 4), a = Math.max(4, a), o = Math.max(4, o), T.left = a + "px", T.top = o + "px";
|
|
444
|
+
}, k = () => {
|
|
445
445
|
w.value = !1;
|
|
446
|
-
},
|
|
447
|
-
d("select", e, t),
|
|
448
|
-
},
|
|
446
|
+
}, A = (e, t) => {
|
|
447
|
+
d("select", e, t), u.hideOnSelect && (w.value = !1);
|
|
448
|
+
}, j = (e) => {
|
|
449
449
|
if (!w.value) return;
|
|
450
|
-
let t = e.target, n =
|
|
450
|
+
let t = e.target, n = S.value, r = p.value;
|
|
451
451
|
if (e.button === 2 || e.which === 3) return;
|
|
452
452
|
let i = n && n.contains(t), a = r && r.contains(t);
|
|
453
453
|
!i && !a && (w.value = !1);
|
|
454
|
-
},
|
|
454
|
+
}, M = (e) => {
|
|
455
455
|
e.key === "Escape" && w.value && (w.value = !1);
|
|
456
|
-
},
|
|
456
|
+
}, F = (e) => {
|
|
457
457
|
w.value && (e.preventDefault(), e.stopPropagation(), e.stopImmediatePropagation());
|
|
458
458
|
};
|
|
459
|
-
return provide("handleSelect",
|
|
459
|
+
return provide("handleSelect", A), provide("closeMenu", () => {
|
|
460
460
|
w.value = !1;
|
|
461
461
|
}), onMounted(() => {
|
|
462
|
-
document.addEventListener("click",
|
|
462
|
+
document.addEventListener("click", j), document.addEventListener("mousedown", j), document.addEventListener("keydown", M), document.addEventListener("contextmenu", F);
|
|
463
463
|
}), onUnmounted(() => {
|
|
464
|
-
document.removeEventListener("click",
|
|
464
|
+
document.removeEventListener("click", j), document.removeEventListener("mousedown", j), document.removeEventListener("keydown", M), document.removeEventListener("contextmenu", F);
|
|
465
465
|
}), (r, c) => (openBlock(), createElementBlock(Fragment, null, [
|
|
466
466
|
createElementVNode("div", mergeProps({
|
|
467
467
|
ref_key: "triggerRef",
|
|
468
468
|
ref: p,
|
|
469
469
|
class: unref(f)("trigger")
|
|
470
|
-
}, { ...
|
|
470
|
+
}, { ...E() }), [renderSlot(r.$slots, "default")], 16),
|
|
471
471
|
(openBlock(), createBlock(Teleport, { to: "body" }, [createVNode(Transition, { name: unref(f)("menu-transition") }, {
|
|
472
472
|
default: withCtx(() => [w.value ? (openBlock(), createElementBlock("div", {
|
|
473
473
|
key: 0,
|
|
474
474
|
ref_key: "menuRef",
|
|
475
|
-
ref:
|
|
476
|
-
class: normalizeClass([unref(f)("menu"), unref(f)(`menu-${
|
|
477
|
-
style: normalizeStyle(
|
|
475
|
+
ref: S,
|
|
476
|
+
class: normalizeClass([unref(f)("menu"), unref(f)(`menu-${u.size}`)]),
|
|
477
|
+
style: normalizeStyle(T),
|
|
478
478
|
onContextmenu: c[0] ||= withModifiers(() => {}, ["prevent"])
|
|
479
479
|
}, [renderSlot(r.$slots, "content")], 38)) : createCommentVNode("", !0)]),
|
|
480
480
|
_: 3
|
|
@@ -482,8 +482,8 @@ var LeftMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
482
482
|
(openBlock(), createBlock(Teleport, { to: "body" }, [w.value ? (openBlock(), createElementBlock("div", {
|
|
483
483
|
key: 0,
|
|
484
484
|
class: normalizeClass(unref(f)("mask")),
|
|
485
|
-
onClick:
|
|
486
|
-
onContextmenu: withModifiers(
|
|
485
|
+
onClick: k,
|
|
486
|
+
onContextmenu: withModifiers(k, ["prevent"])
|
|
487
487
|
}, null, 34)) : createCommentVNode("", !0)]))
|
|
488
488
|
], 64));
|
|
489
489
|
}
|
|
@@ -541,7 +541,7 @@ var LeftMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
541
541
|
"update:size"
|
|
542
542
|
],
|
|
543
543
|
setup(e, { emit: t }) {
|
|
544
|
-
let n = e, c = t, { direction: l, size: u, defaultSize: d, min: f, max: p } = toRefs(n), m = ref(0),
|
|
544
|
+
let n = e, c = t, { direction: l, size: u, defaultSize: d, min: f, max: p } = toRefs(n), m = ref(0), y = ref(), b = ref(), x = getClassPrefix("split-panel"), S = getClassPrefix("split-trigger"), w = ref(d.value);
|
|
545
545
|
watch(u, (e) => {
|
|
546
546
|
e !== void 0 && (w.value = e);
|
|
547
547
|
}, { immediate: !0 });
|
|
@@ -553,116 +553,116 @@ var LeftMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
553
553
|
isPx: n === "px"
|
|
554
554
|
};
|
|
555
555
|
}
|
|
556
|
-
let
|
|
556
|
+
let D = computed(() => E(w.value)), k = computed(() => l.value === "horizontal"), A = computed(() => [x, {
|
|
557
|
+
[`${x}-horizontal`]: k.value,
|
|
558
|
+
[`${x}-vertical`]: !k.value
|
|
559
|
+
}]), j = computed(() => [S, {
|
|
557
560
|
[`${S}-horizontal`]: k.value,
|
|
558
|
-
[`${S}-vertical`]: !k.value
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
[`${C}-disabled`]: n.disabled
|
|
563
|
-
}]), N = computed(() => {
|
|
564
|
-
let { size: e, unit: t, isPx: n } = O.value;
|
|
561
|
+
[`${S}-vertical`]: !k.value,
|
|
562
|
+
[`${S}-disabled`]: n.disabled
|
|
563
|
+
}]), P = computed(() => {
|
|
564
|
+
let { size: e, unit: t, isPx: n } = D.value;
|
|
565
565
|
return { flex: `0 0 calc(${n ? e : e * 100}${t} - ${m.value / 2}px)` };
|
|
566
566
|
});
|
|
567
|
-
function
|
|
567
|
+
function F({ size: e, defaultSize: t = "0px", containerSize: n }) {
|
|
568
568
|
let r = E(e ?? t);
|
|
569
569
|
return r.isPx ? r.size : r.size * n;
|
|
570
570
|
}
|
|
571
|
-
function
|
|
571
|
+
function I(e, t) {
|
|
572
572
|
return parseFloat(e) / parseFloat(t);
|
|
573
573
|
}
|
|
574
|
-
let
|
|
574
|
+
let L = {
|
|
575
575
|
startPageX: 0,
|
|
576
576
|
startPageY: 0,
|
|
577
577
|
startContainerSize: 0,
|
|
578
578
|
startSize: 0
|
|
579
579
|
};
|
|
580
|
-
async function
|
|
581
|
-
let e = () => k.value ?
|
|
582
|
-
return (!
|
|
580
|
+
async function R() {
|
|
581
|
+
let e = () => k.value ? y.value?.clientWidth || 0 : y.value?.clientHeight || 0;
|
|
582
|
+
return (!y.value || !e()) && await nextTick(), e();
|
|
583
583
|
}
|
|
584
|
-
function
|
|
584
|
+
function z(e, t) {
|
|
585
585
|
if (!t) return;
|
|
586
|
-
let n =
|
|
586
|
+
let n = D.value.isPx ? `${e}px` : I(e, t);
|
|
587
587
|
w.value !== n && (w.value = n, c("update:size", n));
|
|
588
588
|
}
|
|
589
|
-
function
|
|
590
|
-
let n =
|
|
589
|
+
function B(e, t) {
|
|
590
|
+
let n = F({
|
|
591
591
|
size: e,
|
|
592
592
|
containerSize: t
|
|
593
|
-
}), r = f.value === void 0 ? 0 :
|
|
593
|
+
}), r = f.value === void 0 ? 0 : F({
|
|
594
594
|
size: f.value,
|
|
595
595
|
defaultSize: "0px",
|
|
596
596
|
containerSize: t
|
|
597
|
-
}), i = p.value === void 0 ? t :
|
|
597
|
+
}), i = p.value === void 0 ? t : F({
|
|
598
598
|
size: p.value,
|
|
599
599
|
defaultSize: `${t}px`,
|
|
600
600
|
containerSize: t
|
|
601
601
|
}), a = n;
|
|
602
602
|
return a = Math.max(a, r), a = Math.min(a, i), a;
|
|
603
603
|
}
|
|
604
|
-
function
|
|
605
|
-
return
|
|
604
|
+
function V({ startContainerSize: e, startSize: t, startPosition: n, endPosition: r }) {
|
|
605
|
+
return B(`${F({
|
|
606
606
|
size: t,
|
|
607
607
|
containerSize: e
|
|
608
608
|
}) + (r - n)}px`, e);
|
|
609
609
|
}
|
|
610
|
-
function
|
|
611
|
-
c("moving", e),
|
|
612
|
-
startContainerSize:
|
|
613
|
-
startSize:
|
|
614
|
-
startPosition:
|
|
610
|
+
function H(e) {
|
|
611
|
+
c("moving", e), z(k.value ? V({
|
|
612
|
+
startContainerSize: L.startContainerSize,
|
|
613
|
+
startSize: L.startSize,
|
|
614
|
+
startPosition: L.startPageX,
|
|
615
615
|
endPosition: e.pageX
|
|
616
|
-
}) :
|
|
617
|
-
startContainerSize:
|
|
618
|
-
startSize:
|
|
619
|
-
startPosition:
|
|
616
|
+
}) : V({
|
|
617
|
+
startContainerSize: L.startContainerSize,
|
|
618
|
+
startSize: L.startSize,
|
|
619
|
+
startPosition: L.startPageY,
|
|
620
620
|
endPosition: e.pageY
|
|
621
|
-
}),
|
|
621
|
+
}), L.startContainerSize);
|
|
622
622
|
}
|
|
623
|
-
function
|
|
624
|
-
window.removeEventListener("mousemove",
|
|
623
|
+
function U(e) {
|
|
624
|
+
window.removeEventListener("mousemove", H), window.removeEventListener("mouseup", U), window.removeEventListener("contextmenu", U), document.body.style.cursor = "default", c("moveEnd", e);
|
|
625
625
|
}
|
|
626
|
-
async function
|
|
627
|
-
n.disabled || (c("moveStart", e),
|
|
626
|
+
async function W(e) {
|
|
627
|
+
n.disabled || (c("moveStart", e), L.startPageX = e.pageX, L.startPageY = e.pageY, L.startContainerSize = await R(), L.startSize = w.value, window.addEventListener("mousemove", H), window.addEventListener("mouseup", U), window.addEventListener("contextmenu", U), document.body.style.cursor = k.value ? "col-resize" : "row-resize");
|
|
628
628
|
}
|
|
629
|
-
function
|
|
629
|
+
function G() {
|
|
630
630
|
if (b.value) {
|
|
631
631
|
let { width: e, height: t } = b.value.getBoundingClientRect();
|
|
632
632
|
m.value = k.value ? e || 0 : t || 0;
|
|
633
633
|
}
|
|
634
634
|
}
|
|
635
635
|
return onMounted(async () => {
|
|
636
|
-
let e = await
|
|
637
|
-
B(
|
|
636
|
+
let e = await R();
|
|
637
|
+
z(B(w.value, e), e), G();
|
|
638
638
|
let t = new ResizeObserver(() => {
|
|
639
|
-
|
|
639
|
+
G();
|
|
640
640
|
});
|
|
641
641
|
return b.value && t.observe(b.value), () => {
|
|
642
642
|
t.disconnect();
|
|
643
643
|
};
|
|
644
644
|
}), (e, t) => (openBlock(), createBlock(resolveDynamicComponent(e.component), {
|
|
645
645
|
ref_key: "wrapperRef",
|
|
646
|
-
ref:
|
|
647
|
-
class: normalizeClass(
|
|
646
|
+
ref: y,
|
|
647
|
+
class: normalizeClass(A.value)
|
|
648
648
|
}, {
|
|
649
649
|
default: withCtx(() => [
|
|
650
650
|
createElementVNode("div", {
|
|
651
|
-
class: normalizeClass([`${unref(
|
|
652
|
-
style: normalizeStyle(
|
|
651
|
+
class: normalizeClass([`${unref(x)}-pane`, `${unref(x)}-pane-first`]),
|
|
652
|
+
style: normalizeStyle(P.value)
|
|
653
653
|
}, [renderSlot(e.$slots, "first")], 6),
|
|
654
654
|
e.disabled ? createCommentVNode("", !0) : (openBlock(), createElementBlock("div", {
|
|
655
655
|
key: 0,
|
|
656
656
|
ref_key: "triggerRef",
|
|
657
657
|
ref: b,
|
|
658
|
-
class: normalizeClass(
|
|
659
|
-
onMousedown:
|
|
660
|
-
}, [renderSlot(e.$slots, "resize-trigger", {}, () => [createElementVNode("div", { class: normalizeClass(`${unref(
|
|
661
|
-
createElementVNode("div", { class: normalizeClass(`${unref(
|
|
662
|
-
createElementVNode("div", { class: normalizeClass(`${unref(
|
|
663
|
-
createElementVNode("div", { class: normalizeClass(`${unref(
|
|
658
|
+
class: normalizeClass(j.value),
|
|
659
|
+
onMousedown: W
|
|
660
|
+
}, [renderSlot(e.$slots, "resize-trigger", {}, () => [createElementVNode("div", { class: normalizeClass(`${unref(S)}-icon`) }, [renderSlot(e.$slots, "resize-trigger-icon", {}, () => [
|
|
661
|
+
createElementVNode("div", { class: normalizeClass(`${unref(S)}-line`) }, null, 2),
|
|
662
|
+
createElementVNode("div", { class: normalizeClass(`${unref(S)}-line`) }, null, 2),
|
|
663
|
+
createElementVNode("div", { class: normalizeClass(`${unref(S)}-line`) }, null, 2)
|
|
664
664
|
])], 2)])], 34)),
|
|
665
|
-
createElementVNode("div", { class: normalizeClass([`${unref(
|
|
665
|
+
createElementVNode("div", { class: normalizeClass([`${unref(x)}-pane`, `${unref(x)}-pane-second`]) }, [renderSlot(e.$slots, "second")], 2)
|
|
666
666
|
]),
|
|
667
667
|
_: 3
|
|
668
668
|
}, 8, ["class"]));
|
|
@@ -684,7 +684,7 @@ var LeftMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
684
684
|
});
|
|
685
685
|
};
|
|
686
686
|
}
|
|
687
|
-
}), _hoisted_1$
|
|
687
|
+
}), _hoisted_1$4 = { class: "utools" }, _hoisted_2$1 = { class: "flex items-center w-full overflow-hidden" }, _hoisted_3$1 = ["src"], _hoisted_4$1 = { class: "title pl-4 whitespace-nowrap" }, _hoisted_5 = { class: "flex justify-end h-full pr-3 w-full" }, _hoisted_6 = { class: "content" }, _hoisted_7 = { class: "content-inner" }, _hoisted_8 = {
|
|
688
688
|
class: "flex items-center justify-center",
|
|
689
689
|
style: { "font-size": "10px" }
|
|
690
690
|
}, UtoolsLayout_default = /* @__PURE__ */ defineComponent({
|
|
@@ -700,7 +700,7 @@ var LeftMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
700
700
|
let t = ref(), n = ref(!0);
|
|
701
701
|
return (e, r) => {
|
|
702
702
|
let i = resolveComponent("router-view");
|
|
703
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
703
|
+
return openBlock(), createElementBlock("div", _hoisted_1$4, [createVNode(UtoolsBaseLayout_default, null, {
|
|
704
704
|
left: withCtx(() => [createElementVNode("div", { class: normalizeClass(unref(getClassPrefix)("utools", "left-menu")) }, [createElementVNode("div", {
|
|
705
705
|
class: normalizeClass(["flex items-center justify-center", unref(getClassPrefix)("utools", "left-menu", "collapse")]),
|
|
706
706
|
onClick: r[0] ||= (e) => t.value?.changeCollapsed()
|
|
@@ -715,14 +715,14 @@ var LeftMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
715
715
|
collapsed: n.value,
|
|
716
716
|
"onUpdate:collapsed": r[1] ||= (e) => n.value = e
|
|
717
717
|
}), {
|
|
718
|
-
logo: withCtx(() => [createElementVNode("div", _hoisted_2$
|
|
718
|
+
logo: withCtx(() => [createElementVNode("div", _hoisted_2$1, [createElementVNode("div", {
|
|
719
719
|
class: "h-auto overflow-hidden flex flex-shrink-0",
|
|
720
720
|
style: normalizeStyle({ width: e.size === "small" ? "28px" : "36px" })
|
|
721
721
|
}, [createElementVNode("img", {
|
|
722
722
|
class: "logo w-full h-full rounded-full flex-shrink-0",
|
|
723
723
|
src: e.avatar,
|
|
724
724
|
alt: "logo"
|
|
725
|
-
}, null, 8, _hoisted_3$
|
|
725
|
+
}, null, 8, _hoisted_3$1)], 4), createElementVNode("div", _hoisted_4$1, toDisplayString(e.title), 1)])]),
|
|
726
726
|
_: 1
|
|
727
727
|
}, 16, ["collapsed"])], 2)]),
|
|
728
728
|
default: withCtx(() => [createElementVNode("div", { class: normalizeClass(unref(getClassPrefix)("utools", "content-wrapper")) }, [
|
|
@@ -746,11 +746,11 @@ var LeftMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
746
746
|
let t = e, n = getBuildCurrentClassPrefix("page-header"), i = computed(() => {
|
|
747
747
|
let e = [n()];
|
|
748
748
|
return t.size !== "default" && e.push(n(t.size)), e;
|
|
749
|
-
}),
|
|
749
|
+
}), u = computed(() => isEventExist("onBack"));
|
|
750
750
|
return (e, t) => {
|
|
751
751
|
let r = ElButton, d = ElDivider;
|
|
752
752
|
return openBlock(), createElementBlock("div", { class: normalizeClass(i.value) }, [createElementVNode("div", { class: normalizeClass(["flex items-center", unref(n)("header")]) }, [
|
|
753
|
-
|
|
753
|
+
u.value || e.$slots.prefix ? renderSlot(e.$slots, "prefix", { key: 0 }, () => [createVNode(r, {
|
|
754
754
|
class: normalizeClass(unref(n)("header", "back")),
|
|
755
755
|
icon: "i-p-left",
|
|
756
756
|
onClick: t[0] ||= (t) => e.$emit("back"),
|
|
@@ -768,77 +768,6 @@ var LeftMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
768
768
|
}, [renderSlot(e.$slots, "extra")], 2)) : createCommentVNode("", !0)], 2);
|
|
769
769
|
};
|
|
770
770
|
}
|
|
771
|
-
}), __plugin_vue_export_helper_default = (e, t) => {
|
|
772
|
-
let n = e.__vccOpts || e;
|
|
773
|
-
for (let [e, r] of t) n[e] = r;
|
|
774
|
-
return n;
|
|
775
|
-
}, _sfc_main$2 = {}, _hoisted_1$7 = { class: "result-error-icon" };
|
|
776
|
-
function _sfc_render$2(e, t) {
|
|
777
|
-
return openBlock(), createElementBlock("div", _hoisted_1$7, t[0] ||= [createStaticVNode("<svg width=\"240\" height=\"160\" viewBox=\"0 0 240 160\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" data-v-fc6ebdc7><g opacity=\"0.8\" data-v-fc6ebdc7><path d=\"M120 80C120 124.183 84.1828 160 40 160C-4.18278 160 -40 124.183 -40 80C-40 35.8172 -4.18278 0 40 0C84.1828 0 120 35.8172 120 80Z\" fill=\"var(--u-text-color-placeholder)\" opacity=\"0.1\" data-v-fc6ebdc7></path><path d=\"M280 80C280 124.183 244.183 160 200 160C155.817 160 120 124.183 120 80C120 35.8172 155.817 0 200 0C244.183 0 280 35.8172 280 80Z\" fill=\"var(--u-text-color-placeholder)\" opacity=\"0.1\" data-v-fc6ebdc7></path></g><rect x=\"60\" y=\"40\" width=\"120\" height=\"80\" rx=\"8\" fill=\"var(--u-bg-color-3)\" stroke=\"var(--u-text-color-placeholder)\" stroke-width=\"2\" data-v-fc6ebdc7></rect><path d=\"M90 60H150M90 80H150M90 100H130\" stroke=\"var(--u-text-color-placeholder)\" stroke-width=\"2\" stroke-linecap=\"round\" data-v-fc6ebdc7></path><circle cx=\"120\" cy=\"80\" r=\"20\" fill=\"none\" stroke=\"rgb(var(--red-6))\" stroke-width=\"3\" data-v-fc6ebdc7></circle><path d=\"M110 70L130 90M130 70L110 90\" stroke=\"rgb(var(--red-6))\" stroke-width=\"3\" stroke-linecap=\"round\" data-v-fc6ebdc7></path></svg><div class=\"result-error-text\" data-v-fc6ebdc7>403</div>", 2)]);
|
|
778
|
-
}
|
|
779
|
-
var _403_default = /* @__PURE__ */ __plugin_vue_export_helper_default(_sfc_main$2, [["render", _sfc_render$2], ["__scopeId", "data-v-fc6ebdc7"]]), _sfc_main$1 = {}, _hoisted_1$6 = { class: "result-error-icon" };
|
|
780
|
-
function _sfc_render$1(e, t) {
|
|
781
|
-
return openBlock(), createElementBlock("div", _hoisted_1$6, t[0] ||= [createStaticVNode("<svg width=\"240\" height=\"160\" viewBox=\"0 0 240 160\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" data-v-cdc3b8a1><g opacity=\"0.8\" data-v-cdc3b8a1><path d=\"M120 80C120 124.183 84.1828 160 40 160C-4.18278 160 -40 124.183 -40 80C-40 35.8172 -4.18278 0 40 0C84.1828 0 120 35.8172 120 80Z\" fill=\"var(--u-text-color-placeholder)\" opacity=\"0.1\" data-v-cdc3b8a1></path><path d=\"M280 80C280 124.183 244.183 160 200 160C155.817 160 120 124.183 120 80C120 35.8172 155.817 0 200 0C244.183 0 280 35.8172 280 80Z\" fill=\"var(--u-text-color-placeholder)\" opacity=\"0.1\" data-v-cdc3b8a1></path></g><rect x=\"60\" y=\"40\" width=\"120\" height=\"80\" rx=\"8\" fill=\"var(--u-bg-color-3)\" stroke=\"var(--u-text-color-placeholder)\" stroke-width=\"2\" data-v-cdc3b8a1></rect><path d=\"M90 60H150M90 80H150M90 100H130\" stroke=\"var(--u-text-color-placeholder)\" stroke-width=\"2\" stroke-linecap=\"round\" data-v-cdc3b8a1></path><circle cx=\"120\" cy=\"80\" r=\"25\" fill=\"none\" stroke=\"var(--u-text-color-placeholder)\" stroke-width=\"3\" data-v-cdc3b8a1></circle><path d=\"M105 65L135 95\" stroke=\"var(--u-text-color-placeholder)\" stroke-width=\"3\" stroke-linecap=\"round\" data-v-cdc3b8a1></path><circle cx=\"110\" cy=\"75\" r=\"3\" fill=\"var(--u-text-color-placeholder)\" data-v-cdc3b8a1></circle><circle cx=\"130\" cy=\"85\" r=\"3\" fill=\"var(--u-text-color-placeholder)\" data-v-cdc3b8a1></circle></svg><div class=\"result-error-text\" data-v-cdc3b8a1>404</div>", 2)]);
|
|
782
|
-
}
|
|
783
|
-
var _404_default = /* @__PURE__ */ __plugin_vue_export_helper_default(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-cdc3b8a1"]]), _sfc_main = {}, _hoisted_1$5 = { class: "result-error-icon" };
|
|
784
|
-
function _sfc_render(e, t) {
|
|
785
|
-
return openBlock(), createElementBlock("div", _hoisted_1$5, t[0] ||= [createStaticVNode("<svg width=\"240\" height=\"160\" viewBox=\"0 0 240 160\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" data-v-cb66ef61><g opacity=\"0.8\" data-v-cb66ef61><path d=\"M120 80C120 124.183 84.1828 160 40 160C-4.18278 160 -40 124.183 -40 80C-40 35.8172 -4.18278 0 40 0C84.1828 0 120 35.8172 120 80Z\" fill=\"var(--u-text-color-placeholder)\" opacity=\"0.1\" data-v-cb66ef61></path><path d=\"M280 80C280 124.183 244.183 160 200 160C155.817 160 120 124.183 120 80C120 35.8172 155.817 0 200 0C244.183 0 280 35.8172 280 80Z\" fill=\"var(--u-text-color-placeholder)\" opacity=\"0.1\" data-v-cb66ef61></path></g><rect x=\"60\" y=\"40\" width=\"120\" height=\"80\" rx=\"8\" fill=\"var(--u-bg-color-3)\" stroke=\"var(--u-text-color-placeholder)\" stroke-width=\"2\" data-v-cb66ef61></rect><path d=\"M90 60H150M90 80H150M90 100H130\" stroke=\"var(--u-text-color-placeholder)\" stroke-width=\"2\" stroke-linecap=\"round\" data-v-cb66ef61></path><rect x=\"100\" y=\"65\" width=\"40\" height=\"30\" rx=\"4\" fill=\"none\" stroke=\"rgb(var(--red-6))\" stroke-width=\"2\" data-v-cb66ef61></rect><path d=\"M110 75L130 85M130 75L110 85\" stroke=\"rgb(var(--red-6))\" stroke-width=\"2\" stroke-linecap=\"round\" data-v-cb66ef61></path><path d=\"M115 55L125 65\" stroke=\"rgb(var(--red-6))\" stroke-width=\"2\" stroke-linecap=\"round\" data-v-cb66ef61></path><circle cx=\"118\" cy=\"52\" r=\"2\" fill=\"rgb(var(--red-6))\" data-v-cb66ef61></circle></svg><div class=\"result-error-text\" data-v-cb66ef61>500</div>", 2)]);
|
|
786
|
-
}
|
|
787
|
-
var _500_default = /* @__PURE__ */ __plugin_vue_export_helper_default(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-cb66ef61"]]), _hoisted_1$4 = {
|
|
788
|
-
key: 0,
|
|
789
|
-
class: "i-p-info w-12 h-12"
|
|
790
|
-
}, _hoisted_2$1 = {
|
|
791
|
-
key: 1,
|
|
792
|
-
class: "i-p-check"
|
|
793
|
-
}, _hoisted_3$1 = {
|
|
794
|
-
key: 2,
|
|
795
|
-
class: "i-p-info w-12 h-12"
|
|
796
|
-
}, _hoisted_4$1 = {
|
|
797
|
-
key: 3,
|
|
798
|
-
class: "i-p-close"
|
|
799
|
-
}, Result_default = /* @__PURE__ */ defineComponent({
|
|
800
|
-
__name: "Result",
|
|
801
|
-
props: {
|
|
802
|
-
status: { default: "info" },
|
|
803
|
-
title: {},
|
|
804
|
-
subtitle: {}
|
|
805
|
-
},
|
|
806
|
-
setup(e) {
|
|
807
|
-
let t = [
|
|
808
|
-
"info",
|
|
809
|
-
"success",
|
|
810
|
-
"warning",
|
|
811
|
-
"error",
|
|
812
|
-
"403",
|
|
813
|
-
"404",
|
|
814
|
-
"500",
|
|
815
|
-
null
|
|
816
|
-
], n = e;
|
|
817
|
-
((e) => t.includes(e))(n.status) || console.warn(`Invalid status: ${n.status}. Valid values are: ${t.join(", ")}`);
|
|
818
|
-
let r = getClassPrefix("result");
|
|
819
|
-
return (e, t) => (openBlock(), createElementBlock("div", { class: normalizeClass(unref(r)) }, [
|
|
820
|
-
createElementVNode("div", { class: normalizeClass([`${unref(r)}-icon`, {
|
|
821
|
-
[`${unref(r)}-icon-${e.status}`]: e.status,
|
|
822
|
-
[`${unref(r)}-icon-custom`]: e.status === null
|
|
823
|
-
}]) }, [createElementVNode("div", { class: normalizeClass(`${unref(r)}-icon-tip`) }, [renderSlot(e.$slots, "icon", {}, () => [e.status === "info" ? (openBlock(), createElementBlock("span", _hoisted_1$4)) : e.status === "success" ? (openBlock(), createElementBlock("span", _hoisted_2$1)) : e.status === "warning" ? (openBlock(), createElementBlock("span", _hoisted_3$1)) : e.status === "error" ? (openBlock(), createElementBlock("span", _hoisted_4$1)) : e.status === "403" ? (openBlock(), createBlock(_403_default, { key: 4 })) : e.status === "404" ? (openBlock(), createBlock(_404_default, { key: 5 })) : e.status === "500" ? (openBlock(), createBlock(_500_default, { key: 6 })) : createCommentVNode("", !0)])], 2)], 2),
|
|
824
|
-
e.title || e.$slots.title ? (openBlock(), createElementBlock("div", {
|
|
825
|
-
key: 0,
|
|
826
|
-
class: normalizeClass(`${unref(r)}-title`)
|
|
827
|
-
}, [renderSlot(e.$slots, "title", {}, () => [createTextVNode(toDisplayString(e.title), 1)])], 2)) : createCommentVNode("", !0),
|
|
828
|
-
e.subtitle || e.$slots.subtitle ? (openBlock(), createElementBlock("div", {
|
|
829
|
-
key: 1,
|
|
830
|
-
class: normalizeClass(`${unref(r)}-subtitle`)
|
|
831
|
-
}, [renderSlot(e.$slots, "subtitle", {}, () => [createTextVNode(toDisplayString(e.subtitle), 1)])], 2)) : createCommentVNode("", !0),
|
|
832
|
-
e.$slots.extra ? (openBlock(), createElementBlock("div", {
|
|
833
|
-
key: 2,
|
|
834
|
-
class: normalizeClass(`${unref(r)}-extra`)
|
|
835
|
-
}, [renderSlot(e.$slots, "extra")], 2)) : createCommentVNode("", !0),
|
|
836
|
-
e.$slots.default ? (openBlock(), createElementBlock("div", {
|
|
837
|
-
key: 3,
|
|
838
|
-
class: normalizeClass(`${unref(r)}-content`)
|
|
839
|
-
}, [renderSlot(e.$slots, "default")], 2)) : createCommentVNode("", !0)
|
|
840
|
-
], 2));
|
|
841
|
-
}
|
|
842
771
|
}), _hoisted_1$3 = { class: "flex justify-between items-center" }, SettingItem_default = /* @__PURE__ */ defineComponent({
|
|
843
772
|
__name: "SettingItem",
|
|
844
773
|
props: {
|
|
@@ -853,16 +782,16 @@ var _500_default = /* @__PURE__ */ __plugin_vue_export_helper_default(_sfc_main,
|
|
|
853
782
|
let t = e, n = useAttrs(), i = computed(() => "onClick" in n || "onClickCapture" in n), a = computed(() => {
|
|
854
783
|
let e = [];
|
|
855
784
|
return e.push(getClassPrefix("setting-item")), i.value && e.push("cursor-pointer"), t.size !== "default" && e.push(getClassPrefix("setting-item", t.size)), e;
|
|
856
|
-
}),
|
|
785
|
+
}), l = ref({ background: t.background });
|
|
857
786
|
function u() {
|
|
858
|
-
|
|
787
|
+
l.value = {};
|
|
859
788
|
}
|
|
860
789
|
function d() {
|
|
861
|
-
|
|
790
|
+
l.value = { background: t.background };
|
|
862
791
|
}
|
|
863
792
|
return (e, t) => (openBlock(), createElementBlock("div", mergeProps({
|
|
864
793
|
class: [...a.value],
|
|
865
|
-
style: { ...
|
|
794
|
+
style: { ...l.value }
|
|
866
795
|
}, toHandlers({ ...i.value && { click: e.$attrs.onClick || e.$attrs.onClickCapture } }, !0), {
|
|
867
796
|
onMouseenter: u,
|
|
868
797
|
onMouseleave: d
|
|
@@ -941,68 +870,68 @@ var _500_default = /* @__PURE__ */ __plugin_vue_export_helper_default(_sfc_main,
|
|
|
941
870
|
"blur"
|
|
942
871
|
], ["update:value"]),
|
|
943
872
|
setup(t, { emit: n }) {
|
|
944
|
-
let i = useModel(t, "value"),
|
|
945
|
-
i.value === !1 &&
|
|
946
|
-
let
|
|
947
|
-
let n = e ?
|
|
873
|
+
let i = useModel(t, "value"), l = t, u = n, d = useSlots(), { size: f } = toRefs(l), p = getBuildCurrentClassPrefix("switch-plus")(), m = computed(() => l.disabled), h = computed(() => l.size);
|
|
874
|
+
i.value === !1 && l.defaultChecked && (i.value = l.checkedValue);
|
|
875
|
+
let v = computed(() => i.value === l.checkedValue), y = ref(!1), b = computed(() => y.value || l.loading), x = (e, t) => {
|
|
876
|
+
let n = e ? l.checkedValue : l.uncheckedValue;
|
|
948
877
|
i.value = n, u("change", n, t);
|
|
949
|
-
},
|
|
878
|
+
}, S = async (e) => {
|
|
950
879
|
if (b.value || m.value) return;
|
|
951
|
-
let t = !
|
|
880
|
+
let t = !v.value, n = t ? l.checkedValue : l.uncheckedValue, r = l.beforeChange;
|
|
952
881
|
if (isFunction(r)) {
|
|
953
882
|
y.value = !0;
|
|
954
883
|
try {
|
|
955
|
-
(await r(n) ?? !0) &&
|
|
884
|
+
(await r(n) ?? !0) && x(t, e);
|
|
956
885
|
} finally {
|
|
957
886
|
y.value = !1;
|
|
958
887
|
}
|
|
959
|
-
} else
|
|
888
|
+
} else x(t, e);
|
|
960
889
|
}, w = (e) => {
|
|
961
890
|
u("focus", e);
|
|
962
|
-
},
|
|
891
|
+
}, T = (e) => {
|
|
963
892
|
u("blur", e);
|
|
964
893
|
};
|
|
965
894
|
watch(i, (e) => {
|
|
966
|
-
(isUndefined(e) || isNull(e)) && (i.value =
|
|
895
|
+
(isUndefined(e) || isNull(e)) && (i.value = l.uncheckedValue);
|
|
967
896
|
});
|
|
968
897
|
let D = computed(() => [
|
|
969
898
|
p,
|
|
970
|
-
`${p}-type-${
|
|
899
|
+
`${p}-type-${l.type}`,
|
|
971
900
|
{
|
|
972
901
|
[`${p}-medium`]: h.value === "medium",
|
|
973
902
|
[`${p}-small`]: h.value === "small",
|
|
974
903
|
[`${p}-mini`]: h.value === "mini",
|
|
975
|
-
[`${p}-checked`]:
|
|
904
|
+
[`${p}-checked`]: v.value,
|
|
976
905
|
[`${p}-disabled`]: m.value,
|
|
977
906
|
[`${p}-loading`]: b.value,
|
|
978
|
-
[`${p}-custom-color`]:
|
|
907
|
+
[`${p}-custom-color`]: l.type === "line" && (l.checkedColor || l.uncheckedColor)
|
|
979
908
|
}
|
|
980
909
|
]), k = computed(() => {
|
|
981
|
-
if (
|
|
982
|
-
if (!
|
|
983
|
-
}),
|
|
910
|
+
if (v.value && l.checkedColor) return l.type === "line" ? { "--custom-color": l.checkedColor } : { backgroundColor: l.checkedColor };
|
|
911
|
+
if (!v.value && l.uncheckedColor) return l.type === "line" ? { "--custom-color": l.uncheckedColor } : { backgroundColor: l.uncheckedColor };
|
|
912
|
+
}), N = computed(() => {
|
|
984
913
|
if (!b.value) {
|
|
985
|
-
if (
|
|
986
|
-
if (!
|
|
914
|
+
if (v.value && l.checkedColor) return { color: l.checkedColor };
|
|
915
|
+
if (!v.value && l.uncheckedColor) return { color: l.uncheckedColor };
|
|
987
916
|
}
|
|
988
917
|
});
|
|
989
918
|
return (t, n) => (openBlock(), createElementBlock("button", {
|
|
990
919
|
type: "button",
|
|
991
920
|
role: "switch",
|
|
992
|
-
"aria-checked":
|
|
921
|
+
"aria-checked": v.value,
|
|
993
922
|
class: normalizeClass(D.value),
|
|
994
923
|
style: normalizeStyle(k.value),
|
|
995
924
|
disabled: m.value || b.value,
|
|
996
|
-
onClick:
|
|
925
|
+
onClick: S,
|
|
997
926
|
onFocus: w,
|
|
998
|
-
onBlur:
|
|
927
|
+
onBlur: T
|
|
999
928
|
}, [createElementVNode("span", {
|
|
1000
929
|
class: normalizeClass(`${unref(p)}-handle`),
|
|
1001
|
-
style: normalizeStyle(
|
|
930
|
+
style: normalizeStyle(N.value)
|
|
1002
931
|
}, [createElementVNode("span", { class: normalizeClass(`${unref(p)}-handle-icon`) }, [b.value ? (openBlock(), createElementBlock("span", {
|
|
1003
932
|
key: 0,
|
|
1004
933
|
class: normalizeClass(["i-p-loading", `${unref(p)}-loading-icon`])
|
|
1005
|
-
}, null, 2)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
934
|
+
}, null, 2)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [v.value ? renderSlot(t.$slots, "checked-icon", { key: 0 }) : renderSlot(t.$slots, "unchecked-icon", { key: 1 })], 64))], 2)], 6), t.type !== "line" && unref(f) !== "small" && (unref(d).checked || t.checkedText || unref(d).unchecked || t.uncheckedText) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createElementVNode("span", { class: normalizeClass(`${unref(p)}-text-holder`) }, [v.value ? renderSlot(t.$slots, "checked", { key: 0 }, () => [createTextVNode(toDisplayString(t.checkedText), 1)]) : renderSlot(t.$slots, "unchecked", { key: 1 }, () => [createTextVNode(toDisplayString(t.uncheckedText), 1)])], 2), createElementVNode("span", { class: normalizeClass(`${unref(p)}-text`) }, [v.value ? renderSlot(t.$slots, "checked", { key: 0 }, () => [createTextVNode(toDisplayString(t.checkedText), 1)]) : renderSlot(t.$slots, "unchecked", { key: 1 }, () => [createTextVNode(toDisplayString(t.uncheckedText), 1)])], 2)], 64)) : createCommentVNode("", !0)], 46, _hoisted_1$1));
|
|
1006
935
|
}
|
|
1007
936
|
}), SwitchPlusEnable_default = /* @__PURE__ */ defineComponent({
|
|
1008
937
|
__name: "SwitchPlusEnable",
|
|
@@ -1112,29 +1041,29 @@ var _500_default = /* @__PURE__ */ __plugin_vue_export_helper_default(_sfc_main,
|
|
|
1112
1041
|
}), f = ref(0), p = ref(!1), m = ref(0), h = computed(() => ({
|
|
1113
1042
|
[d.value.size]: `${i.data?.thumbSize ?? 0}px`,
|
|
1114
1043
|
[d.value.direction]: `${f.value}px`
|
|
1115
|
-
})),
|
|
1116
|
-
e.preventDefault(), u.value && (m.value = e[d.value.client] - u.value.getBoundingClientRect()[d.value.direction], p.value = !0, on(window, "mousemove",
|
|
1044
|
+
})), v = (e) => {
|
|
1045
|
+
e.preventDefault(), u.value && (m.value = e[d.value.client] - u.value.getBoundingClientRect()[d.value.direction], p.value = !0, on(window, "mousemove", x), on(window, "mouseup", S), on(window, "contextmenu", S));
|
|
1117
1046
|
}, y = (e) => {
|
|
1118
1047
|
if (e.preventDefault(), u.value) {
|
|
1119
1048
|
let t = b(e[d.value.client] > u.value.getBoundingClientRect()[d.value.direction] ? f.value + (i.data?.thumbSize ?? 0) : f.value - (i.data?.thumbSize ?? 0));
|
|
1120
1049
|
t !== f.value && (f.value = t, a("scroll", t));
|
|
1121
1050
|
}
|
|
1122
|
-
}, b = (e) => e < 0 ? 0 : i.data && e > i.data.max ? i.data.max : e,
|
|
1051
|
+
}, b = (e) => e < 0 ? 0 : i.data && e > i.data.max ? i.data.max : e, x = (e) => {
|
|
1123
1052
|
if (l.value && u.value) {
|
|
1124
1053
|
let t = b(e[d.value.client] - l.value.getBoundingClientRect()[d.value.direction] - m.value);
|
|
1125
1054
|
t !== f.value && (f.value = t, a("scroll", t));
|
|
1126
1055
|
}
|
|
1127
|
-
},
|
|
1128
|
-
p.value = !1, off(window, "mousemove",
|
|
1129
|
-
},
|
|
1056
|
+
}, S = () => {
|
|
1057
|
+
p.value = !1, off(window, "mousemove", x), off(window, "mouseup", S);
|
|
1058
|
+
}, C = (e) => {
|
|
1130
1059
|
p.value || (e = b(e), e !== f.value && (f.value = e));
|
|
1131
|
-
},
|
|
1060
|
+
}, w = computed(() => [
|
|
1132
1061
|
`${c}-thumb`,
|
|
1133
1062
|
`${c}-thumb-direction-${i.direction}`,
|
|
1134
1063
|
`${c}-thumb-size-${i.size}`,
|
|
1135
1064
|
{ [`${c}-thumb-dragging`]: p.value }
|
|
1136
1065
|
]);
|
|
1137
|
-
return t({ setOffset:
|
|
1066
|
+
return t({ setOffset: C }), (e, t) => (openBlock(), createElementBlock("div", {
|
|
1138
1067
|
ref_key: "trackRef",
|
|
1139
1068
|
ref: l,
|
|
1140
1069
|
class: normalizeClass([
|
|
@@ -1146,9 +1075,9 @@ var _500_default = /* @__PURE__ */ __plugin_vue_export_helper_default(_sfc_main,
|
|
|
1146
1075
|
}, [createElementVNode("div", {
|
|
1147
1076
|
ref_key: "thumbRef",
|
|
1148
1077
|
ref: u,
|
|
1149
|
-
class: normalizeClass(
|
|
1078
|
+
class: normalizeClass(w.value),
|
|
1150
1079
|
style: normalizeStyle(h.value),
|
|
1151
|
-
onMousedown:
|
|
1080
|
+
onMousedown: v
|
|
1152
1081
|
}, [createElementVNode("div", { class: normalizeClass(`${unref(c)}-thumb-bar`) }, null, 2)], 38)], 34));
|
|
1153
1082
|
}
|
|
1154
1083
|
}), SCROLLBAR_THUMB_MIN_SIZE = 20, SCROLLBAR_TRACK_SIZE = 15, Scrollbar_default = /* @__PURE__ */ defineComponent({
|
|
@@ -1179,64 +1108,64 @@ var _500_default = /* @__PURE__ */ __plugin_vue_export_helper_default(_sfc_main,
|
|
|
1179
1108
|
},
|
|
1180
1109
|
emits: ["scroll"],
|
|
1181
1110
|
setup(e, { expose: t, emit: n }) {
|
|
1182
|
-
let c = e, l = n, u = getClassPrefix("scrollbar"), d = computed(() => c.size === "small" ? SCROLLBAR_TRACK_SIZE * .8 : SCROLLBAR_TRACK_SIZE), f = ref(), p = ref(),
|
|
1111
|
+
let c = e, l = n, u = getClassPrefix("scrollbar"), d = computed(() => c.size === "small" ? SCROLLBAR_TRACK_SIZE * .8 : SCROLLBAR_TRACK_SIZE), f = ref(), p = ref(), h = ref(), b = ref(), x = ref(), S = ref(!1), w = ref(!1), T = computed(() => S.value && !c.disableHorizontal), E = computed(() => w.value && !c.disableVertical), D = ref(!1), O = null, k = () => {
|
|
1183
1112
|
if (f.value) {
|
|
1184
1113
|
let { clientWidth: e, clientHeight: t, offsetWidth: n, offsetHeight: r, scrollWidth: i, scrollHeight: a, scrollTop: o, scrollLeft: s } = f.value;
|
|
1185
|
-
|
|
1186
|
-
let l = c.type === "embed" &&
|
|
1114
|
+
S.value = i > e, w.value = a > t, D.value = T.value && E.value;
|
|
1115
|
+
let l = c.type === "embed" && D.value ? n - d.value : n, u = c.type === "embed" && D.value ? r - d.value : r, m = Math.round(l / Math.min(i / e, l / SCROLLBAR_THUMB_MIN_SIZE)), g = l - m, _ = (i - e) / g, v = Math.round(u / Math.min(a / t, u / SCROLLBAR_THUMB_MIN_SIZE)), y = u - v, rt = (a - t) / y;
|
|
1187
1116
|
if (p.value = {
|
|
1188
|
-
ratio:
|
|
1189
|
-
thumbSize:
|
|
1190
|
-
max:
|
|
1191
|
-
},
|
|
1192
|
-
ratio:
|
|
1193
|
-
thumbSize:
|
|
1194
|
-
max:
|
|
1117
|
+
ratio: _,
|
|
1118
|
+
thumbSize: m,
|
|
1119
|
+
max: g
|
|
1120
|
+
}, h.value = {
|
|
1121
|
+
ratio: rt,
|
|
1122
|
+
thumbSize: v,
|
|
1123
|
+
max: y
|
|
1195
1124
|
}, o > 0) {
|
|
1196
|
-
let e = Math.round(o / (
|
|
1197
|
-
|
|
1125
|
+
let e = Math.round(o / (h.value?.ratio ?? 1));
|
|
1126
|
+
x.value?.setOffset(e);
|
|
1198
1127
|
}
|
|
1199
1128
|
if (s > 0) {
|
|
1200
1129
|
let e = Math.round(s / (p.value?.ratio ?? 1));
|
|
1201
|
-
|
|
1130
|
+
b.value?.setOffset(e);
|
|
1202
1131
|
}
|
|
1203
1132
|
}
|
|
1204
|
-
},
|
|
1205
|
-
|
|
1133
|
+
}, A = () => {
|
|
1134
|
+
k();
|
|
1206
1135
|
};
|
|
1207
1136
|
onMounted(() => {
|
|
1208
|
-
if (
|
|
1209
|
-
|
|
1137
|
+
if (k(), f.value) {
|
|
1138
|
+
O = new ResizeObserver(A), O.observe(f.value);
|
|
1210
1139
|
let e = f.value.firstElementChild;
|
|
1211
|
-
e &&
|
|
1140
|
+
e && O.observe(e);
|
|
1212
1141
|
}
|
|
1213
1142
|
}), onUnmounted(() => {
|
|
1214
|
-
|
|
1143
|
+
O &&= (O.disconnect(), null);
|
|
1215
1144
|
});
|
|
1216
|
-
let
|
|
1145
|
+
let j = (e) => {
|
|
1217
1146
|
if (f.value) {
|
|
1218
|
-
if (
|
|
1147
|
+
if (T.value && !c.disableHorizontal) {
|
|
1219
1148
|
let e = Math.round(f.value.scrollLeft / (p.value?.ratio ?? 1));
|
|
1220
|
-
|
|
1149
|
+
b.value?.setOffset(e);
|
|
1221
1150
|
}
|
|
1222
|
-
if (
|
|
1223
|
-
let e = Math.round(f.value.scrollTop / (
|
|
1224
|
-
|
|
1151
|
+
if (E.value && !c.disableVertical) {
|
|
1152
|
+
let e = Math.round(f.value.scrollTop / (h.value?.ratio ?? 1));
|
|
1153
|
+
x.value?.setOffset(e);
|
|
1225
1154
|
}
|
|
1226
1155
|
}
|
|
1227
1156
|
l("scroll", e);
|
|
1228
|
-
},
|
|
1157
|
+
}, M = (e) => {
|
|
1229
1158
|
f.value && f.value.scrollTo({ left: e * (p.value?.ratio ?? 1) });
|
|
1230
|
-
},
|
|
1231
|
-
f.value && f.value.scrollTo({ top: e * (
|
|
1232
|
-
},
|
|
1159
|
+
}, N = (e) => {
|
|
1160
|
+
f.value && f.value.scrollTo({ top: e * (h.value?.ratio ?? 1) });
|
|
1161
|
+
}, P = computed(() => {
|
|
1233
1162
|
let e = {};
|
|
1234
|
-
return c.type === "track" && (
|
|
1235
|
-
}),
|
|
1163
|
+
return c.type === "track" && (T.value && (e.paddingBottom = `${d.value}px`), E.value && (e.paddingRight = `${d.value}px`)), [e, c.outerStyle];
|
|
1164
|
+
}), F = computed(() => [
|
|
1236
1165
|
`${u}`,
|
|
1237
1166
|
`${u}-type-${c.type}`,
|
|
1238
1167
|
`${u}-size-${c.size}`,
|
|
1239
|
-
{ [`${u}-both`]:
|
|
1168
|
+
{ [`${u}-both`]: D.value },
|
|
1240
1169
|
c.outerClass
|
|
1241
1170
|
]);
|
|
1242
1171
|
return t({
|
|
@@ -1250,37 +1179,37 @@ var _500_default = /* @__PURE__ */ __plugin_vue_export_helper_default(_sfc_main,
|
|
|
1250
1179
|
f.value?.scrollTo({ left: e });
|
|
1251
1180
|
}
|
|
1252
1181
|
}), (e, t) => (openBlock(), createElementBlock("div", {
|
|
1253
|
-
class: normalizeClass(
|
|
1254
|
-
style: normalizeStyle(
|
|
1182
|
+
class: normalizeClass(F.value),
|
|
1183
|
+
style: normalizeStyle(P.value)
|
|
1255
1184
|
}, [
|
|
1256
1185
|
createElementVNode("div", mergeProps({
|
|
1257
1186
|
ref_key: "containerRef",
|
|
1258
1187
|
ref: f,
|
|
1259
1188
|
class: `${unref(u)}-container`
|
|
1260
|
-
}, e.$attrs, { onScroll:
|
|
1261
|
-
!e.hide &&
|
|
1189
|
+
}, e.$attrs, { onScroll: j }), [renderSlot(e.$slots, "default")], 16),
|
|
1190
|
+
!e.hide && T.value ? (openBlock(), createBlock(thumb_default, {
|
|
1262
1191
|
key: 0,
|
|
1263
1192
|
ref_key: "horizontalThumbRef",
|
|
1264
|
-
ref:
|
|
1193
|
+
ref: b,
|
|
1265
1194
|
data: p.value,
|
|
1266
1195
|
direction: "horizontal",
|
|
1267
|
-
both:
|
|
1196
|
+
both: D.value,
|
|
1268
1197
|
size: c.size,
|
|
1269
|
-
onScroll:
|
|
1198
|
+
onScroll: M
|
|
1270
1199
|
}, null, 8, [
|
|
1271
1200
|
"data",
|
|
1272
1201
|
"both",
|
|
1273
1202
|
"size"
|
|
1274
1203
|
])) : createCommentVNode("", !0),
|
|
1275
|
-
!e.hide &&
|
|
1204
|
+
!e.hide && E.value ? (openBlock(), createBlock(thumb_default, {
|
|
1276
1205
|
key: 1,
|
|
1277
1206
|
ref_key: "verticalThumbRef",
|
|
1278
|
-
ref:
|
|
1279
|
-
data:
|
|
1207
|
+
ref: x,
|
|
1208
|
+
data: h.value,
|
|
1280
1209
|
direction: "vertical",
|
|
1281
|
-
both:
|
|
1210
|
+
both: D.value,
|
|
1282
1211
|
size: c.size,
|
|
1283
|
-
onScroll:
|
|
1212
|
+
onScroll: N
|
|
1284
1213
|
}, null, 8, [
|
|
1285
1214
|
"data",
|
|
1286
1215
|
"both",
|
|
@@ -1420,23 +1349,23 @@ var LazyLoader_default = /* @__PURE__ */ defineComponent({
|
|
|
1420
1349
|
"clear"
|
|
1421
1350
|
], ["update:modelValue"]),
|
|
1422
1351
|
setup(t, { expose: i, emit: c }) {
|
|
1423
|
-
let
|
|
1352
|
+
let u = t, d = c, f = ref(), p = ref(), m = ref(!1), _ = ref(!1), v = ref(), y = ref(!1), b = ref(null), x = ref(), C = ref(), w = computed(() => {
|
|
1424
1353
|
if (!D.value) return "--";
|
|
1425
1354
|
let [e] = D.value.split(":");
|
|
1426
1355
|
return e || "--";
|
|
1427
|
-
}),
|
|
1356
|
+
}), T = computed(() => {
|
|
1428
1357
|
if (!D.value) return "--";
|
|
1429
1358
|
let [, e] = D.value.split(":");
|
|
1430
1359
|
return e || "--";
|
|
1431
|
-
}), D = useModel(t, "modelValue"),
|
|
1432
|
-
let e = [], t = j(
|
|
1360
|
+
}), D = useModel(t, "modelValue"), O = computed(() => u.clearable && !u.disabled && D.value && (_.value || m.value)), k = computed(() => {
|
|
1361
|
+
let e = [], t = j(u.start), n = j(u.end), r = j(u.step);
|
|
1433
1362
|
if (!t || !n || !r) return e;
|
|
1434
1363
|
let i = t, a = n.hours * 60 + n.minutes;
|
|
1435
1364
|
for (; i.hours * 60 + i.minutes <= a;) {
|
|
1436
|
-
let t =
|
|
1437
|
-
|
|
1365
|
+
let t = F(i);
|
|
1366
|
+
I(t) && e.push(t), i.minutes += r.minutes, i.hours += r.hours, i.minutes >= 60 && (i.hours += Math.floor(i.minutes / 60), i.minutes %= 60);
|
|
1438
1367
|
}
|
|
1439
|
-
return
|
|
1368
|
+
return u.includeEndTime && !e.includes(u.end) && I(u.end) && e.push(u.end), e;
|
|
1440
1369
|
});
|
|
1441
1370
|
function j(e) {
|
|
1442
1371
|
let t = e.match(/^(\d{1,2}):(\d{2})$/);
|
|
@@ -1445,95 +1374,95 @@ var LazyLoader_default = /* @__PURE__ */ defineComponent({
|
|
|
1445
1374
|
minutes: parseInt(t[2], 10)
|
|
1446
1375
|
} : null;
|
|
1447
1376
|
}
|
|
1448
|
-
function
|
|
1377
|
+
function M(e = "") {
|
|
1449
1378
|
let t = e.match(/^(\d{1,2}):(\d{1,2})$/);
|
|
1450
1379
|
return t ? {
|
|
1451
1380
|
hours: t[1],
|
|
1452
1381
|
minutes: t[2]
|
|
1453
1382
|
} : null;
|
|
1454
1383
|
}
|
|
1455
|
-
function
|
|
1384
|
+
function F(e) {
|
|
1456
1385
|
return e ? `${e.hours.toString().padStart(2, "0")}:${e.minutes.toString().padStart(2, "0")}` : "";
|
|
1457
1386
|
}
|
|
1458
|
-
function
|
|
1459
|
-
if (!
|
|
1387
|
+
function I(e) {
|
|
1388
|
+
if (!u.minTime && !u.maxTime) return !0;
|
|
1460
1389
|
let t = j(e);
|
|
1461
1390
|
if (!t) return !1;
|
|
1462
1391
|
let n = t.hours * 60 + t.minutes;
|
|
1463
|
-
if (
|
|
1464
|
-
let e = j(
|
|
1392
|
+
if (u.minTime) {
|
|
1393
|
+
let e = j(u.minTime);
|
|
1465
1394
|
if (e && n < e.hours * 60 + e.minutes) return !1;
|
|
1466
1395
|
}
|
|
1467
|
-
if (
|
|
1468
|
-
let e = j(
|
|
1396
|
+
if (u.maxTime) {
|
|
1397
|
+
let e = j(u.maxTime);
|
|
1469
1398
|
if (e && n > e.hours * 60 + e.minutes) return !1;
|
|
1470
1399
|
}
|
|
1471
1400
|
return !0;
|
|
1472
1401
|
}
|
|
1473
|
-
let
|
|
1474
|
-
b.value = "hour",
|
|
1475
|
-
},
|
|
1402
|
+
let L = () => {
|
|
1403
|
+
b.value = "hour", x.value?.focus();
|
|
1404
|
+
}, R = () => {
|
|
1476
1405
|
b.value = "minute", C.value?.focus();
|
|
1477
|
-
},
|
|
1478
|
-
|
|
1479
|
-
},
|
|
1406
|
+
}, z = () => {
|
|
1407
|
+
u.disabled || (m.value = !0, _.value = !0, b.value || L());
|
|
1408
|
+
}, B = (e) => {
|
|
1480
1409
|
let t = e.target, n = t.textContent || "";
|
|
1481
|
-
n = n.replace(/\D/g, ""), parseInt(n) > 23 && (n = "23"), t.textContent = n.padStart(2, "0"),
|
|
1482
|
-
},
|
|
1410
|
+
n = n.replace(/\D/g, ""), parseInt(n) > 23 && (n = "23"), t.textContent = n.padStart(2, "0"), H("hour", n);
|
|
1411
|
+
}, V = (e) => {
|
|
1483
1412
|
let t = e.target, n = t.textContent || "";
|
|
1484
|
-
n = n.replace(/\D/g, ""), parseInt(n) > 59 && (n = "59"), t.textContent = n.padStart(2, "0"),
|
|
1485
|
-
},
|
|
1413
|
+
n = n.replace(/\D/g, ""), parseInt(n) > 59 && (n = "59"), t.textContent = n.padStart(2, "0"), H("minute", n);
|
|
1414
|
+
}, H = (e, t) => {
|
|
1486
1415
|
let [n, r] = (D.value || "00:00").split(":"), i;
|
|
1487
1416
|
if (i = e === "hour" ? `${t}:${r || "00"}` : `${n || "00"}:${t}`, D.value = i, d("change", i), f.value) {
|
|
1488
|
-
let e = Array.from(f.value.querySelectorAll(".time-select__option")), t =
|
|
1417
|
+
let e = Array.from(f.value.querySelectorAll(".time-select__option")), t = M(i), n = e.find((e) => {
|
|
1489
1418
|
let n = e.getAttribute("data-value");
|
|
1490
1419
|
return !!(n && t?.hours && n.split(":")[0] === t.hours.padStart(2, "0"));
|
|
1491
1420
|
});
|
|
1492
1421
|
v.value && n && v.value.scrollTop(n.offsetTop);
|
|
1493
1422
|
}
|
|
1423
|
+
}, U = () => {
|
|
1424
|
+
b.value = "hour", _.value = !0;
|
|
1494
1425
|
}, W = () => {
|
|
1495
|
-
b.value =
|
|
1426
|
+
b.value = null, _.value = !1, G();
|
|
1496
1427
|
}, G = () => {
|
|
1497
|
-
|
|
1498
|
-
},
|
|
1499
|
-
|
|
1500
|
-
},
|
|
1501
|
-
b.value =
|
|
1502
|
-
},
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
if (e.key === "Tab") e.preventDefault(), z();
|
|
1506
|
-
else if (e.key === "ArrowRight") e.preventDefault(), z();
|
|
1428
|
+
console.log("autoFillTime", D.value), D.value = F(M(D.value || "")), console.log("autoFillTime", F(M(D.value || "")), M(D.value || ""));
|
|
1429
|
+
}, it = () => {
|
|
1430
|
+
b.value = "minute", _.value = !0;
|
|
1431
|
+
}, at = () => {
|
|
1432
|
+
b.value = null, _.value = !1, G();
|
|
1433
|
+
}, K = (e) => {
|
|
1434
|
+
if (e.key === "Tab") e.preventDefault(), R();
|
|
1435
|
+
else if (e.key === "ArrowRight") e.preventDefault(), R();
|
|
1507
1436
|
else if (e.key === "Enter") e.preventDefault(), m.value = !m.value;
|
|
1508
1437
|
else if (e.key >= "0" && e.key <= "9") {
|
|
1509
|
-
let e =
|
|
1438
|
+
let e = M(D.value);
|
|
1510
1439
|
console.log("timeStrObj?.hours.length", e?.hours.length), e?.hours.length === 2 && (D.value = `'':${e.minutes}`);
|
|
1511
1440
|
}
|
|
1512
|
-
},
|
|
1513
|
-
if (e.key === "Tab") e.preventDefault(),
|
|
1514
|
-
else if (e.key === "ArrowLeft") e.preventDefault(),
|
|
1441
|
+
}, q = (e) => {
|
|
1442
|
+
if (e.key === "Tab") e.preventDefault(), L();
|
|
1443
|
+
else if (e.key === "ArrowLeft") e.preventDefault(), L();
|
|
1515
1444
|
else if (e.key === "Enter") e.preventDefault(), m.value = !m.value;
|
|
1516
1445
|
else if (e.key >= "0" && e.key <= "9") {
|
|
1517
|
-
let e =
|
|
1446
|
+
let e = M(D.value);
|
|
1518
1447
|
e?.minutes.length === 2 && (D.value = `${e.hours}:''`);
|
|
1519
1448
|
}
|
|
1520
|
-
},
|
|
1449
|
+
}, J = () => {
|
|
1521
1450
|
D.value = "00:00", d("change", ""), d("clear"), m.value = !1, nextTick(() => {
|
|
1522
1451
|
p.value?.focus(), setTimeout(() => {
|
|
1523
|
-
|
|
1452
|
+
_.value && (m.value = !0);
|
|
1524
1453
|
}, 50);
|
|
1525
1454
|
});
|
|
1526
|
-
},
|
|
1455
|
+
}, Y = (e) => {
|
|
1527
1456
|
D.value = e, d("change", e), m.value = !1, y.value = !0, b.value = null, nextTick(() => {
|
|
1528
1457
|
p.value?.focus();
|
|
1529
1458
|
});
|
|
1530
|
-
},
|
|
1531
|
-
|
|
1532
|
-
},
|
|
1533
|
-
|
|
1534
|
-
}, Q = 0, $ = null,
|
|
1459
|
+
}, X = () => {
|
|
1460
|
+
L();
|
|
1461
|
+
}, Z = () => {
|
|
1462
|
+
x.value?.blur(), C.value?.blur(), b.value = null;
|
|
1463
|
+
}, Q = 0, $ = null, ot = () => {
|
|
1535
1464
|
Q++, m.value = !0;
|
|
1536
|
-
},
|
|
1465
|
+
}, st = () => {
|
|
1537
1466
|
$ && clearTimeout($);
|
|
1538
1467
|
let e = Q + 1;
|
|
1539
1468
|
Q = e, $ = setTimeout(() => {
|
|
@@ -1541,66 +1470,66 @@ var LazyLoader_default = /* @__PURE__ */ defineComponent({
|
|
|
1541
1470
|
}, 100);
|
|
1542
1471
|
};
|
|
1543
1472
|
return i({
|
|
1544
|
-
focus:
|
|
1545
|
-
blur:
|
|
1473
|
+
focus: X,
|
|
1474
|
+
blur: Z
|
|
1546
1475
|
}), (t, r) => (openBlock(), createElementBlock("div", { class: normalizeClass(["time-select", {
|
|
1547
|
-
"time-select--disabled":
|
|
1548
|
-
"time-select--border":
|
|
1476
|
+
"time-select--disabled": u.disabled,
|
|
1477
|
+
"time-select--border": u.border
|
|
1549
1478
|
}]) }, [createElementVNode("div", {
|
|
1550
1479
|
class: "time-select__input-wrapper",
|
|
1551
|
-
onFocusin:
|
|
1552
|
-
onFocusout:
|
|
1480
|
+
onFocusin: ot,
|
|
1481
|
+
onFocusout: st
|
|
1553
1482
|
}, [
|
|
1554
|
-
|
|
1483
|
+
u.prefixIcon ? (openBlock(), createElementBlock("div", _hoisted_1, r[0] ||= [createElementVNode("svg", {
|
|
1555
1484
|
class: "time-select__icon",
|
|
1556
1485
|
viewBox: "0 0 24 24",
|
|
1557
1486
|
fill: "currentColor"
|
|
1558
1487
|
}, [createElementVNode("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67V7z" })], -1)])) : createCommentVNode("", !0),
|
|
1559
1488
|
createElementVNode("div", {
|
|
1560
1489
|
class: normalizeClass(["time-select__input time-select__editable-container", {
|
|
1561
|
-
"time-select__input--small":
|
|
1562
|
-
"time-select__input--large":
|
|
1563
|
-
"time-select__input--disabled":
|
|
1564
|
-
"time-select__input--readonly": !
|
|
1490
|
+
"time-select__input--small": u.size === "small",
|
|
1491
|
+
"time-select__input--large": u.size === "large",
|
|
1492
|
+
"time-select__input--disabled": u.disabled,
|
|
1493
|
+
"time-select__input--readonly": !u.editable
|
|
1565
1494
|
}]),
|
|
1566
|
-
onClick:
|
|
1495
|
+
onClick: z
|
|
1567
1496
|
}, [
|
|
1568
1497
|
createElementVNode("div", {
|
|
1569
1498
|
ref_key: "hourRef",
|
|
1570
|
-
ref:
|
|
1499
|
+
ref: x,
|
|
1571
1500
|
class: normalizeClass(["time-select__time-part time-select__hour", { "time-select__time-part--selected": b.value === "hour" }]),
|
|
1572
|
-
contenteditable:
|
|
1573
|
-
onInput:
|
|
1574
|
-
onFocus:
|
|
1575
|
-
onBlur:
|
|
1576
|
-
onKeydown:
|
|
1577
|
-
onClick: withModifiers(
|
|
1578
|
-
}, toDisplayString(
|
|
1501
|
+
contenteditable: u.editable && !u.disabled,
|
|
1502
|
+
onInput: B,
|
|
1503
|
+
onFocus: U,
|
|
1504
|
+
onBlur: W,
|
|
1505
|
+
onKeydown: K,
|
|
1506
|
+
onClick: withModifiers(L, ["stop"])
|
|
1507
|
+
}, toDisplayString(w.value), 43, _hoisted_2),
|
|
1579
1508
|
r[1] ||= createElementVNode("span", { class: "time-select__separator" }, ":", -1),
|
|
1580
1509
|
createElementVNode("div", {
|
|
1581
1510
|
ref_key: "minuteRef",
|
|
1582
1511
|
ref: C,
|
|
1583
1512
|
class: normalizeClass(["time-select__time-part time-select__minute", { "time-select__time-part--selected": b.value === "minute" }]),
|
|
1584
|
-
contenteditable:
|
|
1585
|
-
onInput:
|
|
1586
|
-
onFocus:
|
|
1587
|
-
onBlur:
|
|
1588
|
-
onKeydown:
|
|
1589
|
-
onClick: withModifiers(
|
|
1590
|
-
}, toDisplayString(
|
|
1513
|
+
contenteditable: u.editable && !u.disabled,
|
|
1514
|
+
onInput: V,
|
|
1515
|
+
onFocus: it,
|
|
1516
|
+
onBlur: at,
|
|
1517
|
+
onKeydown: q,
|
|
1518
|
+
onClick: withModifiers(R, ["stop"])
|
|
1519
|
+
}, toDisplayString(T.value), 43, _hoisted_3)
|
|
1591
1520
|
], 2),
|
|
1592
|
-
|
|
1521
|
+
O.value ? (openBlock(), createElementBlock("div", {
|
|
1593
1522
|
key: 1,
|
|
1594
1523
|
class: "time-select__clear",
|
|
1595
|
-
onMousedown: withModifiers(
|
|
1596
|
-
onClick: withModifiers(
|
|
1524
|
+
onMousedown: withModifiers(J, ["prevent"]),
|
|
1525
|
+
onClick: withModifiers(J, ["prevent"])
|
|
1597
1526
|
}, r[2] ||= [createElementVNode("svg", {
|
|
1598
1527
|
class: "time-select__icon",
|
|
1599
1528
|
viewBox: "0 0 24 24",
|
|
1600
1529
|
fill: "currentColor"
|
|
1601
1530
|
}, [createElementVNode("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11H7v-2h10v2z" })], -1)], 32)) : createCommentVNode("", !0)
|
|
1602
1531
|
], 32), createVNode(Transition, { name: "time-select-dropdown" }, {
|
|
1603
|
-
default: withCtx(() => [m.value && !
|
|
1532
|
+
default: withCtx(() => [m.value && !u.disabled ? (openBlock(), createElementBlock("div", {
|
|
1604
1533
|
key: 0,
|
|
1605
1534
|
class: "time-select__dropdown",
|
|
1606
1535
|
ref_key: "timeSelectRef",
|
|
@@ -1608,14 +1537,14 @@ var LazyLoader_default = /* @__PURE__ */ defineComponent({
|
|
|
1608
1537
|
}, [createVNode(unref(Scrollbar_default), {
|
|
1609
1538
|
ref_key: "scrollbarRef",
|
|
1610
1539
|
ref: v,
|
|
1611
|
-
size:
|
|
1540
|
+
size: u.size === "small" ? "small" : "default",
|
|
1612
1541
|
class: "time-select__options"
|
|
1613
1542
|
}, {
|
|
1614
|
-
default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
1543
|
+
default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(k.value, (e) => (openBlock(), createElementBlock("div", {
|
|
1615
1544
|
key: e,
|
|
1616
|
-
class: normalizeClass(["time-select__option", { "time-select__option--selected": e ===
|
|
1545
|
+
class: normalizeClass(["time-select__option", { "time-select__option--selected": e === F(M(D.value)) }]),
|
|
1617
1546
|
"data-value": e,
|
|
1618
|
-
onClick: (t) =>
|
|
1547
|
+
onClick: (t) => Y(e)
|
|
1619
1548
|
}, toDisplayString(e), 11, _hoisted_4))), 128))]),
|
|
1620
1549
|
_: 1
|
|
1621
1550
|
}, 8, ["size"])], 512)) : createCommentVNode("", !0)]),
|
|
@@ -1688,4 +1617,4 @@ function setCurrentTheme(e) {
|
|
|
1688
1617
|
function getCurrentTheme() {
|
|
1689
1618
|
return currentTheme.value;
|
|
1690
1619
|
}
|
|
1691
|
-
export { BackTop_default as BackTop, ContextMenu_default as ContextMenu, ContextMenuDivider_default as ContextMenuDivider, ContextMenuGroup_default as ContextMenuGroup, ContextMenuItem_default as ContextMenuItem, ContextMenuSubmenu_default as ContextMenuSubmenu, LazyLoader_default as LazyLoader, LeftMenu_default as LeftMenu, LeftMenuEventDispatch, LeftMenuEvents, PageHeader_default as PageHeader,
|
|
1620
|
+
export { BackTop_default as BackTop, ContextMenu_default as ContextMenu, ContextMenuDivider_default as ContextMenuDivider, ContextMenuGroup_default as ContextMenuGroup, ContextMenuItem_default as ContextMenuItem, ContextMenuSubmenu_default as ContextMenuSubmenu, LazyLoader_default as LazyLoader, LeftMenu_default as LeftMenu, LeftMenuEventDispatch, LeftMenuEvents, PageHeader_default as PageHeader, Scrollbar_default as Scrollbar, SettingDivision_default as SettingDivision, SettingGroup_default as SettingGroup, SettingItem_default as SettingItem, SplitPanel_default as SplitPanel, SwitchPlus_default as SwitchPlus, SwitchPlusEnable_default as SwitchPlusEnable, thumb_default as Thumb, TimeSelect_default as TimeSelect, UtoolsBaseLayout_default as UtoolsBaseLayout, UtoolsLayout_default as UtoolsLayout, WebBaseLayout_default as WebBaseLayout, WebLayout_default as WebLayout, getBuildCurrentClassPrefix, getClassPrefix, getCurrentTheme, isEventExist, isFunction, isNull, isNumber, isObject, isUndefined, off, on, setCurrentTheme, useMultiLoading, useSingleLoading, useTheme };
|