@element-plus/nightly 0.0.20241106 → 0.0.20241108
Sign up to get free protection for your applications and to get access to all the features.
- package/attributes.json +1 -1
- package/dist/index.full.js +34 -17
- package/dist/index.full.min.js +8 -8
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +9 -9
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +34 -17
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar-eg.js +1 -1
- package/dist/locale/ar-eg.min.js +1 -1
- package/dist/locale/ar-eg.min.mjs +1 -1
- package/dist/locale/ar-eg.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/my.js +1 -1
- package/dist/locale/my.min.js +1 -1
- package/dist/locale/my.min.mjs +1 -1
- package/dist/locale/my.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/sw.js +1 -1
- package/dist/locale/sw.min.js +1 -1
- package/dist/locale/sw.min.mjs +1 -1
- package/dist/locale/sw.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/drawer/index.mjs +2 -2
- package/es/components/drawer/src/drawer.mjs +27 -181
- package/es/components/drawer/src/drawer.mjs.map +1 -1
- package/es/components/drawer/src/drawer2.mjs +181 -27
- package/es/components/drawer/src/drawer2.mjs.map +1 -1
- package/es/components/index.mjs +1 -1
- package/es/components/mention/src/mention-dropdown2.mjs +1 -1
- package/es/components/mention/src/mention-dropdown2.mjs.map +1 -1
- package/es/components/segmented/src/segmented2.mjs +1 -0
- package/es/components/segmented/src/segmented2.mjs.map +1 -1
- package/es/components/select/src/option.mjs +2 -2
- package/es/components/select/src/option.mjs.map +1 -1
- package/es/components/select-v2/src/option-item.mjs +2 -2
- package/es/components/select-v2/src/option-item.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton.d.ts +10 -1
- package/es/components/skeleton/src/skeleton.mjs +2 -2
- package/es/components/skeleton/src/skeleton.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton.vue.d.ts +18 -2
- package/es/components/skeleton/src/skeleton2.mjs +1 -1
- package/es/components/skeleton/src/skeleton2.mjs.map +1 -1
- package/es/components/tour/src/mask.mjs +76 -19
- package/es/components/tour/src/mask.mjs.map +1 -1
- package/es/components/tour/src/mask2.mjs +19 -76
- package/es/components/tour/src/mask2.mjs.map +1 -1
- package/es/components/tour/src/tour2.mjs +1 -1
- package/es/hooks/use-throttle-render/index.d.ts +6 -1
- package/es/hooks/use-throttle-render/index.mjs +27 -8
- package/es/hooks/use-throttle-render/index.mjs.map +1 -1
- package/es/index.mjs +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/drawer/index.js +2 -2
- package/lib/components/drawer/src/drawer.js +28 -181
- package/lib/components/drawer/src/drawer.js.map +1 -1
- package/lib/components/drawer/src/drawer2.js +181 -28
- package/lib/components/drawer/src/drawer2.js.map +1 -1
- package/lib/components/index.js +1 -1
- package/lib/components/mention/src/mention-dropdown2.js +1 -1
- package/lib/components/mention/src/mention-dropdown2.js.map +1 -1
- package/lib/components/segmented/src/segmented2.js +1 -0
- package/lib/components/segmented/src/segmented2.js.map +1 -1
- package/lib/components/select/src/option.js +2 -2
- package/lib/components/select/src/option.js.map +1 -1
- package/lib/components/select-v2/src/option-item.js +2 -2
- package/lib/components/select-v2/src/option-item.js.map +1 -1
- package/lib/components/skeleton/src/skeleton.d.ts +10 -1
- package/lib/components/skeleton/src/skeleton.js +1 -1
- package/lib/components/skeleton/src/skeleton.js.map +1 -1
- package/lib/components/skeleton/src/skeleton.vue.d.ts +18 -2
- package/lib/components/skeleton/src/skeleton2.js +1 -1
- package/lib/components/skeleton/src/skeleton2.js.map +1 -1
- package/lib/components/tour/src/mask.js +76 -19
- package/lib/components/tour/src/mask.js.map +1 -1
- package/lib/components/tour/src/mask2.js +19 -76
- package/lib/components/tour/src/mask2.js.map +1 -1
- package/lib/components/tour/src/tour2.js +1 -1
- package/lib/hooks/use-throttle-render/index.d.ts +6 -1
- package/lib/hooks/use-throttle-render/index.js +27 -8
- package/lib/hooks/use-throttle-render/index.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/web-types.json +1 -1
@@ -1,24 +1,81 @@
|
|
1
|
-
import '
|
2
|
-
import
|
1
|
+
import { defineComponent, inject, computed, toRef, openBlock, createElementBlock, mergeProps, unref, createElementVNode, normalizeClass, normalizeStyle, createCommentVNode } from 'vue';
|
2
|
+
import '../../../hooks/index.mjs';
|
3
|
+
import { maskProps } from './mask2.mjs';
|
4
|
+
import { tourKey } from './helper.mjs';
|
5
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
6
|
+
import { useLockscreen } from '../../../hooks/use-lockscreen/index.mjs';
|
3
7
|
|
4
|
-
const
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
8
|
+
const __default__ = defineComponent({
|
9
|
+
name: "ElTourMask",
|
10
|
+
inheritAttrs: false
|
11
|
+
});
|
12
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
13
|
+
...__default__,
|
14
|
+
props: maskProps,
|
15
|
+
setup(__props) {
|
16
|
+
const props = __props;
|
17
|
+
const { ns } = inject(tourKey);
|
18
|
+
const radius = computed(() => {
|
19
|
+
var _a, _b;
|
20
|
+
return (_b = (_a = props.pos) == null ? void 0 : _a.radius) != null ? _b : 2;
|
21
|
+
});
|
22
|
+
const roundInfo = computed(() => {
|
23
|
+
const v = radius.value;
|
24
|
+
const baseInfo = `a${v},${v} 0 0 1`;
|
25
|
+
return {
|
26
|
+
topRight: `${baseInfo} ${v},${v}`,
|
27
|
+
bottomRight: `${baseInfo} ${-v},${v}`,
|
28
|
+
bottomLeft: `${baseInfo} ${-v},${-v}`,
|
29
|
+
topLeft: `${baseInfo} ${v},${-v}`
|
30
|
+
};
|
31
|
+
});
|
32
|
+
const path = computed(() => {
|
33
|
+
const width = window.innerWidth;
|
34
|
+
const height = window.innerHeight;
|
35
|
+
const info = roundInfo.value;
|
36
|
+
const _path = `M${width},0 L0,0 L0,${height} L${width},${height} L${width},0 Z`;
|
37
|
+
const _radius = radius.value;
|
38
|
+
return props.pos ? `${_path} M${props.pos.left + _radius},${props.pos.top} h${props.pos.width - _radius * 2} ${info.topRight} v${props.pos.height - _radius * 2} ${info.bottomRight} h${-props.pos.width + _radius * 2} ${info.bottomLeft} v${-props.pos.height + _radius * 2} ${info.topLeft} z` : _path;
|
39
|
+
});
|
40
|
+
const pathStyle = computed(() => {
|
41
|
+
return {
|
42
|
+
fill: props.fill,
|
43
|
+
pointerEvents: "auto",
|
44
|
+
cursor: "auto"
|
45
|
+
};
|
46
|
+
});
|
47
|
+
useLockscreen(toRef(props, "visible"), {
|
48
|
+
ns
|
49
|
+
});
|
50
|
+
return (_ctx, _cache) => {
|
51
|
+
return _ctx.visible ? (openBlock(), createElementBlock("div", mergeProps({
|
52
|
+
key: 0,
|
53
|
+
class: unref(ns).e("mask"),
|
54
|
+
style: {
|
55
|
+
position: "fixed",
|
56
|
+
left: 0,
|
57
|
+
right: 0,
|
58
|
+
top: 0,
|
59
|
+
bottom: 0,
|
60
|
+
zIndex: _ctx.zIndex,
|
61
|
+
pointerEvents: _ctx.pos && _ctx.targetAreaClickable ? "none" : "auto"
|
62
|
+
}
|
63
|
+
}, _ctx.$attrs), [
|
64
|
+
(openBlock(), createElementBlock("svg", { style: {
|
65
|
+
width: "100%",
|
66
|
+
height: "100%"
|
67
|
+
} }, [
|
68
|
+
createElementVNode("path", {
|
69
|
+
class: normalizeClass(unref(ns).e("hollow")),
|
70
|
+
style: normalizeStyle(unref(pathStyle)),
|
71
|
+
d: unref(path)
|
72
|
+
}, null, 14, ["d"])
|
73
|
+
]))
|
74
|
+
], 16)) : createCommentVNode("v-if", true);
|
75
|
+
};
|
20
76
|
}
|
21
77
|
});
|
78
|
+
var ElTourMask = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "mask.vue"]]);
|
22
79
|
|
23
|
-
export {
|
80
|
+
export { ElTourMask as default };
|
24
81
|
//# sourceMappingURL=mask.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"mask.mjs","sources":["../../../../../../packages/components/tour/src/mask.
|
1
|
+
{"version":3,"file":"mask.mjs","sources":["../../../../../../packages/components/tour/src/mask.vue"],"sourcesContent":["<template>\n <div\n v-if=\"visible\"\n :class=\"ns.e('mask')\"\n :style=\"({\n position: 'fixed',\n left: 0,\n right: 0,\n top: 0,\n bottom: 0,\n zIndex,\n pointerEvents: pos && targetAreaClickable ? 'none' : 'auto',\n } as any)\"\n v-bind=\"$attrs\"\n >\n <svg\n :style=\"{\n width: '100%',\n height: '100%',\n }\"\n >\n <path :class=\"ns.e('hollow')\" :style=\"pathStyle\" :d=\"path\" />\n </svg>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, inject, toRef } from 'vue'\nimport { useLockscreen } from '@element-plus/hooks'\nimport { maskProps } from './mask'\nimport { tourKey } from './helper'\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElTourMask',\n inheritAttrs: false,\n})\n\nconst props = defineProps(maskProps)\n\nconst { ns } = inject(tourKey)!\nconst radius = computed(() => props.pos?.radius ?? 2)\nconst roundInfo = computed(() => {\n const v = radius.value\n const baseInfo = `a${v},${v} 0 0 1`\n return {\n topRight: `${baseInfo} ${v},${v}`,\n bottomRight: `${baseInfo} ${-v},${v}`,\n bottomLeft: `${baseInfo} ${-v},${-v}`,\n topLeft: `${baseInfo} ${v},${-v}`,\n }\n})\n\nconst path = computed(() => {\n const width = window.innerWidth\n const height = window.innerHeight\n const info = roundInfo.value\n const _path = `M${width},0 L0,0 L0,${height} L${width},${height} L${width},0 Z`\n const _radius = radius.value\n return props.pos\n ? `${_path} M${props.pos.left + _radius},${props.pos.top} h${\n props.pos.width - _radius * 2\n } ${info.topRight} v${props.pos.height - _radius * 2} ${\n info.bottomRight\n } h${-props.pos.width + _radius * 2} ${info.bottomLeft} v${\n -props.pos.height + _radius * 2\n } ${info.topLeft} z`\n : _path\n})\n\nconst pathStyle = computed<CSSProperties>(() => {\n return {\n fill: props.fill,\n pointerEvents: 'auto',\n cursor: 'auto',\n }\n})\n\nuseLockscreen(toRef(props, 'visible'), {\n ns,\n})\n</script>\n"],"names":[],"mappings":";;;;;;;mCAiCc,CAAA;AAAA,EACZ,IAAM,EAAA,YAAA;AAAA,EACN,YAAc,EAAA,KAAA;AAChB,CAAA,CAAA,CAAA;;;;;;AAIA,IAAA,MAAM,EAAE,EAAA,EAAO,GAAA,MAAA,CAAO,OAAO,CAAA,CAAA;AAC7B,IAAA,MAAM,SAAS,QAAS,CAAA,MAAM;AAC9B,MAAM,IAAA,EAAA,EAAA,EAAA,CAAA;AACJ,MAAA,UAAU,GAAO,CAAA,EAAA,GAAA,KAAA,CAAA,GAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,MAAA,KAAA,IAAA,GAAA,EAAA,GAAA,CAAA,CAAA;AACjB,KAAA,CAAA,CAAA;AACA,IAAO,MAAA,SAAA,GAAA,QAAA,CAAA,MAAA;AAAA,MAAA,gBACQ,CAAA,KAAA,CAAQ;AAAU,MAAA,iBACf,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAQ,UAAU;AAAC,MACnC,OAAA;AAAmC,QACnC,UAAY,CAAA,EAAA,YAAa,CAAA,CAAA,CAAA,EAAK,CAAC,CAAA,CAAA;AAAA,QACjC,WAAA,EAAA,CAAA,EAAA,QAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA;AAAA,QACD,UAAA,EAAA,CAAA,EAAA,QAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA;AAED,QAAM,OAAA,EAAO,WAAe,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA;AAC1B,OAAA,CAAA;AACA,KAAA,CAAA,CAAA;AACA,IAAA,MAAA,eAAuB,CAAA,MAAA;AACvB,MAAM,MAAA,KAAA,GAAQ,MAAI,CAAA,UAAmB,CAAA;AACrC,MAAA,MAAM,eAAiB,CAAA,WAAA,CAAA;AACvB,MAAO,MAAA,IAAA,GAAM,SACN,CAAA;AAOH,MACL,MAAA,KAAA,GAAA,CAAA,CAAA,EAAA,KAAA,CAAA,WAAA,EAAA,MAAA,CAAA,EAAA,EAAA,KAAA,CAAA,CAAA,EAAA,MAAA,CAAA,EAAA,EAAA,KAAA,CAAA,IAAA,CAAA,CAAA;AAED,MAAM,MAAA,OAAA,GAAY,YAA8B,CAAA;AAC9C,MAAO,OAAA,KAAA,CAAA,GAAA,GAAA,CAAA,EAAA,KAAA,CAAA,EAAA,EAAA,KAAA,CAAA,GAAA,CAAA,IAAA,GAAA,OAAA,CAAA,CAAA,EAAA,KAAA,CAAA,GAAA,CAAA,GAAA,CAAA,EAAA,EAAA,KAAA,CAAA,GAAA,CAAA,KAAA,GAAA,OAAA,GAAA,CAAA,CAAA,CAAA,EAAA,IAAA,CAAA,QAAA,CAAA,EAAA,EAAA,KAAA,CAAA,GAAA,CAAA,MAAA,GAAA,OAAA,GAAA,CAAA,CAAA,CAAA,EAAA,IAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,KAAA,CAAA,GAAA,CAAA,KAAA,GAAA,OAAA,GAAA,CAAA,CAAA,CAAA,EAAA,IAAA,CAAA,UAAA,CAAA,EAAA,EAAA,CAAA,KAAA,CAAA,GAAA,CAAA,MAAA,GAAA,OAAA,GAAA,CAAA,CAAA,CAAA,EAAA,IAAA,CAAA,OAAA,CAAA,EAAA,CAAA,GAAA,KAAA,CAAA;AAAA,KAAA,CAAA,CAAA;AACO,IAAA,MACG,SAAA,GAAA,QAAA,CAAA,MAAA;AAAA,MAAA,OACP;AAAA,QACV,IAAA,EAAA,KAAA,CAAA,IAAA;AAAA,QACD,aAAA,EAAA,MAAA;AAED,QAAc,MAAA,EAAA,MAAA;AAAyB,OACrC,CAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -1,81 +1,24 @@
|
|
1
|
-
import
|
2
|
-
import '../../../
|
3
|
-
import { maskProps } from './mask.mjs';
|
4
|
-
import { tourKey } from './helper.mjs';
|
5
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
6
|
-
import { useLockscreen } from '../../../hooks/use-lockscreen/index.mjs';
|
1
|
+
import '../../../utils/index.mjs';
|
2
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
7
3
|
|
8
|
-
const
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
const baseInfo = `a${v},${v} 0 0 1`;
|
25
|
-
return {
|
26
|
-
topRight: `${baseInfo} ${v},${v}`,
|
27
|
-
bottomRight: `${baseInfo} ${-v},${v}`,
|
28
|
-
bottomLeft: `${baseInfo} ${-v},${-v}`,
|
29
|
-
topLeft: `${baseInfo} ${v},${-v}`
|
30
|
-
};
|
31
|
-
});
|
32
|
-
const path = computed(() => {
|
33
|
-
const width = window.innerWidth;
|
34
|
-
const height = window.innerHeight;
|
35
|
-
const info = roundInfo.value;
|
36
|
-
const _path = `M${width},0 L0,0 L0,${height} L${width},${height} L${width},0 Z`;
|
37
|
-
const _radius = radius.value;
|
38
|
-
return props.pos ? `${_path} M${props.pos.left + _radius},${props.pos.top} h${props.pos.width - _radius * 2} ${info.topRight} v${props.pos.height - _radius * 2} ${info.bottomRight} h${-props.pos.width + _radius * 2} ${info.bottomLeft} v${-props.pos.height + _radius * 2} ${info.topLeft} z` : _path;
|
39
|
-
});
|
40
|
-
const pathStyle = computed(() => {
|
41
|
-
return {
|
42
|
-
fill: props.fill,
|
43
|
-
pointerEvents: "auto",
|
44
|
-
cursor: "auto"
|
45
|
-
};
|
46
|
-
});
|
47
|
-
useLockscreen(toRef(props, "visible"), {
|
48
|
-
ns
|
49
|
-
});
|
50
|
-
return (_ctx, _cache) => {
|
51
|
-
return _ctx.visible ? (openBlock(), createElementBlock("div", mergeProps({
|
52
|
-
key: 0,
|
53
|
-
class: unref(ns).e("mask"),
|
54
|
-
style: {
|
55
|
-
position: "fixed",
|
56
|
-
left: 0,
|
57
|
-
right: 0,
|
58
|
-
top: 0,
|
59
|
-
bottom: 0,
|
60
|
-
zIndex: _ctx.zIndex,
|
61
|
-
pointerEvents: _ctx.pos && _ctx.targetAreaClickable ? "none" : "auto"
|
62
|
-
}
|
63
|
-
}, _ctx.$attrs), [
|
64
|
-
(openBlock(), createElementBlock("svg", { style: {
|
65
|
-
width: "100%",
|
66
|
-
height: "100%"
|
67
|
-
} }, [
|
68
|
-
createElementVNode("path", {
|
69
|
-
class: normalizeClass(unref(ns).e("hollow")),
|
70
|
-
style: normalizeStyle(unref(pathStyle)),
|
71
|
-
d: unref(path)
|
72
|
-
}, null, 14, ["d"])
|
73
|
-
]))
|
74
|
-
], 16)) : createCommentVNode("v-if", true);
|
75
|
-
};
|
4
|
+
const maskProps = buildProps({
|
5
|
+
zIndex: {
|
6
|
+
type: Number,
|
7
|
+
default: 1001
|
8
|
+
},
|
9
|
+
visible: Boolean,
|
10
|
+
fill: {
|
11
|
+
type: String,
|
12
|
+
default: "rgba(0,0,0,0.5)"
|
13
|
+
},
|
14
|
+
pos: {
|
15
|
+
type: definePropType(Object)
|
16
|
+
},
|
17
|
+
targetAreaClickable: {
|
18
|
+
type: Boolean,
|
19
|
+
default: true
|
76
20
|
}
|
77
21
|
});
|
78
|
-
var ElTourMask = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "mask.vue"]]);
|
79
22
|
|
80
|
-
export {
|
23
|
+
export { maskProps };
|
81
24
|
//# sourceMappingURL=mask2.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"mask2.mjs","sources":["../../../../../../packages/components/tour/src/mask.
|
1
|
+
{"version":3,"file":"mask2.mjs","sources":["../../../../../../packages/components/tour/src/mask.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type { PosInfo } from './types'\n\nexport const maskProps = buildProps({\n /**\n * @description mask's zIndex\n */\n zIndex: {\n type: Number,\n default: 1001,\n },\n /**\n * @description whether to show the mask\n */\n visible: Boolean,\n /**\n * @description mask's fill\n */\n fill: {\n type: String,\n default: 'rgba(0,0,0,0.5)',\n },\n /***\n * @description mask's transparent space position\n */\n pos: {\n type: definePropType<PosInfo | null>(Object),\n },\n /**\n * @description whether the target element can be clickable, when using mask\n */\n targetAreaClickable: {\n type: Boolean,\n default: true,\n },\n})\n\nexport type MaskProps = ExtractPropTypes<typeof maskProps>\n"],"names":[],"mappings":";;;AACY,MAAC,SAAS,GAAG,UAAU,CAAC;AACpC,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,OAAO,EAAE,OAAO;AAClB,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,iBAAiB;AAC9B,GAAG;AACH,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,EAAE,mBAAmB,EAAE;AACvB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,CAAC;;;;"}
|
@@ -3,7 +3,7 @@ import { useVModel } from '@vueuse/core';
|
|
3
3
|
import '../../../hooks/index.mjs';
|
4
4
|
import '../../../utils/index.mjs';
|
5
5
|
import { ElTeleport } from '../../teleport/index.mjs';
|
6
|
-
import ElTourMask from './
|
6
|
+
import ElTourMask from './mask.mjs';
|
7
7
|
import ElTourContent from './content2.mjs';
|
8
8
|
import ElTourSteps from './steps.mjs';
|
9
9
|
import { tourProps, tourEmits } from './tour.mjs';
|
@@ -1,2 +1,7 @@
|
|
1
1
|
import type { Ref } from 'vue';
|
2
|
-
export
|
2
|
+
export type ThrottleType = {
|
3
|
+
leading?: number;
|
4
|
+
trailing?: number;
|
5
|
+
initVal?: boolean;
|
6
|
+
} | number;
|
7
|
+
export declare const useThrottleRender: (loading: Ref<boolean>, throttle?: ThrottleType) => Ref<boolean>;
|
@@ -1,25 +1,44 @@
|
|
1
1
|
import { ref, onMounted, watch } from 'vue';
|
2
|
+
import '../../utils/index.mjs';
|
3
|
+
import { isObject } from '@vue/shared';
|
4
|
+
import { isUndefined, isNumber } from '../../utils/types.mjs';
|
2
5
|
|
3
6
|
const useThrottleRender = (loading, throttle = 0) => {
|
4
7
|
if (throttle === 0)
|
5
8
|
return loading;
|
6
|
-
const
|
9
|
+
const initVal = isObject(throttle) && Boolean(throttle.initVal);
|
10
|
+
const throttled = ref(initVal);
|
7
11
|
let timeoutHandle = null;
|
8
|
-
const dispatchThrottling = () => {
|
12
|
+
const dispatchThrottling = (timer) => {
|
13
|
+
if (isUndefined(timer)) {
|
14
|
+
throttled.value = loading.value;
|
15
|
+
return;
|
16
|
+
}
|
9
17
|
if (timeoutHandle) {
|
10
18
|
clearTimeout(timeoutHandle);
|
11
19
|
}
|
12
20
|
timeoutHandle = setTimeout(() => {
|
13
21
|
throttled.value = loading.value;
|
14
|
-
},
|
22
|
+
}, timer);
|
15
23
|
};
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
24
|
+
const dispatcher = (type) => {
|
25
|
+
if (type === "leading") {
|
26
|
+
if (isNumber(throttle)) {
|
27
|
+
dispatchThrottling(throttle);
|
28
|
+
} else {
|
29
|
+
dispatchThrottling(throttle.leading);
|
30
|
+
}
|
20
31
|
} else {
|
21
|
-
|
32
|
+
if (isObject(throttle)) {
|
33
|
+
dispatchThrottling(throttle.trailing);
|
34
|
+
} else {
|
35
|
+
throttled.value = false;
|
36
|
+
}
|
22
37
|
}
|
38
|
+
};
|
39
|
+
onMounted(() => dispatcher("leading"));
|
40
|
+
watch(() => loading.value, (val) => {
|
41
|
+
dispatcher(val ? "leading" : "trailing");
|
23
42
|
});
|
24
43
|
return throttled;
|
25
44
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../packages/hooks/use-throttle-render/index.ts"],"sourcesContent":["import { onMounted, ref, watch } from 'vue'\n\nimport type { Ref } from 'vue'\n\nexport const useThrottleRender = (loading: Ref<boolean
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../packages/hooks/use-throttle-render/index.ts"],"sourcesContent":["import { onMounted, ref, watch } from 'vue'\nimport { isNumber, isObject, isUndefined } from '@element-plus/utils'\n\nimport type { Ref } from 'vue'\n\nexport type ThrottleType =\n | { leading?: number; trailing?: number; initVal?: boolean }\n | number\n\nexport const useThrottleRender = (\n loading: Ref<boolean>,\n throttle: ThrottleType = 0\n) => {\n if (throttle === 0) return loading\n const initVal = isObject(throttle) && Boolean(throttle.initVal)\n const throttled = ref(initVal)\n let timeoutHandle: ReturnType<typeof setTimeout> | null = null\n\n const dispatchThrottling = (timer: number | undefined) => {\n if (isUndefined(timer)) {\n throttled.value = loading.value\n return\n }\n if (timeoutHandle) {\n clearTimeout(timeoutHandle)\n }\n timeoutHandle = setTimeout(() => {\n throttled.value = loading.value\n }, timer)\n }\n\n const dispatcher = (type: 'leading' | 'trailing') => {\n if (type === 'leading') {\n if (isNumber(throttle)) {\n dispatchThrottling(throttle)\n } else {\n dispatchThrottling(throttle.leading)\n }\n } else {\n if (isObject(throttle)) {\n dispatchThrottling(throttle.trailing)\n } else {\n throttled.value = false\n }\n }\n }\n\n onMounted(() => dispatcher('leading'))\n\n watch(\n () => loading.value,\n (val) => {\n dispatcher(val ? 'leading' : 'trailing')\n }\n )\n\n return throttled\n}\n"],"names":[],"mappings":";;;;;AAEY,MAAC,iBAAiB,GAAG,CAAC,OAAO,EAAE,QAAQ,GAAG,CAAC,KAAK;AAC5D,EAAE,IAAI,QAAQ,KAAK,CAAC;AACpB,IAAI,OAAO,OAAO,CAAC;AACnB,EAAE,MAAM,OAAO,GAAG,QAAQ,CAAC,QAAQ,CAAC,IAAI,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AAClE,EAAE,MAAM,SAAS,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC;AACjC,EAAE,IAAI,aAAa,GAAG,IAAI,CAAC;AAC3B,EAAE,MAAM,kBAAkB,GAAG,CAAC,KAAK,KAAK;AACxC,IAAI,IAAI,WAAW,CAAC,KAAK,CAAC,EAAE;AAC5B,MAAM,SAAS,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;AACtC,MAAM,OAAO;AACb,KAAK;AACL,IAAI,IAAI,aAAa,EAAE;AACvB,MAAM,YAAY,CAAC,aAAa,CAAC,CAAC;AAClC,KAAK;AACL,IAAI,aAAa,GAAG,UAAU,CAAC,MAAM;AACrC,MAAM,SAAS,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;AACtC,KAAK,EAAE,KAAK,CAAC,CAAC;AACd,GAAG,CAAC;AACJ,EAAE,MAAM,UAAU,GAAG,CAAC,IAAI,KAAK;AAC/B,IAAI,IAAI,IAAI,KAAK,SAAS,EAAE;AAC5B,MAAM,IAAI,QAAQ,CAAC,QAAQ,CAAC,EAAE;AAC9B,QAAQ,kBAAkB,CAAC,QAAQ,CAAC,CAAC;AACrC,OAAO,MAAM;AACb,QAAQ,kBAAkB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AAC7C,OAAO;AACP,KAAK,MAAM;AACX,MAAM,IAAI,QAAQ,CAAC,QAAQ,CAAC,EAAE;AAC9B,QAAQ,kBAAkB,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAC9C,OAAO,MAAM;AACb,QAAQ,SAAS,CAAC,KAAK,GAAG,KAAK,CAAC;AAChC,OAAO;AACP,KAAK;AACL,GAAG,CAAC;AACJ,EAAE,SAAS,CAAC,MAAM,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC;AACzC,EAAE,KAAK,CAAC,MAAM,OAAO,CAAC,KAAK,EAAE,CAAC,GAAG,KAAK;AACtC,IAAI,UAAU,CAAC,GAAG,GAAG,SAAS,GAAG,UAAU,CAAC,CAAC;AAC7C,GAAG,CAAC,CAAC;AACL,EAAE,OAAO,SAAS,CAAC;AACnB;;;;"}
|
package/es/index.mjs
CHANGED
@@ -73,7 +73,7 @@ export { dialogInjectionKey } from './components/dialog/src/constants.mjs';
|
|
73
73
|
export { ElDialog } from './components/dialog/index.mjs';
|
74
74
|
export { dividerProps } from './components/divider/src/divider.mjs';
|
75
75
|
export { ElDivider } from './components/divider/index.mjs';
|
76
|
-
export { drawerEmits, drawerProps } from './components/drawer/src/
|
76
|
+
export { drawerEmits, drawerProps } from './components/drawer/src/drawer.mjs';
|
77
77
|
export { ElDrawer } from './components/drawer/index.mjs';
|
78
78
|
export { DROPDOWN_COLLECTION_INJECTION_KEY, DROPDOWN_COLLECTION_ITEM_INJECTION_KEY, ElCollection, ElCollectionItem, FIRST_KEYS, FIRST_LAST_KEYS, LAST_KEYS, dropdownItemProps, dropdownMenuProps, dropdownProps } from './components/dropdown/src/dropdown.mjs';
|
79
79
|
export { DROPDOWN_INJECTION_KEY } from './components/dropdown/src/tokens.mjs';
|
package/es/version.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export declare const version = "0.0.
|
1
|
+
export declare const version = "0.0.20241108";
|
package/es/version.mjs
CHANGED
package/es/version.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"version.mjs","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '0.0.
|
1
|
+
{"version":3,"file":"version.mjs","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '0.0.20241108'\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"}
|
@@ -3,8 +3,8 @@
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
5
|
require('../../utils/index.js');
|
6
|
-
var drawer$1 = require('./src/
|
7
|
-
var drawer = require('./src/
|
6
|
+
var drawer$1 = require('./src/drawer2.js');
|
7
|
+
var drawer = require('./src/drawer.js');
|
8
8
|
var install = require('../../utils/vue/install.js');
|
9
9
|
|
10
10
|
const ElDrawer = install.withInstall(drawer$1["default"]);
|
@@ -2,190 +2,37 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var vue = require('vue');
|
6
|
-
var iconsVue = require('@element-plus/icons-vue');
|
7
|
-
var index$4 = require('../../overlay/index.js');
|
8
|
-
require('../../focus-trap/index.js');
|
9
|
-
var index$3 = require('../../teleport/index.js');
|
10
|
-
require('../../dialog/index.js');
|
11
5
|
require('../../../utils/index.js');
|
12
|
-
|
13
|
-
require('../../../
|
14
|
-
var
|
15
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
16
|
-
var index = require('../../../hooks/use-deprecated/index.js');
|
17
|
-
var index$1 = require('../../../hooks/use-namespace/index.js');
|
18
|
-
var index$2 = require('../../../hooks/use-locale/index.js');
|
19
|
-
var useDialog = require('../../dialog/src/use-dialog.js');
|
20
|
-
var style = require('../../../utils/dom/style.js');
|
21
|
-
var focusTrap = require('../../focus-trap/src/focus-trap.js');
|
6
|
+
require('../../dialog/index.js');
|
7
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
8
|
+
var dialog = require('../../dialog/src/dialog.js');
|
22
9
|
|
23
|
-
const
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
const {
|
46
|
-
afterEnter,
|
47
|
-
afterLeave,
|
48
|
-
beforeLeave,
|
49
|
-
visible,
|
50
|
-
rendered,
|
51
|
-
titleId,
|
52
|
-
bodyId,
|
53
|
-
zIndex,
|
54
|
-
onModalClick,
|
55
|
-
onOpenAutoFocus,
|
56
|
-
onCloseAutoFocus,
|
57
|
-
onFocusoutPrevented,
|
58
|
-
onCloseRequested,
|
59
|
-
handleClose
|
60
|
-
} = useDialog.useDialog(props, drawerRef);
|
61
|
-
const isHorizontal = vue.computed(() => props.direction === "rtl" || props.direction === "ltr");
|
62
|
-
const drawerSize = vue.computed(() => style.addUnit(props.size));
|
63
|
-
expose({
|
64
|
-
handleClose,
|
65
|
-
afterEnter,
|
66
|
-
afterLeave
|
67
|
-
});
|
68
|
-
return (_ctx, _cache) => {
|
69
|
-
return vue.openBlock(), vue.createBlock(vue.unref(index$3.ElTeleport), {
|
70
|
-
to: _ctx.appendTo,
|
71
|
-
disabled: _ctx.appendTo !== "body" ? false : !_ctx.appendToBody
|
72
|
-
}, {
|
73
|
-
default: vue.withCtx(() => [
|
74
|
-
vue.createVNode(vue.Transition, {
|
75
|
-
name: vue.unref(ns).b("fade"),
|
76
|
-
onAfterEnter: vue.unref(afterEnter),
|
77
|
-
onAfterLeave: vue.unref(afterLeave),
|
78
|
-
onBeforeLeave: vue.unref(beforeLeave),
|
79
|
-
persisted: ""
|
80
|
-
}, {
|
81
|
-
default: vue.withCtx(() => [
|
82
|
-
vue.withDirectives(vue.createVNode(vue.unref(index$4.ElOverlay), {
|
83
|
-
mask: _ctx.modal,
|
84
|
-
"overlay-class": _ctx.modalClass,
|
85
|
-
"z-index": vue.unref(zIndex),
|
86
|
-
onClick: vue.unref(onModalClick)
|
87
|
-
}, {
|
88
|
-
default: vue.withCtx(() => [
|
89
|
-
vue.createVNode(vue.unref(focusTrap["default"]), {
|
90
|
-
loop: "",
|
91
|
-
trapped: vue.unref(visible),
|
92
|
-
"focus-trap-el": drawerRef.value,
|
93
|
-
"focus-start-el": focusStartRef.value,
|
94
|
-
onFocusAfterTrapped: vue.unref(onOpenAutoFocus),
|
95
|
-
onFocusAfterReleased: vue.unref(onCloseAutoFocus),
|
96
|
-
onFocusoutPrevented: vue.unref(onFocusoutPrevented),
|
97
|
-
onReleaseRequested: vue.unref(onCloseRequested)
|
98
|
-
}, {
|
99
|
-
default: vue.withCtx(() => [
|
100
|
-
vue.createElementVNode("div", vue.mergeProps({
|
101
|
-
ref_key: "drawerRef",
|
102
|
-
ref: drawerRef,
|
103
|
-
"aria-modal": "true",
|
104
|
-
"aria-label": _ctx.title || void 0,
|
105
|
-
"aria-labelledby": !_ctx.title ? vue.unref(titleId) : void 0,
|
106
|
-
"aria-describedby": vue.unref(bodyId)
|
107
|
-
}, _ctx.$attrs, {
|
108
|
-
class: [vue.unref(ns).b(), _ctx.direction, vue.unref(visible) && "open"],
|
109
|
-
style: vue.unref(isHorizontal) ? "width: " + vue.unref(drawerSize) : "height: " + vue.unref(drawerSize),
|
110
|
-
role: "dialog",
|
111
|
-
onClick: vue.withModifiers(() => {
|
112
|
-
}, ["stop"])
|
113
|
-
}), [
|
114
|
-
vue.createElementVNode("span", {
|
115
|
-
ref_key: "focusStartRef",
|
116
|
-
ref: focusStartRef,
|
117
|
-
class: vue.normalizeClass(vue.unref(ns).e("sr-focus")),
|
118
|
-
tabindex: "-1"
|
119
|
-
}, null, 2),
|
120
|
-
_ctx.withHeader ? (vue.openBlock(), vue.createElementBlock("header", {
|
121
|
-
key: 0,
|
122
|
-
class: vue.normalizeClass(vue.unref(ns).e("header"))
|
123
|
-
}, [
|
124
|
-
!_ctx.$slots.title ? vue.renderSlot(_ctx.$slots, "header", {
|
125
|
-
key: 0,
|
126
|
-
close: vue.unref(handleClose),
|
127
|
-
titleId: vue.unref(titleId),
|
128
|
-
titleClass: vue.unref(ns).e("title")
|
129
|
-
}, () => [
|
130
|
-
!_ctx.$slots.title ? (vue.openBlock(), vue.createElementBlock("span", {
|
131
|
-
key: 0,
|
132
|
-
id: vue.unref(titleId),
|
133
|
-
role: "heading",
|
134
|
-
"aria-level": _ctx.headerAriaLevel,
|
135
|
-
class: vue.normalizeClass(vue.unref(ns).e("title"))
|
136
|
-
}, vue.toDisplayString(_ctx.title), 11, ["id", "aria-level"])) : vue.createCommentVNode("v-if", true)
|
137
|
-
]) : vue.renderSlot(_ctx.$slots, "title", { key: 1 }, () => [
|
138
|
-
vue.createCommentVNode(" DEPRECATED SLOT ")
|
139
|
-
]),
|
140
|
-
_ctx.showClose ? (vue.openBlock(), vue.createElementBlock("button", {
|
141
|
-
key: 2,
|
142
|
-
"aria-label": vue.unref(t)("el.drawer.close"),
|
143
|
-
class: vue.normalizeClass(vue.unref(ns).e("close-btn")),
|
144
|
-
type: "button",
|
145
|
-
onClick: vue.unref(handleClose)
|
146
|
-
}, [
|
147
|
-
vue.createVNode(vue.unref(index$5.ElIcon), {
|
148
|
-
class: vue.normalizeClass(vue.unref(ns).e("close"))
|
149
|
-
}, {
|
150
|
-
default: vue.withCtx(() => [
|
151
|
-
vue.createVNode(vue.unref(iconsVue.Close))
|
152
|
-
]),
|
153
|
-
_: 1
|
154
|
-
}, 8, ["class"])
|
155
|
-
], 10, ["aria-label", "onClick"])) : vue.createCommentVNode("v-if", true)
|
156
|
-
], 2)) : vue.createCommentVNode("v-if", true),
|
157
|
-
vue.unref(rendered) ? (vue.openBlock(), vue.createElementBlock("div", {
|
158
|
-
key: 1,
|
159
|
-
id: vue.unref(bodyId),
|
160
|
-
class: vue.normalizeClass(vue.unref(ns).e("body"))
|
161
|
-
}, [
|
162
|
-
vue.renderSlot(_ctx.$slots, "default")
|
163
|
-
], 10, ["id"])) : vue.createCommentVNode("v-if", true),
|
164
|
-
_ctx.$slots.footer ? (vue.openBlock(), vue.createElementBlock("div", {
|
165
|
-
key: 2,
|
166
|
-
class: vue.normalizeClass(vue.unref(ns).e("footer"))
|
167
|
-
}, [
|
168
|
-
vue.renderSlot(_ctx.$slots, "footer")
|
169
|
-
], 2)) : vue.createCommentVNode("v-if", true)
|
170
|
-
], 16, ["aria-label", "aria-labelledby", "aria-describedby", "onClick"])
|
171
|
-
]),
|
172
|
-
_: 3
|
173
|
-
}, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusoutPrevented", "onReleaseRequested"])
|
174
|
-
]),
|
175
|
-
_: 3
|
176
|
-
}, 8, ["mask", "overlay-class", "z-index", "onClick"]), [
|
177
|
-
[vue.vShow, vue.unref(visible)]
|
178
|
-
])
|
179
|
-
]),
|
180
|
-
_: 3
|
181
|
-
}, 8, ["name", "onAfterEnter", "onAfterLeave", "onBeforeLeave"])
|
182
|
-
]),
|
183
|
-
_: 3
|
184
|
-
}, 8, ["to", "disabled"]);
|
185
|
-
};
|
10
|
+
const drawerProps = runtime.buildProps({
|
11
|
+
...dialog.dialogProps,
|
12
|
+
direction: {
|
13
|
+
type: String,
|
14
|
+
default: "rtl",
|
15
|
+
values: ["ltr", "rtl", "ttb", "btt"]
|
16
|
+
},
|
17
|
+
size: {
|
18
|
+
type: [String, Number],
|
19
|
+
default: "30%"
|
20
|
+
},
|
21
|
+
withHeader: {
|
22
|
+
type: Boolean,
|
23
|
+
default: true
|
24
|
+
},
|
25
|
+
modalFade: {
|
26
|
+
type: Boolean,
|
27
|
+
default: true
|
28
|
+
},
|
29
|
+
headerAriaLevel: {
|
30
|
+
type: String,
|
31
|
+
default: "2"
|
186
32
|
}
|
187
33
|
});
|
188
|
-
|
34
|
+
const drawerEmits = dialog.dialogEmits;
|
189
35
|
|
190
|
-
exports
|
36
|
+
exports.drawerEmits = drawerEmits;
|
37
|
+
exports.drawerProps = drawerProps;
|
191
38
|
//# sourceMappingURL=drawer.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"drawer.js","sources":["../../../../../../packages/components/drawer/src/drawer.
|
1
|
+
{"version":3,"file":"drawer.js","sources":["../../../../../../packages/components/drawer/src/drawer.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport { dialogEmits, dialogProps } from '@element-plus/components/dialog'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const drawerProps = buildProps({\n ...dialogProps,\n direction: {\n type: String,\n default: 'rtl',\n values: ['ltr', 'rtl', 'ttb', 'btt'],\n },\n size: {\n type: [String, Number],\n default: '30%',\n },\n withHeader: {\n type: Boolean,\n default: true,\n },\n modalFade: {\n type: Boolean,\n default: true,\n },\n headerAriaLevel: {\n type: String,\n default: '2',\n },\n} as const)\n\nexport type DrawerProps = ExtractPropTypes<typeof drawerProps>\n\nexport const drawerEmits = dialogEmits\n"],"names":["buildProps","dialogProps","dialogEmits"],"mappings":";;;;;;;;;AAEY,MAAC,WAAW,GAAGA,kBAAU,CAAC;AACtC,EAAE,GAAGC,kBAAW;AAChB,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK;AAClB,IAAI,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;AACxC,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,eAAe,EAAE;AACnB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,WAAW,GAAGC;;;;;"}
|