@qynpm/ui 1.0.28 → 1.0.32
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/README.md +167 -8
- package/dist/index.cjs +9 -4
- package/dist/index.mjs +90 -62
- package/dist/qy-action-bar/index.cjs +1 -1
- package/dist/qy-action-bar/index.mjs +1 -1
- package/dist/qy-aside/index.cjs +1 -0
- package/dist/qy-aside/index.mjs +7 -0
- package/dist/qy-cascader/index.cjs +1 -1
- package/dist/qy-cascader/index.mjs +1 -1
- package/dist/qy-checkbox/index.cjs +1 -1
- package/dist/qy-checkbox/index.mjs +1 -1
- package/dist/qy-checkbox-group/index.cjs +1 -1
- package/dist/qy-checkbox-group/index.mjs +1 -1
- package/dist/qy-col/index.cjs +1 -0
- package/dist/qy-col/index.mjs +7 -0
- package/dist/qy-collapse/index.cjs +1 -1
- package/dist/qy-collapse/index.mjs +1 -1
- package/dist/qy-container/index.cjs +1 -0
- package/dist/qy-container/index.mjs +7 -0
- package/dist/qy-date-picker/index.cjs +1 -1
- package/dist/qy-date-picker/index.mjs +1 -1
- package/dist/qy-dialog/index.cjs +1 -1
- package/dist/qy-dialog/index.mjs +1 -1
- package/dist/qy-drawer/index.cjs +1 -0
- package/dist/qy-drawer/index.mjs +5 -0
- package/dist/qy-file-picker/index.cjs +1 -1
- package/dist/qy-file-picker/index.mjs +1 -1
- package/dist/qy-form-section/index.cjs +1 -1
- package/dist/qy-form-section/index.mjs +2 -2
- package/dist/qy-fullscreen/index.cjs +1 -0
- package/dist/qy-fullscreen/index.mjs +7 -0
- package/dist/qy-icon/index.cjs +1 -0
- package/dist/qy-icon/index.mjs +11 -0
- package/dist/qy-icon-picker/index.cjs +5 -0
- package/dist/qy-icon-picker/index.mjs +11 -0
- package/dist/qy-image-upload/index.cjs +1 -1
- package/dist/qy-image-upload/index.mjs +1 -1
- package/dist/qy-input/index.cjs +1 -1
- package/dist/qy-input/index.mjs +4 -5
- package/dist/qy-input-number/index.cjs +2 -2
- package/dist/qy-input-number/index.mjs +2 -2
- package/dist/qy-legacy-selection-dialog/index.cjs +1 -1
- package/dist/qy-legacy-selection-dialog/index.mjs +1 -1
- package/dist/qy-link/index.cjs +1 -1
- package/dist/qy-link/index.mjs +1 -1
- package/dist/qy-loading/index.cjs +1 -0
- package/dist/qy-loading/index.mjs +9 -0
- package/dist/qy-main/index.cjs +1 -0
- package/dist/qy-main/index.mjs +7 -0
- package/dist/qy-menu-actions/index.cjs +1 -1
- package/dist/qy-menu-actions/index.mjs +1 -1
- package/dist/qy-money-input/index.cjs +1 -1
- package/dist/qy-money-input/index.mjs +1 -1
- package/dist/qy-popover/index.cjs +1 -1
- package/dist/qy-popover/index.mjs +1 -1
- package/dist/qy-radio/index.cjs +1 -1
- package/dist/qy-radio/index.mjs +1 -1
- package/dist/qy-radio-group/index.cjs +1 -1
- package/dist/qy-radio-group/index.mjs +1 -1
- package/dist/qy-record-quote-search/index.cjs +1 -1
- package/dist/qy-record-quote-search/index.mjs +1 -1
- package/dist/qy-remark-image/index.cjs +1 -1
- package/dist/qy-remark-image/index.mjs +1 -1
- package/dist/qy-remote-select/index.cjs +1 -1
- package/dist/qy-remote-select/index.mjs +1 -1
- package/dist/qy-result/index.cjs +1 -0
- package/dist/qy-result/index.mjs +7 -0
- package/dist/qy-row/index.cjs +1 -0
- package/dist/qy-row/index.mjs +7 -0
- package/dist/qy-search-input/index.cjs +1 -1
- package/dist/qy-search-input/index.mjs +1 -1
- package/dist/qy-select/index.cjs +1 -1
- package/dist/qy-select/index.mjs +1 -1
- package/dist/qy-selection-dialog/index.cjs +1 -1
- package/dist/qy-selection-dialog/index.mjs +1 -1
- package/dist/qy-statistic/index.cjs +1 -0
- package/dist/qy-statistic/index.mjs +7 -0
- package/dist/qy-switch/index.cjs +1 -1
- package/dist/qy-switch/index.mjs +1 -1
- package/dist/qy-table-column-settings/index.cjs +1 -1
- package/dist/qy-table-column-settings/index.mjs +1 -1
- package/dist/qy-tabs/index.cjs +1 -1
- package/dist/qy-tabs/index.mjs +1 -1
- package/dist/qy-tag/index.cjs +1 -1
- package/dist/qy-tag/index.mjs +1 -1
- package/dist/qy-tooltip/index.cjs +1 -1
- package/dist/qy-tooltip/index.mjs +1 -1
- package/dist/qy-tree-select/index.cjs +1 -1
- package/dist/qy-tree-select/index.mjs +1 -1
- package/dist/qy-upload/index.cjs +1 -1
- package/dist/qy-upload/index.mjs +1 -1
- package/dist/shared/{index-C7V-LeFg.mjs → index-1LT6Q6XJ.mjs} +1 -1
- package/dist/shared/{index-DleLvEzf.mjs → index-4wZQbpy3.mjs} +1039 -1002
- package/dist/shared/index-AirHUQwm.cjs +1 -0
- package/dist/shared/index-B1zDCCqy.mjs +78 -0
- package/dist/shared/index-B6xIO6kg.cjs +1 -0
- package/dist/shared/{index-B9RYNZUh.cjs → index-BWDaV6FO.cjs} +1 -1
- package/dist/shared/index-BmJPEXUM.mjs +222 -0
- package/dist/shared/{index.vue_vue_type_style_index_0_lang-aqtfjdVm.mjs → index-Bs2OQHXk.mjs} +33 -31
- package/dist/shared/index-BvKFjDgX.cjs +1 -0
- package/dist/shared/index-CaNxcPSD.mjs +254 -0
- package/dist/shared/{index-DEkng5wh.cjs → index-CwzztWPU.cjs} +1 -1
- package/dist/shared/index-D-YyFaZ6.cjs +1 -0
- package/dist/shared/{index-BTL45WYB.cjs → index-DLLDXfic.cjs} +1 -1
- package/dist/shared/{index-CVoiIRas.mjs → index-D_rRdrge.mjs} +1 -1
- package/dist/shared/{index-CYn7TvRx.mjs → index-DfR8Z9MN.mjs} +1 -1
- package/dist/shared/index-Dvf1zJ7h.cjs +1 -0
- package/dist/shared/index-rcu9CzSn.cjs +1 -0
- package/dist/shared/index-xuTVtF4x.mjs +6 -0
- package/dist/shared/index.vue_vue_type_script_lang-8AT3-xU-.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_lang-BaIOvoQn.mjs +43 -0
- package/dist/shared/index.vue_vue_type_script_lang-BgapsQjI.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_lang-Bk0kLg5l.mjs +34 -0
- package/dist/shared/index.vue_vue_type_script_lang-BnmY1ndj.mjs +77 -0
- package/dist/shared/index.vue_vue_type_script_lang-By3jd4gw.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_lang-CCL57H5c.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_lang-CKZUcaZ5.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_lang-CWnNQBPN.mjs +31 -0
- package/dist/shared/index.vue_vue_type_script_lang-CfjfZCT3.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_lang-ChS-3_vl.mjs +43 -0
- package/dist/shared/index.vue_vue_type_script_lang-DRvk4-_O.mjs +43 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-BLF3RNlY.mjs +331 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-BXnZt9UT.mjs +63 -0
- package/dist/shared/{index.vue_vue_type_script_setup_true_lang-DXtovY1E.mjs → index.vue_vue_type_script_setup_true_lang-C91DUwOD.mjs} +1 -1
- package/dist/shared/{index.vue_vue_type_script_setup_true_lang-DXGjuA2f.cjs → index.vue_vue_type_script_setup_true_lang-CuXBYNXZ.cjs} +1 -1
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-D7BlbHN5.cjs +1 -0
- package/dist/shared/{index.vue_vue_type_script_setup_true_lang-CUox3Lm-.mjs → index.vue_vue_type_script_setup_true_lang-DP-jqqo2.mjs} +1 -1
- package/dist/shared/{index.vue_vue_type_script_setup_true_lang-kje3Rtlw.cjs → index.vue_vue_type_script_setup_true_lang-DkDEcB4G.cjs} +1 -1
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-S6QPMZay.cjs +1 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-BJXS2dVf.mjs +126 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-CL_IFx-Z.cjs +1 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-CUqnwExG.mjs +80 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-DXQ9l1XF.mjs +286 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-M0qKRXd2.cjs +1 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-lmRmXLwB.cjs +1 -0
- package/index.d.ts +156 -23
- package/package.json +74 -1
- package/qy-aside/index.d.ts +47 -0
- package/qy-col/index.d.ts +65 -0
- package/qy-container/index.d.ts +49 -0
- package/qy-drawer/index.d.ts +55 -0
- package/qy-fullscreen/index.d.ts +72 -0
- package/qy-icon/index.d.ts +105 -0
- package/qy-icon-picker/index.d.ts +56 -0
- package/qy-loading/index.d.ts +25 -0
- package/qy-main/index.d.ts +45 -0
- package/qy-result/index.d.ts +64 -0
- package/qy-row/index.d.ts +59 -0
- package/qy-statistic/index.d.ts +61 -0
- package/dist/shared/index-B8phg478.cjs +0 -1
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-CmQLfhRo.cjs +0 -1
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-DobP199g.mjs +0 -63
- package/dist/shared/index.vue_vue_type_style_index_0_lang-C6urLjSf.cjs +0 -1
- package/dist/shared/index.vue_vue_type_style_index_0_lang-CVxWn-Vs.mjs +0 -121
- package/dist/shared/index.vue_vue_type_style_index_0_lang-Dm1r1WBK.cjs +0 -1
- /package/dist/shared/{index-PlyLRNmb.cjs → index-Bmw9BNXm.cjs} +0 -0
- /package/dist/shared/{index-UGOgNLvm.cjs → index-BpI0jwYK.cjs} +0 -0
- /package/dist/shared/{index-DA3GVIZY.cjs → index-BxvS3vlc.cjs} +0 -0
- /package/dist/shared/{index-DMiZy6gD.cjs → index-Bxz4crCd.cjs} +0 -0
- /package/dist/shared/{index-YsBzyp9n.mjs → index-C-ZAw_DP.mjs} +0 -0
- /package/dist/shared/{index-CUITnlPr.mjs → index-C31wpivi.mjs} +0 -0
- /package/dist/shared/{index-BqV6vW9P.cjs → index-CCZttbsg.cjs} +0 -0
- /package/dist/shared/{index-DjyaOKUS.cjs → index-CltDZpF9.cjs} +0 -0
- /package/dist/shared/{index-mTWXYnLm.mjs → index-CmRclPWX.mjs} +0 -0
- /package/dist/shared/{index-DvA3Wy_F.mjs → index-Co0_4YEV.mjs} +0 -0
- /package/dist/shared/{index-WP9Dbscv.mjs → index-D6ybNdgn.mjs} +0 -0
- /package/dist/shared/{index-DHJf8Zto.mjs → index-kiAR2M_e.mjs} +0 -0
- /package/dist/shared/{index.vue_vue_type_style_index_0_lang-CWz689KH.cjs → index.vue_vue_type_style_index_0_lang-1cTut9Ql.cjs} +0 -0
- /package/dist/shared/{index.vue_vue_type_style_index_0_lang-DVqGYfD9.mjs → index.vue_vue_type_style_index_0_lang-B0CXLnL1.mjs} +0 -0
- /package/dist/shared/{index.vue_vue_type_style_index_0_lang-DIMCVnQm.mjs → index.vue_vue_type_style_index_0_lang-CPxbKjvY.mjs} +0 -0
- /package/dist/shared/{index.vue_vue_type_style_index_0_lang-CJhIFeBC.mjs → index.vue_vue_type_style_index_0_lang-CcVf5MXE.mjs} +0 -0
- /package/dist/shared/{index.vue_vue_type_style_index_0_lang-CnL4aeg1.cjs → index.vue_vue_type_style_index_0_lang-D9DraThL.cjs} +0 -0
- /package/dist/shared/{index.vue_vue_type_style_index_0_lang-Cb4yMk-r.cjs → index.vue_vue_type_style_index_0_lang-DFAaBzkW.cjs} +0 -0
- /package/dist/shared/{index.vue_vue_type_style_index_0_lang-D1kpIund.mjs → index.vue_vue_type_style_index_0_lang-DSur831A.mjs} +0 -0
- /package/dist/shared/{index.vue_vue_type_style_index_0_lang-BXTkWo5P.cjs → index.vue_vue_type_style_index_0_lang-DUgOOzEZ.cjs} +0 -0
- /package/dist/shared/{index.vue_vue_type_style_index_0_lang-C1n-zAZh.mjs → index.vue_vue_type_style_index_0_lang-DWiolYb3.mjs} +0 -0
- /package/dist/shared/{index.vue_vue_type_style_index_0_lang-BtbAft4t.cjs → index.vue_vue_type_style_index_0_lang-DccRGtZE.cjs} +0 -0
- /package/dist/shared/{index.vue_vue_type_style_index_0_lang-Q2gFF0PP.cjs → index.vue_vue_type_style_index_0_lang-RiwA2WPO.cjs} +0 -0
- /package/dist/shared/{index.vue_vue_type_style_index_0_lang-dLpQXf6x.mjs → index.vue_vue_type_style_index_0_lang-gs0YJI91.mjs} +0 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { defineComponent as s, computed as m, h as f } from "vue";
|
|
2
|
+
import { ElCol as r } from "element-plus";
|
|
3
|
+
const d = (t) => t === "class" || t === "style" || t === "id" || t === "role" || t === "title" || t.startsWith("data-") || t.startsWith("aria-"), n = s({
|
|
4
|
+
name: "QyCol",
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
props: {
|
|
7
|
+
tag: { type: String, default: "div" },
|
|
8
|
+
span: { type: Number, default: 24 },
|
|
9
|
+
offset: { type: Number, default: 0 },
|
|
10
|
+
pull: { type: Number, default: 0 },
|
|
11
|
+
push: { type: Number, default: 0 },
|
|
12
|
+
xs: [Number, Object],
|
|
13
|
+
sm: [Number, Object],
|
|
14
|
+
md: [Number, Object],
|
|
15
|
+
lg: [Number, Object],
|
|
16
|
+
xl: [Number, Object]
|
|
17
|
+
},
|
|
18
|
+
setup(t, { attrs: l, slots: e }) {
|
|
19
|
+
const a = m(
|
|
20
|
+
() => Object.fromEntries(Object.entries(l).filter(([u]) => d(u)))
|
|
21
|
+
);
|
|
22
|
+
return () => f(
|
|
23
|
+
r,
|
|
24
|
+
{
|
|
25
|
+
...a.value,
|
|
26
|
+
tag: t.tag,
|
|
27
|
+
span: t.span,
|
|
28
|
+
offset: t.offset,
|
|
29
|
+
pull: t.pull,
|
|
30
|
+
push: t.push,
|
|
31
|
+
xs: t.xs,
|
|
32
|
+
sm: t.sm,
|
|
33
|
+
md: t.md,
|
|
34
|
+
lg: t.lg,
|
|
35
|
+
xl: t.xl
|
|
36
|
+
},
|
|
37
|
+
e.default ? { default: e.default } : void 0
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
export {
|
|
42
|
+
n as _
|
|
43
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("vue"),o=require("element-plus"),a=t.defineComponent({name:"QyContainerElementPlusRenderer",inheritAttrs:!1,__name:"element-plus",props:{direction:{}},setup(e){return(r,n)=>(t.openBlock(),t.createBlock(t.unref(o.ElContainer),t.mergeProps(r.$attrs,{direction:e.direction}),{default:t.withCtx(()=>[t.renderSlot(r.$slots,"default")]),_:3},16,["direction"]))}}),c=e=>e==="class"||e==="style"||e==="id"||e==="role"||e==="title"||e.startsWith("data-")||e.startsWith("aria-"),l=t.defineComponent({name:"QyContainer",inheritAttrs:!1,props:{direction:{type:String,default:"horizontal"}},setup(e,{attrs:r,slots:n}){const i=t.computed(()=>Object.fromEntries(Object.entries(r).filter(([s])=>c(s))));return()=>t.h(a,{...i.value,direction:e.direction},n.default?{default:n.default}:void 0)}});exports._sfc_main=l;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { defineComponent as s, computed as f, h as n } from "vue";
|
|
2
|
+
import { ElRow as u } from "element-plus";
|
|
3
|
+
const l = (t) => t === "class" || t === "style" || t === "id" || t === "role" || t === "title" || t.startsWith("data-") || t.startsWith("aria-"), g = s({
|
|
4
|
+
name: "QyRow",
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
props: {
|
|
7
|
+
tag: { type: String, default: "div" },
|
|
8
|
+
gutter: { type: Number, default: 0 },
|
|
9
|
+
justify: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: "start"
|
|
12
|
+
},
|
|
13
|
+
align: String
|
|
14
|
+
},
|
|
15
|
+
setup(t, { attrs: a, slots: e }) {
|
|
16
|
+
const i = f(
|
|
17
|
+
() => Object.fromEntries(Object.entries(a).filter(([r]) => l(r)))
|
|
18
|
+
);
|
|
19
|
+
return () => n(
|
|
20
|
+
u,
|
|
21
|
+
{
|
|
22
|
+
...i.value,
|
|
23
|
+
tag: t.tag,
|
|
24
|
+
gutter: t.gutter,
|
|
25
|
+
justify: t.justify,
|
|
26
|
+
align: t.align
|
|
27
|
+
},
|
|
28
|
+
e.default ? { default: e.default } : void 0
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
export {
|
|
33
|
+
g as _
|
|
34
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { defineComponent as y, ref as A, computed as g, onMounted as w, watch as b, onBeforeUnmount as M, h as F } from "vue";
|
|
2
|
+
import { ElStatistic as N } from "element-plus";
|
|
3
|
+
const j = (e) => e === "class" || e === "style" || e === "id" || e === "role" || e.startsWith("data-") || e.startsWith("aria-"), v = () => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches, V = y({
|
|
4
|
+
name: "QyStatistic",
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
props: {
|
|
7
|
+
value: { type: Number, default: 0 },
|
|
8
|
+
precision: { type: Number, default: 0 },
|
|
9
|
+
decimalSeparator: { type: String, default: "." },
|
|
10
|
+
groupSeparator: { type: String, default: "," },
|
|
11
|
+
formatter: Function,
|
|
12
|
+
valueStyle: [String, Object, Array, Boolean],
|
|
13
|
+
title: String,
|
|
14
|
+
prefix: String,
|
|
15
|
+
suffix: String,
|
|
16
|
+
animated: Boolean,
|
|
17
|
+
duration: { type: Number, default: 1e3 },
|
|
18
|
+
startValue: { type: Number, default: 0 }
|
|
19
|
+
},
|
|
20
|
+
setup(e, { attrs: S, slots: r }) {
|
|
21
|
+
const i = A(
|
|
22
|
+
e.animated && e.duration > 0 && !v() ? e.startValue : e.value
|
|
23
|
+
), x = g(
|
|
24
|
+
() => Object.fromEntries(Object.entries(S).filter(([a]) => j(a)))
|
|
25
|
+
);
|
|
26
|
+
let n = !1, t, u = 0;
|
|
27
|
+
const f = () => {
|
|
28
|
+
u += 1, t !== void 0 && (cancelAnimationFrame(t), t = void 0);
|
|
29
|
+
}, l = (a) => {
|
|
30
|
+
if (f(), !n || !e.animated || e.duration <= 0 || v()) {
|
|
31
|
+
i.value = a;
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
const o = i.value;
|
|
35
|
+
if (o === a) return;
|
|
36
|
+
const h = u;
|
|
37
|
+
let d;
|
|
38
|
+
const c = (m) => {
|
|
39
|
+
if (!n || h !== u) return;
|
|
40
|
+
d ?? (d = m);
|
|
41
|
+
const s = Math.min(1, (m - d) / e.duration);
|
|
42
|
+
i.value = o + (a - o) * s, s < 1 ? t = requestAnimationFrame(c) : t = void 0;
|
|
43
|
+
};
|
|
44
|
+
t = requestAnimationFrame(c);
|
|
45
|
+
};
|
|
46
|
+
return w(() => {
|
|
47
|
+
n = !0, l(e.value);
|
|
48
|
+
}), b(
|
|
49
|
+
() => [e.value, e.animated, e.duration],
|
|
50
|
+
() => l(e.value)
|
|
51
|
+
), M(() => {
|
|
52
|
+
n = !1, f();
|
|
53
|
+
}), () => F(
|
|
54
|
+
N,
|
|
55
|
+
{
|
|
56
|
+
...x.value,
|
|
57
|
+
value: i.value,
|
|
58
|
+
precision: e.precision,
|
|
59
|
+
decimalSeparator: e.decimalSeparator,
|
|
60
|
+
groupSeparator: e.groupSeparator,
|
|
61
|
+
formatter: e.formatter,
|
|
62
|
+
valueStyle: e.valueStyle,
|
|
63
|
+
title: e.title,
|
|
64
|
+
prefix: e.prefix,
|
|
65
|
+
suffix: e.suffix
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
title: r.title,
|
|
69
|
+
prefix: r.prefix,
|
|
70
|
+
suffix: r.suffix
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
export {
|
|
76
|
+
V as _
|
|
77
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),i=require("element-plus"),l=e.defineComponent({name:"QyMainElementPlusRenderer",inheritAttrs:!1,__name:"element-plus",setup(t){return(r,n)=>(e.openBlock(),e.createBlock(e.unref(i.ElMain),e.normalizeProps(e.guardReactiveProps(r.$attrs)),{default:e.withCtx(()=>[e.renderSlot(r.$slots,"default")]),_:3},16))}}),o=t=>t==="class"||t==="style"||t==="id"||t==="role"||t==="title"||t.startsWith("data-")||t.startsWith("aria-"),u=e.defineComponent({name:"QyMain",inheritAttrs:!1,setup(t,{attrs:r,slots:n}){const s=e.computed(()=>Object.fromEntries(Object.entries(r).filter(([a])=>o(a))));return()=>e.h(l,s.value,n.default?{default:n.default}:void 0)}});exports._sfc_main=u;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),n=require("element-plus"),u=t=>t==="class"||t==="style"||t==="id"||t==="role"||t==="title"||t.startsWith("data-")||t.startsWith("aria-"),l=e.defineComponent({name:"QyRow",inheritAttrs:!1,props:{tag:{type:String,default:"div"},gutter:{type:Number,default:0},justify:{type:String,default:"start"},align:String},setup(t,{attrs:i,slots:a}){const r=e.computed(()=>Object.fromEntries(Object.entries(i).filter(([s])=>u(s))));return()=>e.h(n.ElRow,{...r.value,tag:t.tag,gutter:t.gutter,justify:t.justify,align:t.align},a.default?{default:a.default}:void 0)}});exports._sfc_main=l;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),f=require("element-plus"),m=t=>t==="class"||t==="style"||t==="id"||t==="role"||t==="title"||t.startsWith("data-")||t.startsWith("aria-"),r=e.defineComponent({name:"QyCol",inheritAttrs:!1,props:{tag:{type:String,default:"div"},span:{type:Number,default:24},offset:{type:Number,default:0},pull:{type:Number,default:0},push:{type:Number,default:0},xs:[Number,Object],sm:[Number,Object],md:[Number,Object],lg:[Number,Object],xl:[Number,Object]},setup(t,{attrs:l,slots:u}){const s=e.computed(()=>Object.fromEntries(Object.entries(l).filter(([a])=>m(a))));return()=>e.h(f.ElCol,{...s.value,tag:t.tag,span:t.span,offset:t.offset,pull:t.pull,push:t.push,xs:t.xs,sm:t.sm,md:t.md,lg:t.lg,xl:t.xl},u.default?{default:u.default}:void 0)}});exports._sfc_main=r;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { defineComponent as a, openBlock as i, createBlock as o, unref as l, normalizeProps as f, guardReactiveProps as u, withCtx as c, renderSlot as m, computed as d, h as p } from "vue";
|
|
2
|
+
import { ElMain as _ } from "element-plus";
|
|
3
|
+
const h = /* @__PURE__ */ a({
|
|
4
|
+
name: "QyMainElementPlusRenderer",
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
__name: "element-plus",
|
|
7
|
+
setup(t) {
|
|
8
|
+
return (e, r) => (i(), o(l(_), f(u(e.$attrs)), {
|
|
9
|
+
default: c(() => [
|
|
10
|
+
m(e.$slots, "default")
|
|
11
|
+
]),
|
|
12
|
+
_: 3
|
|
13
|
+
}, 16));
|
|
14
|
+
}
|
|
15
|
+
}), A = (t) => t === "class" || t === "style" || t === "id" || t === "role" || t === "title" || t.startsWith("data-") || t.startsWith("aria-"), M = a({
|
|
16
|
+
name: "QyMain",
|
|
17
|
+
inheritAttrs: !1,
|
|
18
|
+
setup(t, { attrs: e, slots: r }) {
|
|
19
|
+
const s = d(
|
|
20
|
+
() => Object.fromEntries(Object.entries(e).filter(([n]) => A(n)))
|
|
21
|
+
);
|
|
22
|
+
return () => p(
|
|
23
|
+
h,
|
|
24
|
+
s.value,
|
|
25
|
+
r.default ? { default: r.default } : void 0
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
export {
|
|
30
|
+
M as _
|
|
31
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("vue"),A=require("element-plus"),g=e=>e==="class"||e==="style"||e==="id"||e==="role"||e.startsWith("data-")||e.startsWith("aria-"),S=()=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,w=t.defineComponent({name:"QyStatistic",inheritAttrs:!1,props:{value:{type:Number,default:0},precision:{type:Number,default:0},decimalSeparator:{type:String,default:"."},groupSeparator:{type:String,default:","},formatter:Function,valueStyle:[String,Object,Array,Boolean],title:String,prefix:String,suffix:String,animated:Boolean,duration:{type:Number,default:1e3},startValue:{type:Number,default:0}},setup(e,{attrs:h,slots:u}){const n=t.ref(e.animated&&e.duration>0&&!S()?e.startValue:e.value),x=t.computed(()=>Object.fromEntries(Object.entries(h).filter(([i])=>g(i))));let r=!1,a,l=0;const f=()=>{l+=1,a!==void 0&&(cancelAnimationFrame(a),a=void 0)},d=i=>{if(f(),!r||!e.animated||e.duration<=0||S()){n.value=i;return}const o=n.value;if(o===i)return;const y=l;let c;const m=s=>{if(!r||y!==l)return;c??(c=s);const v=Math.min(1,(s-c)/e.duration);n.value=o+(i-o)*v,v<1?a=requestAnimationFrame(m):a=void 0};a=requestAnimationFrame(m)};return t.onMounted(()=>{r=!0,d(e.value)}),t.watch(()=>[e.value,e.animated,e.duration],()=>d(e.value)),t.onBeforeUnmount(()=>{r=!1,f()}),()=>t.h(A.ElStatistic,{...x.value,value:n.value,precision:e.precision,decimalSeparator:e.decimalSeparator,groupSeparator:e.groupSeparator,formatter:e.formatter,valueStyle:e.valueStyle,title:e.title,prefix:e.prefix,suffix:e.suffix},{title:u.title,prefix:u.prefix,suffix:u.suffix})}});exports._sfc_main=w;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { defineComponent as s, openBlock as n, createBlock as d, unref as l, mergeProps as o, withCtx as f, renderSlot as p, computed as u, h as m } from "vue";
|
|
2
|
+
import { ElAside as c } from "element-plus";
|
|
3
|
+
const h = /* @__PURE__ */ s({
|
|
4
|
+
name: "QyAsideElementPlusRenderer",
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
__name: "element-plus",
|
|
7
|
+
props: {
|
|
8
|
+
width: {}
|
|
9
|
+
},
|
|
10
|
+
setup(t) {
|
|
11
|
+
return (e, r) => (n(), d(l(c), o(e.$attrs, { width: t.width }), {
|
|
12
|
+
default: f(() => [
|
|
13
|
+
p(e.$slots, "default")
|
|
14
|
+
]),
|
|
15
|
+
_: 3
|
|
16
|
+
}, 16, ["width"]));
|
|
17
|
+
}
|
|
18
|
+
}), w = (t) => t === "class" || t === "style" || t === "id" || t === "role" || t === "title" || t.startsWith("data-") || t.startsWith("aria-"), E = s({
|
|
19
|
+
name: "QyAside",
|
|
20
|
+
inheritAttrs: !1,
|
|
21
|
+
props: {
|
|
22
|
+
width: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: "300px"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
setup(t, { attrs: e, slots: r }) {
|
|
28
|
+
const i = u(
|
|
29
|
+
() => Object.fromEntries(Object.entries(e).filter(([a]) => w(a)))
|
|
30
|
+
);
|
|
31
|
+
return () => m(
|
|
32
|
+
h,
|
|
33
|
+
{
|
|
34
|
+
...i.value,
|
|
35
|
+
width: t.width
|
|
36
|
+
},
|
|
37
|
+
r.default ? { default: r.default } : void 0
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
export {
|
|
42
|
+
E as _
|
|
43
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { defineComponent as n, openBlock as a, createBlock as s, unref as l, mergeProps as c, withCtx as d, renderSlot as f, computed as u, h as m } from "vue";
|
|
2
|
+
import { ElContainer as p } from "element-plus";
|
|
3
|
+
const h = /* @__PURE__ */ n({
|
|
4
|
+
name: "QyContainerElementPlusRenderer",
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
__name: "element-plus",
|
|
7
|
+
props: {
|
|
8
|
+
direction: {}
|
|
9
|
+
},
|
|
10
|
+
setup(t) {
|
|
11
|
+
return (e, r) => (a(), s(l(p), c(e.$attrs, { direction: t.direction }), {
|
|
12
|
+
default: d(() => [
|
|
13
|
+
f(e.$slots, "default")
|
|
14
|
+
]),
|
|
15
|
+
_: 3
|
|
16
|
+
}, 16, ["direction"]));
|
|
17
|
+
}
|
|
18
|
+
}), _ = (t) => t === "class" || t === "style" || t === "id" || t === "role" || t === "title" || t.startsWith("data-") || t.startsWith("aria-"), E = n({
|
|
19
|
+
name: "QyContainer",
|
|
20
|
+
inheritAttrs: !1,
|
|
21
|
+
props: {
|
|
22
|
+
direction: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: "horizontal"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
setup(t, { attrs: e, slots: r }) {
|
|
28
|
+
const i = u(
|
|
29
|
+
() => Object.fromEntries(Object.entries(e).filter(([o]) => _(o)))
|
|
30
|
+
);
|
|
31
|
+
return () => m(
|
|
32
|
+
h,
|
|
33
|
+
{
|
|
34
|
+
...i.value,
|
|
35
|
+
direction: t.direction
|
|
36
|
+
},
|
|
37
|
+
r.default ? { default: r.default } : void 0
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
export {
|
|
42
|
+
E as _
|
|
43
|
+
};
|
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
import { defineComponent as F, computed as g, openBlock as V, createBlock as T, unref as p, normalizeClass as H, createSlots as P, withCtx as v, renderSlot as w, createElementVNode as C, toDisplayString as I, createElementBlock as G, createCommentVNode as U, ref as k, watch as Z, onMounted as j, onBeforeUnmount as Q, nextTick as K } from "vue";
|
|
2
|
+
import { ElDrawer as W } from "element-plus";
|
|
3
|
+
const J = { class: "qy-drawer__header" }, X = { class: "qy-drawer__header-content" }, Y = { class: "qy-drawer__title" }, ee = /* @__PURE__ */ F({
|
|
4
|
+
name: "QyDrawerElementRenderer",
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
__name: "ElementDrawerRenderer",
|
|
7
|
+
props: {
|
|
8
|
+
id: {},
|
|
9
|
+
modelValue: { type: Boolean },
|
|
10
|
+
direction: {},
|
|
11
|
+
size: {},
|
|
12
|
+
teleportTo: {},
|
|
13
|
+
title: {},
|
|
14
|
+
showHeader: { type: Boolean },
|
|
15
|
+
showClose: { type: Boolean },
|
|
16
|
+
showOverlay: { type: Boolean },
|
|
17
|
+
destroyOnClose: { type: Boolean },
|
|
18
|
+
bodyPadding: {},
|
|
19
|
+
overlayVariant: {},
|
|
20
|
+
close: { type: Function }
|
|
21
|
+
},
|
|
22
|
+
emits: ["opened", "closed"],
|
|
23
|
+
setup(e, { expose: o }) {
|
|
24
|
+
const t = e, r = g(
|
|
25
|
+
() => t.bodyPadding === "none" ? "qy-drawer__body--none" : "qy-drawer__body--default"
|
|
26
|
+
), f = g(
|
|
27
|
+
() => t.overlayVariant === "transparent" ? "qy-drawer__overlay--transparent" : "qy-drawer__overlay--default"
|
|
28
|
+
), s = g(() => [
|
|
29
|
+
"qy-drawer",
|
|
30
|
+
`qy-drawer--body-${t.bodyPadding}`,
|
|
31
|
+
`qy-drawer--overlay-${t.overlayVariant}`
|
|
32
|
+
]), d = t.close;
|
|
33
|
+
function y() {
|
|
34
|
+
return typeof document > "u" ? null : document.querySelector(
|
|
35
|
+
`[data-qy-drawer-id="${t.id}"]`
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
function m() {
|
|
39
|
+
const l = y();
|
|
40
|
+
return (l == null ? void 0 : l.closest(".el-overlay")) || null;
|
|
41
|
+
}
|
|
42
|
+
return o({ getPanelElement: y, getOverlayElement: m }), (l, i) => (V(), T(p(W), {
|
|
43
|
+
"model-value": e.modelValue,
|
|
44
|
+
direction: e.direction,
|
|
45
|
+
size: e.size,
|
|
46
|
+
"append-to": e.teleportTo,
|
|
47
|
+
title: e.title,
|
|
48
|
+
"with-header": e.showHeader,
|
|
49
|
+
"show-close": !1,
|
|
50
|
+
modal: e.showOverlay,
|
|
51
|
+
"close-on-click-modal": !1,
|
|
52
|
+
"close-on-press-escape": !1,
|
|
53
|
+
"destroy-on-close": e.destroyOnClose,
|
|
54
|
+
"lock-scroll": !1,
|
|
55
|
+
"body-class": r.value,
|
|
56
|
+
"modal-class": f.value,
|
|
57
|
+
class: H(s.value),
|
|
58
|
+
"data-qy-drawer-id": e.id,
|
|
59
|
+
onOpened: i[1] || (i[1] = (h) => l.$emit("opened")),
|
|
60
|
+
onClosed: i[2] || (i[2] = (h) => l.$emit("closed"))
|
|
61
|
+
}, P({
|
|
62
|
+
header: v(({ titleId: h }) => [
|
|
63
|
+
C("div", J, [
|
|
64
|
+
C("div", X, [
|
|
65
|
+
w(l.$slots, "header", {
|
|
66
|
+
close: p(d),
|
|
67
|
+
titleId: h
|
|
68
|
+
}, () => [
|
|
69
|
+
C("span", Y, I(e.title), 1)
|
|
70
|
+
])
|
|
71
|
+
]),
|
|
72
|
+
e.showClose ? (V(), G("button", {
|
|
73
|
+
key: 0,
|
|
74
|
+
"data-testid": "qy-drawer-close",
|
|
75
|
+
class: "qy-drawer__close",
|
|
76
|
+
type: "button",
|
|
77
|
+
"aria-label": "关闭抽屉",
|
|
78
|
+
onClick: i[0] || (i[0] = //@ts-ignore
|
|
79
|
+
(...b) => p(d) && p(d)(...b))
|
|
80
|
+
}, [...i[3] || (i[3] = [
|
|
81
|
+
C("span", { "aria-hidden": "true" }, "×", -1)
|
|
82
|
+
])])) : U("", !0)
|
|
83
|
+
])
|
|
84
|
+
]),
|
|
85
|
+
default: v(() => [
|
|
86
|
+
w(l.$slots, "default", { close: p(d) })
|
|
87
|
+
]),
|
|
88
|
+
_: 2
|
|
89
|
+
}, [
|
|
90
|
+
l.$slots.footer ? {
|
|
91
|
+
name: "footer",
|
|
92
|
+
fn: v(() => [
|
|
93
|
+
w(l.$slots, "footer", { close: p(d) })
|
|
94
|
+
]),
|
|
95
|
+
key: "0"
|
|
96
|
+
} : void 0
|
|
97
|
+
]), 1032, ["model-value", "direction", "size", "append-to", "title", "with-header", "modal", "destroy-on-close", "body-class", "modal-class", "class", "data-qy-drawer-id"]));
|
|
98
|
+
}
|
|
99
|
+
}), x = [
|
|
100
|
+
"a[href]",
|
|
101
|
+
"area[href]",
|
|
102
|
+
"button:not([disabled])",
|
|
103
|
+
'input:not([disabled]):not([type="hidden"])',
|
|
104
|
+
"select:not([disabled])",
|
|
105
|
+
"textarea:not([disabled])",
|
|
106
|
+
"iframe",
|
|
107
|
+
"object",
|
|
108
|
+
"embed",
|
|
109
|
+
'[contenteditable="true"]',
|
|
110
|
+
'[tabindex]:not([tabindex="-1"])'
|
|
111
|
+
].join(",");
|
|
112
|
+
function te() {
|
|
113
|
+
if (typeof document > "u") return null;
|
|
114
|
+
const e = document.activeElement;
|
|
115
|
+
return e instanceof HTMLElement ? e : null;
|
|
116
|
+
}
|
|
117
|
+
function oe(e) {
|
|
118
|
+
var t, r;
|
|
119
|
+
if (!e) return;
|
|
120
|
+
(r = (t = e.querySelector(x) || e).focus) == null || r.call(t);
|
|
121
|
+
}
|
|
122
|
+
function ne(e) {
|
|
123
|
+
return !!(e != null && e.querySelector(x));
|
|
124
|
+
}
|
|
125
|
+
function le(e) {
|
|
126
|
+
!e || !e.isConnected || e.focus();
|
|
127
|
+
}
|
|
128
|
+
const c = [], O = /* @__PURE__ */ new Set();
|
|
129
|
+
let q = null;
|
|
130
|
+
function A() {
|
|
131
|
+
return [...c].reverse().find((e) => e.isOpen());
|
|
132
|
+
}
|
|
133
|
+
function S(e) {
|
|
134
|
+
if (!e.isConnected) return !1;
|
|
135
|
+
const o = window.getComputedStyle(e);
|
|
136
|
+
return o.display !== "none" && o.visibility !== "hidden";
|
|
137
|
+
}
|
|
138
|
+
function re(e) {
|
|
139
|
+
const { panel: o, overlay: t } = e.getLayerElements();
|
|
140
|
+
return t && S(t) ? t : o && S(o) ? o : null;
|
|
141
|
+
}
|
|
142
|
+
function L(e) {
|
|
143
|
+
const o = Number.parseInt(window.getComputedStyle(e).zIndex, 10);
|
|
144
|
+
return Number.isFinite(o) ? o : 0;
|
|
145
|
+
}
|
|
146
|
+
function ae(e, o) {
|
|
147
|
+
const t = L(e), r = L(o);
|
|
148
|
+
return t !== r ? t > r : !!(o.compareDocumentPosition(e) & Node.DOCUMENT_POSITION_FOLLOWING);
|
|
149
|
+
}
|
|
150
|
+
function se(e) {
|
|
151
|
+
return Array.from(
|
|
152
|
+
document.querySelectorAll(".el-overlay, .el-drawer, .el-dialog")
|
|
153
|
+
).filter(S).some((t) => t === e || !t.matches(".el-overlay") && t.closest(".el-overlay") ? !1 : ae(t, e));
|
|
154
|
+
}
|
|
155
|
+
function de(e) {
|
|
156
|
+
const o = re(e);
|
|
157
|
+
return !!(o && !se(o));
|
|
158
|
+
}
|
|
159
|
+
function ie(e) {
|
|
160
|
+
return c.some((o) => o.id !== e && o.isOpen());
|
|
161
|
+
}
|
|
162
|
+
function ue(e) {
|
|
163
|
+
return [...c].reverse().filter((o) => o.id !== e).map((o) => o.getFocusTarget()).find((o) => o == null ? void 0 : o.isConnected) || null;
|
|
164
|
+
}
|
|
165
|
+
function ce(e) {
|
|
166
|
+
return c.push(e), () => {
|
|
167
|
+
const o = c.indexOf(e);
|
|
168
|
+
o >= 0 && c.splice(o, 1);
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
function fe(e) {
|
|
172
|
+
const o = c.findIndex((r) => r.id === e);
|
|
173
|
+
if (o < 0) return;
|
|
174
|
+
const [t] = c.splice(o, 1);
|
|
175
|
+
c.push(t);
|
|
176
|
+
}
|
|
177
|
+
function B(e, o) {
|
|
178
|
+
if (!(typeof document > "u" || !document.body)) {
|
|
179
|
+
if (o) {
|
|
180
|
+
if (O.has(e)) return;
|
|
181
|
+
O.size === 0 && (q = document.body.style.overflow), O.add(e), document.body.style.overflow = "hidden";
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
!O.delete(e) || O.size > 0 || (document.body.style.overflow = q ?? "", q = null);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
function ye(e) {
|
|
188
|
+
if (e.key !== "Escape" && e.code !== "Escape") return;
|
|
189
|
+
const o = A();
|
|
190
|
+
!o || !de(o) || (e.preventDefault(), e.stopPropagation(), o.requestClose("escape"));
|
|
191
|
+
}
|
|
192
|
+
function me(e) {
|
|
193
|
+
const o = A();
|
|
194
|
+
!o || !o.isMaskTarget(e.target) || (e.preventDefault(), e.stopPropagation(), o.requestClose("mask"));
|
|
195
|
+
}
|
|
196
|
+
typeof window < "u" && (window.addEventListener("keydown", ye, !0), document.addEventListener("click", me, !0));
|
|
197
|
+
const pe = { class: "qy-drawer__title" }, he = /* @__PURE__ */ F({
|
|
198
|
+
name: "QyDrawer",
|
|
199
|
+
inheritAttrs: !1,
|
|
200
|
+
__name: "index",
|
|
201
|
+
props: {
|
|
202
|
+
modelValue: { type: Boolean },
|
|
203
|
+
placement: { default: "right" },
|
|
204
|
+
size: { default: "30%" },
|
|
205
|
+
title: { default: "" },
|
|
206
|
+
showHeader: { type: Boolean, default: !0 },
|
|
207
|
+
showClose: { type: Boolean, default: !0 },
|
|
208
|
+
showOverlay: { type: Boolean, default: !0 },
|
|
209
|
+
closeOnMask: { type: Boolean, default: !0 },
|
|
210
|
+
closeOnEscape: { type: Boolean, default: !0 },
|
|
211
|
+
destroyOnClose: { type: Boolean, default: !0 },
|
|
212
|
+
lockScroll: { type: Boolean, default: !0 },
|
|
213
|
+
autoFocus: { type: Boolean, default: !0 },
|
|
214
|
+
restoreFocus: { type: Boolean, default: !0 },
|
|
215
|
+
closeDisabled: { type: Boolean, default: !1 },
|
|
216
|
+
teleportTo: { default: "body" },
|
|
217
|
+
bodyPadding: { default: "default" },
|
|
218
|
+
overlayVariant: { default: "default" }
|
|
219
|
+
},
|
|
220
|
+
emits: ["update:modelValue", "close", "opened", "closed"],
|
|
221
|
+
setup(e, { emit: o }) {
|
|
222
|
+
const t = e, r = o, f = k(null), s = `qy-drawer-${Math.random().toString(36).slice(2, 10)}`, d = k(!1), y = k(!1), m = k(null);
|
|
223
|
+
let l;
|
|
224
|
+
const i = g(() => ({
|
|
225
|
+
left: "ltr",
|
|
226
|
+
right: "rtl",
|
|
227
|
+
top: "ttb",
|
|
228
|
+
bottom: "btt"
|
|
229
|
+
})[t.placement]), h = g(
|
|
230
|
+
() => typeof t.size == "number" ? `${t.size}px` : t.size
|
|
231
|
+
), b = () => $("close-button");
|
|
232
|
+
function M() {
|
|
233
|
+
return t.modelValue;
|
|
234
|
+
}
|
|
235
|
+
function N(n) {
|
|
236
|
+
var E, z;
|
|
237
|
+
if (!t.showOverlay || !t.closeOnMask) return !1;
|
|
238
|
+
const a = (E = f.value) == null ? void 0 : E.getPanelElement(), u = (z = f.value) == null ? void 0 : z.getOverlayElement();
|
|
239
|
+
return !a || !u || !(n instanceof Node) ? !1 : u.contains(n) && !a.contains(n);
|
|
240
|
+
}
|
|
241
|
+
function $(n) {
|
|
242
|
+
!t.modelValue || t.closeDisabled || n === "mask" && !t.closeOnMask || n === "escape" && !t.closeOnEscape || d.value || (d.value = !0, r("update:modelValue", !1), r("close", n));
|
|
243
|
+
}
|
|
244
|
+
function D() {
|
|
245
|
+
t.modelValue && (d.value = !1, y.value = !0, m.value = te(), fe(s), B(s, t.lockScroll));
|
|
246
|
+
}
|
|
247
|
+
function R() {
|
|
248
|
+
!t.modelValue || !y.value || (t.autoFocus && K(() => {
|
|
249
|
+
var u;
|
|
250
|
+
const n = ((u = f.value) == null ? void 0 : u.getPanelElement()) || null, a = (n == null ? void 0 : n.querySelector(".el-drawer__body")) || null;
|
|
251
|
+
oe(ne(a) ? a : n);
|
|
252
|
+
}), r("opened"));
|
|
253
|
+
}
|
|
254
|
+
function _() {
|
|
255
|
+
var a;
|
|
256
|
+
if (t.modelValue || !y.value) return;
|
|
257
|
+
y.value = !1, B(s, !1), r("closed");
|
|
258
|
+
const n = ie(s);
|
|
259
|
+
if (t.restoreFocus && !n) {
|
|
260
|
+
const u = (a = m.value) != null && a.isConnected ? m.value : ue(s);
|
|
261
|
+
le(u);
|
|
262
|
+
}
|
|
263
|
+
n || (m.value = null), d.value = !1;
|
|
264
|
+
}
|
|
265
|
+
return Z(
|
|
266
|
+
() => t.modelValue,
|
|
267
|
+
(n, a) => {
|
|
268
|
+
n && D();
|
|
269
|
+
}
|
|
270
|
+
), j(() => {
|
|
271
|
+
l = ce({
|
|
272
|
+
id: s,
|
|
273
|
+
isOpen: M,
|
|
274
|
+
isMaskTarget: N,
|
|
275
|
+
requestClose: $,
|
|
276
|
+
getFocusTarget: () => m.value,
|
|
277
|
+
getLayerElements: () => {
|
|
278
|
+
var n, a;
|
|
279
|
+
return {
|
|
280
|
+
panel: ((n = f.value) == null ? void 0 : n.getPanelElement()) || null,
|
|
281
|
+
overlay: ((a = f.value) == null ? void 0 : a.getOverlayElement()) || null
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
}), D();
|
|
285
|
+
}), Q(() => {
|
|
286
|
+
l == null || l(), B(s, !1), y.value = !1;
|
|
287
|
+
}), (n, a) => (V(), T(ee, {
|
|
288
|
+
ref_key: "rendererRef",
|
|
289
|
+
ref: f,
|
|
290
|
+
id: s,
|
|
291
|
+
"model-value": t.modelValue,
|
|
292
|
+
direction: i.value,
|
|
293
|
+
size: h.value,
|
|
294
|
+
"teleport-to": t.teleportTo,
|
|
295
|
+
title: t.title,
|
|
296
|
+
"show-header": t.showHeader,
|
|
297
|
+
"show-close": t.showClose,
|
|
298
|
+
"show-overlay": t.showOverlay,
|
|
299
|
+
"destroy-on-close": t.destroyOnClose,
|
|
300
|
+
"body-padding": t.bodyPadding,
|
|
301
|
+
"overlay-variant": t.overlayVariant,
|
|
302
|
+
close: b,
|
|
303
|
+
onOpened: R,
|
|
304
|
+
onClosed: _
|
|
305
|
+
}, P({
|
|
306
|
+
header: v(({ close: u, titleId: E }) => [
|
|
307
|
+
w(n.$slots, "header", {
|
|
308
|
+
close: u,
|
|
309
|
+
titleId: E
|
|
310
|
+
}, () => [
|
|
311
|
+
C("span", pe, I(t.title), 1)
|
|
312
|
+
])
|
|
313
|
+
]),
|
|
314
|
+
default: v(() => [
|
|
315
|
+
w(n.$slots, "default", { close: b })
|
|
316
|
+
]),
|
|
317
|
+
_: 2
|
|
318
|
+
}, [
|
|
319
|
+
n.$slots.footer ? {
|
|
320
|
+
name: "footer",
|
|
321
|
+
fn: v(() => [
|
|
322
|
+
w(n.$slots, "footer", { close: b })
|
|
323
|
+
]),
|
|
324
|
+
key: "0"
|
|
325
|
+
} : void 0
|
|
326
|
+
]), 1032, ["model-value", "direction", "size", "teleport-to", "title", "show-header", "show-close", "show-overlay", "destroy-on-close", "body-padding", "overlay-variant"]));
|
|
327
|
+
}
|
|
328
|
+
});
|
|
329
|
+
export {
|
|
330
|
+
he as _
|
|
331
|
+
};
|