@element-plus/nightly 0.0.20240505 → 0.0.20240507
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 +8 -3
- package/dist/index.full.js +4 -3
- package/dist/index.full.min.js +2 -2
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +2 -2
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +4 -3
- 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/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/anchor/index.mjs +2 -2
- package/es/components/anchor/src/anchor.mjs +38 -193
- package/es/components/anchor/src/anchor.mjs.map +1 -1
- package/es/components/anchor/src/anchor2.mjs +193 -38
- package/es/components/anchor/src/anchor2.mjs.map +1 -1
- package/es/components/form/src/form2.mjs +2 -1
- package/es/components/form/src/form2.mjs.map +1 -1
- package/es/components/index.mjs +5 -5
- package/es/components/popper/index.mjs +2 -2
- package/es/components/popper/src/popper.mjs +25 -32
- package/es/components/popper/src/popper.mjs.map +1 -1
- package/es/components/popper/src/popper2.mjs +32 -25
- package/es/components/popper/src/popper2.mjs.map +1 -1
- package/es/components/progress/index.mjs +2 -2
- package/es/components/progress/src/progress.mjs +59 -205
- package/es/components/progress/src/progress.mjs.map +1 -1
- package/es/components/progress/src/progress2.mjs +205 -59
- package/es/components/progress/src/progress2.mjs.map +1 -1
- package/es/components/slider/src/button.mjs +93 -21
- package/es/components/slider/src/button.mjs.map +1 -1
- package/es/components/slider/src/button2.mjs +21 -93
- package/es/components/slider/src/button2.mjs.map +1 -1
- package/es/components/slider/src/slider2.mjs +1 -1
- package/es/components/steps/index.mjs +2 -2
- package/es/components/steps/src/steps.mjs +36 -39
- package/es/components/steps/src/steps.mjs.map +1 -1
- package/es/components/steps/src/steps2.mjs +39 -36
- package/es/components/steps/src/steps2.mjs.map +1 -1
- package/es/components/tooltip/src/tooltip.mjs +1 -1
- package/es/components/tooltip-v2/index.mjs +3 -3
- package/es/components/tooltip-v2/src/content2.mjs +1 -1
- package/es/components/tooltip-v2/src/root.mjs +80 -17
- package/es/components/tooltip-v2/src/root.mjs.map +1 -1
- package/es/components/tooltip-v2/src/root2.mjs +17 -80
- package/es/components/tooltip-v2/src/root2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/tooltip.mjs +73 -20
- package/es/components/tooltip-v2/src/tooltip.mjs.map +1 -1
- package/es/components/tooltip-v2/src/tooltip2.mjs +20 -73
- package/es/components/tooltip-v2/src/tooltip2.mjs.map +1 -1
- package/es/components/upload/index.mjs +1 -1
- package/es/components/upload/src/upload-content2.mjs +1 -1
- package/es/components/upload/src/upload-dragger.mjs +11 -50
- package/es/components/upload/src/upload-dragger.mjs.map +1 -1
- package/es/components/upload/src/upload-dragger2.mjs +50 -11
- package/es/components/upload/src/upload-dragger2.mjs.map +1 -1
- package/es/components/visual-hidden/index.mjs +3 -3
- package/es/components/visual-hidden/src/visual-hidden.mjs +35 -7
- package/es/components/visual-hidden/src/visual-hidden.mjs.map +1 -1
- package/es/components/visual-hidden/src/visual-hidden2.mjs +7 -35
- package/es/components/visual-hidden/src/visual-hidden2.mjs.map +1 -1
- package/es/index.mjs +5 -5
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/anchor/index.js +2 -2
- package/lib/components/anchor/src/anchor.js +38 -192
- package/lib/components/anchor/src/anchor.js.map +1 -1
- package/lib/components/anchor/src/anchor2.js +192 -38
- package/lib/components/anchor/src/anchor2.js.map +1 -1
- package/lib/components/form/src/form2.js +2 -1
- package/lib/components/form/src/form2.js.map +1 -1
- package/lib/components/index.js +5 -5
- package/lib/components/popper/index.js +2 -2
- package/lib/components/popper/src/popper.js +28 -32
- package/lib/components/popper/src/popper.js.map +1 -1
- package/lib/components/popper/src/popper2.js +32 -28
- package/lib/components/popper/src/popper2.js.map +1 -1
- package/lib/components/progress/index.js +2 -2
- package/lib/components/progress/src/progress.js +59 -205
- package/lib/components/progress/src/progress.js.map +1 -1
- package/lib/components/progress/src/progress2.js +205 -59
- package/lib/components/progress/src/progress2.js.map +1 -1
- package/lib/components/slider/src/button.js +93 -22
- package/lib/components/slider/src/button.js.map +1 -1
- package/lib/components/slider/src/button2.js +22 -93
- package/lib/components/slider/src/button2.js.map +1 -1
- package/lib/components/slider/src/slider2.js +1 -1
- package/lib/components/steps/index.js +2 -2
- package/lib/components/steps/src/steps.js +37 -39
- package/lib/components/steps/src/steps.js.map +1 -1
- package/lib/components/steps/src/steps2.js +39 -37
- package/lib/components/steps/src/steps2.js.map +1 -1
- package/lib/components/tooltip/src/tooltip.js +1 -1
- package/lib/components/tooltip-v2/index.js +3 -3
- package/lib/components/tooltip-v2/src/content2.js +1 -1
- package/lib/components/tooltip-v2/src/root.js +80 -17
- package/lib/components/tooltip-v2/src/root.js.map +1 -1
- package/lib/components/tooltip-v2/src/root2.js +17 -80
- package/lib/components/tooltip-v2/src/root2.js.map +1 -1
- package/lib/components/tooltip-v2/src/tooltip.js +73 -20
- package/lib/components/tooltip-v2/src/tooltip.js.map +1 -1
- package/lib/components/tooltip-v2/src/tooltip2.js +20 -73
- package/lib/components/tooltip-v2/src/tooltip2.js.map +1 -1
- package/lib/components/upload/index.js +1 -1
- package/lib/components/upload/src/upload-content2.js +1 -1
- package/lib/components/upload/src/upload-dragger.js +12 -50
- package/lib/components/upload/src/upload-dragger.js.map +1 -1
- package/lib/components/upload/src/upload-dragger2.js +50 -12
- package/lib/components/upload/src/upload-dragger2.js.map +1 -1
- package/lib/components/visual-hidden/index.js +2 -2
- package/lib/components/visual-hidden/src/visual-hidden.js +35 -7
- package/lib/components/visual-hidden/src/visual-hidden.js.map +1 -1
- package/lib/components/visual-hidden/src/visual-hidden2.js +7 -35
- package/lib/components/visual-hidden/src/visual-hidden2.js.map +1 -1
- package/lib/index.js +5 -5
- 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
|
@@ -2,68 +2,214 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
var index$1 = require('../../icon/index.js');
|
|
7
|
+
var iconsVue = require('@element-plus/icons-vue');
|
|
8
|
+
require('../../../hooks/index.js');
|
|
5
9
|
require('../../../utils/index.js');
|
|
6
|
-
var
|
|
10
|
+
var progress = require('./progress.js');
|
|
11
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
12
|
+
var index = require('../../../hooks/use-namespace/index.js');
|
|
13
|
+
var shared = require('@vue/shared');
|
|
7
14
|
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
15
|
+
const _hoisted_1 = ["aria-valuenow"];
|
|
16
|
+
const _hoisted_2 = { viewBox: "0 0 100 100" };
|
|
17
|
+
const _hoisted_3 = ["d", "stroke", "stroke-linecap", "stroke-width"];
|
|
18
|
+
const _hoisted_4 = ["d", "stroke", "opacity", "stroke-linecap", "stroke-width"];
|
|
19
|
+
const _hoisted_5 = { key: 0 };
|
|
20
|
+
const __default__ = vue.defineComponent({
|
|
21
|
+
name: "ElProgress"
|
|
22
|
+
});
|
|
23
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
24
|
+
...__default__,
|
|
25
|
+
props: progress.progressProps,
|
|
26
|
+
setup(__props) {
|
|
27
|
+
const props = __props;
|
|
28
|
+
const STATUS_COLOR_MAP = {
|
|
29
|
+
success: "#13ce66",
|
|
30
|
+
exception: "#ff4949",
|
|
31
|
+
warning: "#e6a23c",
|
|
32
|
+
default: "#20a0ff"
|
|
33
|
+
};
|
|
34
|
+
const ns = index.useNamespace("progress");
|
|
35
|
+
const barStyle = vue.computed(() => ({
|
|
36
|
+
width: `${props.percentage}%`,
|
|
37
|
+
animationDuration: `${props.duration}s`,
|
|
38
|
+
background: getCurrentColor(props.percentage)
|
|
39
|
+
}));
|
|
40
|
+
const relativeStrokeWidth = vue.computed(() => (props.strokeWidth / props.width * 100).toFixed(1));
|
|
41
|
+
const radius = vue.computed(() => {
|
|
42
|
+
if (["circle", "dashboard"].includes(props.type)) {
|
|
43
|
+
return Number.parseInt(`${50 - Number.parseFloat(relativeStrokeWidth.value) / 2}`, 10);
|
|
44
|
+
}
|
|
45
|
+
return 0;
|
|
46
|
+
});
|
|
47
|
+
const trackPath = vue.computed(() => {
|
|
48
|
+
const r = radius.value;
|
|
49
|
+
const isDashboard = props.type === "dashboard";
|
|
50
|
+
return `
|
|
51
|
+
M 50 50
|
|
52
|
+
m 0 ${isDashboard ? "" : "-"}${r}
|
|
53
|
+
a ${r} ${r} 0 1 1 0 ${isDashboard ? "-" : ""}${r * 2}
|
|
54
|
+
a ${r} ${r} 0 1 1 0 ${isDashboard ? "" : "-"}${r * 2}
|
|
55
|
+
`;
|
|
56
|
+
});
|
|
57
|
+
const perimeter = vue.computed(() => 2 * Math.PI * radius.value);
|
|
58
|
+
const rate = vue.computed(() => props.type === "dashboard" ? 0.75 : 1);
|
|
59
|
+
const strokeDashoffset = vue.computed(() => {
|
|
60
|
+
const offset = -1 * perimeter.value * (1 - rate.value) / 2;
|
|
61
|
+
return `${offset}px`;
|
|
62
|
+
});
|
|
63
|
+
const trailPathStyle = vue.computed(() => ({
|
|
64
|
+
strokeDasharray: `${perimeter.value * rate.value}px, ${perimeter.value}px`,
|
|
65
|
+
strokeDashoffset: strokeDashoffset.value
|
|
66
|
+
}));
|
|
67
|
+
const circlePathStyle = vue.computed(() => ({
|
|
68
|
+
strokeDasharray: `${perimeter.value * rate.value * (props.percentage / 100)}px, ${perimeter.value}px`,
|
|
69
|
+
strokeDashoffset: strokeDashoffset.value,
|
|
70
|
+
transition: "stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"
|
|
71
|
+
}));
|
|
72
|
+
const stroke = vue.computed(() => {
|
|
73
|
+
let ret;
|
|
74
|
+
if (props.color) {
|
|
75
|
+
ret = getCurrentColor(props.percentage);
|
|
76
|
+
} else {
|
|
77
|
+
ret = STATUS_COLOR_MAP[props.status] || STATUS_COLOR_MAP.default;
|
|
78
|
+
}
|
|
79
|
+
return ret;
|
|
80
|
+
});
|
|
81
|
+
const statusIcon = vue.computed(() => {
|
|
82
|
+
if (props.status === "warning") {
|
|
83
|
+
return iconsVue.WarningFilled;
|
|
84
|
+
}
|
|
85
|
+
if (props.type === "line") {
|
|
86
|
+
return props.status === "success" ? iconsVue.CircleCheck : iconsVue.CircleClose;
|
|
87
|
+
} else {
|
|
88
|
+
return props.status === "success" ? iconsVue.Check : iconsVue.Close;
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
const progressTextSize = vue.computed(() => {
|
|
92
|
+
return props.type === "line" ? 12 + props.strokeWidth * 0.4 : props.width * 0.111111 + 2;
|
|
93
|
+
});
|
|
94
|
+
const content = vue.computed(() => props.format(props.percentage));
|
|
95
|
+
function getColors(color) {
|
|
96
|
+
const span = 100 / color.length;
|
|
97
|
+
const seriesColors = color.map((seriesColor, index) => {
|
|
98
|
+
if (shared.isString(seriesColor)) {
|
|
99
|
+
return {
|
|
100
|
+
color: seriesColor,
|
|
101
|
+
percentage: (index + 1) * span
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
return seriesColor;
|
|
105
|
+
});
|
|
106
|
+
return seriesColors.sort((a, b) => a.percentage - b.percentage);
|
|
107
|
+
}
|
|
108
|
+
const getCurrentColor = (percentage) => {
|
|
109
|
+
var _a;
|
|
110
|
+
const { color } = props;
|
|
111
|
+
if (shared.isFunction(color)) {
|
|
112
|
+
return color(percentage);
|
|
113
|
+
} else if (shared.isString(color)) {
|
|
114
|
+
return color;
|
|
115
|
+
} else {
|
|
116
|
+
const colors = getColors(color);
|
|
117
|
+
for (const color2 of colors) {
|
|
118
|
+
if (color2.percentage > percentage)
|
|
119
|
+
return color2.color;
|
|
120
|
+
}
|
|
121
|
+
return (_a = colors[colors.length - 1]) == null ? void 0 : _a.color;
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
return (_ctx, _cache) => {
|
|
125
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
126
|
+
class: vue.normalizeClass([
|
|
127
|
+
vue.unref(ns).b(),
|
|
128
|
+
vue.unref(ns).m(_ctx.type),
|
|
129
|
+
vue.unref(ns).is(_ctx.status),
|
|
130
|
+
{
|
|
131
|
+
[vue.unref(ns).m("without-text")]: !_ctx.showText,
|
|
132
|
+
[vue.unref(ns).m("text-inside")]: _ctx.textInside
|
|
133
|
+
}
|
|
134
|
+
]),
|
|
135
|
+
role: "progressbar",
|
|
136
|
+
"aria-valuenow": _ctx.percentage,
|
|
137
|
+
"aria-valuemin": "0",
|
|
138
|
+
"aria-valuemax": "100"
|
|
139
|
+
}, [
|
|
140
|
+
_ctx.type === "line" ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
141
|
+
key: 0,
|
|
142
|
+
class: vue.normalizeClass(vue.unref(ns).b("bar"))
|
|
143
|
+
}, [
|
|
144
|
+
vue.createElementVNode("div", {
|
|
145
|
+
class: vue.normalizeClass(vue.unref(ns).be("bar", "outer")),
|
|
146
|
+
style: vue.normalizeStyle({ height: `${_ctx.strokeWidth}px` })
|
|
147
|
+
}, [
|
|
148
|
+
vue.createElementVNode("div", {
|
|
149
|
+
class: vue.normalizeClass([
|
|
150
|
+
vue.unref(ns).be("bar", "inner"),
|
|
151
|
+
{ [vue.unref(ns).bem("bar", "inner", "indeterminate")]: _ctx.indeterminate },
|
|
152
|
+
{ [vue.unref(ns).bem("bar", "inner", "striped")]: _ctx.striped },
|
|
153
|
+
{ [vue.unref(ns).bem("bar", "inner", "striped-flow")]: _ctx.stripedFlow }
|
|
154
|
+
]),
|
|
155
|
+
style: vue.normalizeStyle(vue.unref(barStyle))
|
|
156
|
+
}, [
|
|
157
|
+
(_ctx.showText || _ctx.$slots.default) && _ctx.textInside ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
158
|
+
key: 0,
|
|
159
|
+
class: vue.normalizeClass(vue.unref(ns).be("bar", "innerText"))
|
|
160
|
+
}, [
|
|
161
|
+
vue.renderSlot(_ctx.$slots, "default", { percentage: _ctx.percentage }, () => [
|
|
162
|
+
vue.createElementVNode("span", null, vue.toDisplayString(vue.unref(content)), 1)
|
|
163
|
+
])
|
|
164
|
+
], 2)) : vue.createCommentVNode("v-if", true)
|
|
165
|
+
], 6)
|
|
166
|
+
], 6)
|
|
167
|
+
], 2)) : (vue.openBlock(), vue.createElementBlock("div", {
|
|
168
|
+
key: 1,
|
|
169
|
+
class: vue.normalizeClass(vue.unref(ns).b("circle")),
|
|
170
|
+
style: vue.normalizeStyle({ height: `${_ctx.width}px`, width: `${_ctx.width}px` })
|
|
171
|
+
}, [
|
|
172
|
+
(vue.openBlock(), vue.createElementBlock("svg", _hoisted_2, [
|
|
173
|
+
vue.createElementVNode("path", {
|
|
174
|
+
class: vue.normalizeClass(vue.unref(ns).be("circle", "track")),
|
|
175
|
+
d: vue.unref(trackPath),
|
|
176
|
+
stroke: `var(${vue.unref(ns).cssVarName("fill-color-light")}, #e5e9f2)`,
|
|
177
|
+
"stroke-linecap": _ctx.strokeLinecap,
|
|
178
|
+
"stroke-width": vue.unref(relativeStrokeWidth),
|
|
179
|
+
fill: "none",
|
|
180
|
+
style: vue.normalizeStyle(vue.unref(trailPathStyle))
|
|
181
|
+
}, null, 14, _hoisted_3),
|
|
182
|
+
vue.createElementVNode("path", {
|
|
183
|
+
class: vue.normalizeClass(vue.unref(ns).be("circle", "path")),
|
|
184
|
+
d: vue.unref(trackPath),
|
|
185
|
+
stroke: vue.unref(stroke),
|
|
186
|
+
fill: "none",
|
|
187
|
+
opacity: _ctx.percentage ? 1 : 0,
|
|
188
|
+
"stroke-linecap": _ctx.strokeLinecap,
|
|
189
|
+
"stroke-width": vue.unref(relativeStrokeWidth),
|
|
190
|
+
style: vue.normalizeStyle(vue.unref(circlePathStyle))
|
|
191
|
+
}, null, 14, _hoisted_4)
|
|
192
|
+
]))
|
|
193
|
+
], 6)),
|
|
194
|
+
(_ctx.showText || _ctx.$slots.default) && !_ctx.textInside ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
195
|
+
key: 2,
|
|
196
|
+
class: vue.normalizeClass(vue.unref(ns).e("text")),
|
|
197
|
+
style: vue.normalizeStyle({ fontSize: `${vue.unref(progressTextSize)}px` })
|
|
198
|
+
}, [
|
|
199
|
+
vue.renderSlot(_ctx.$slots, "default", { percentage: _ctx.percentage }, () => [
|
|
200
|
+
!_ctx.status ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_5, vue.toDisplayString(vue.unref(content)), 1)) : (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), { key: 1 }, {
|
|
201
|
+
default: vue.withCtx(() => [
|
|
202
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(statusIcon))))
|
|
203
|
+
]),
|
|
204
|
+
_: 1
|
|
205
|
+
}))
|
|
206
|
+
])
|
|
207
|
+
], 6)) : vue.createCommentVNode("v-if", true)
|
|
208
|
+
], 10, _hoisted_1);
|
|
209
|
+
};
|
|
65
210
|
}
|
|
66
211
|
});
|
|
212
|
+
var Progress = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "progress.vue"]]);
|
|
67
213
|
|
|
68
|
-
exports
|
|
214
|
+
exports["default"] = Progress;
|
|
69
215
|
//# sourceMappingURL=progress2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress2.js","sources":["../../../../../../packages/components/progress/src/progress.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport type { ExtractPropTypes, SVGAttributes } from 'vue'\nimport type Progress from './progress.vue'\n\nexport type ProgressColor = { color: string; percentage: number }\nexport type ProgressFn = (percentage: number) => string\n\nexport const progressProps = buildProps({\n /**\n * @description type of progress bar\n */\n type: {\n type: String,\n default: 'line',\n values: ['line', 'circle', 'dashboard'],\n },\n /**\n * @description percentage, required\n */\n percentage: {\n type: Number,\n default: 0,\n validator: (val: number): boolean => val >= 0 && val <= 100,\n },\n /**\n * @description the current status of progress bar\n */\n status: {\n type: String,\n default: '',\n values: ['', 'success', 'exception', 'warning'],\n },\n /**\n * @description set indeterminate progress\n */\n indeterminate: {\n type: Boolean,\n default: false,\n },\n /**\n * @description control the animation duration of indeterminate progress or striped flow progress\n */\n duration: {\n type: Number,\n default: 3,\n },\n /**\n * @description the width of progress bar\n */\n strokeWidth: {\n type: Number,\n default: 6,\n },\n /**\n * @description butt/circle/dashboard type shape at the end path\n */\n strokeLinecap: {\n type: definePropType<NonNullable<SVGAttributes['stroke-linecap']>>(String),\n default: 'round',\n },\n /**\n * @description whether to place the percentage inside progress bar, only works when `type` is 'line'\n */\n textInside: {\n type: Boolean,\n default: false,\n },\n /**\n * @description the canvas width of circle progress bar\n */\n width: {\n type: Number,\n default: 126,\n },\n /**\n * @description whether to show percentage\n */\n showText: {\n type: Boolean,\n default: true,\n },\n /**\n * @description background color of progress bar. Overrides `status` prop\n */\n color: {\n type: definePropType<string | ProgressColor[] | ProgressFn>([\n String,\n Array,\n Function,\n ]),\n default: '',\n },\n /**\n * @description stripe over the progress bar's color\n */\n striped: Boolean,\n /**\n * @description get the stripes to flow\n */\n stripedFlow: Boolean,\n /**\n * @description custom text format\n */\n format: {\n type: definePropType<ProgressFn>(Function),\n default: (percentage: number): string => `${percentage}%`,\n },\n} as const)\n\nexport type ProgressProps = ExtractPropTypes<typeof progressProps>\nexport type ProgressInstance = InstanceType<typeof Progress>\n"],"names":["buildProps","definePropType"],"mappings":";;;;;;;AACY,MAAC,aAAa,GAAGA,kBAAU,CAAC;AACxC,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,MAAM;AACnB,IAAI,MAAM,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,WAAW,CAAC;AAC3C,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,IAAI,SAAS,EAAE,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,GAAG;AAC9C,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,IAAI,MAAM,EAAE,CAAC,EAAE,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,CAAC;AACnD,GAAG;AACH,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAEC,sBAAc,CAAC,MAAM,CAAC;AAChC,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAEA,sBAAc,CAAC;AACzB,MAAM,MAAM;AACZ,MAAM,KAAK;AACX,MAAM,QAAQ;AACd,KAAK,CAAC;AACN,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,OAAO,EAAE,OAAO;AAClB,EAAE,WAAW,EAAE,OAAO;AACtB,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAEA,sBAAc,CAAC,QAAQ,CAAC;AAClC,IAAI,OAAO,EAAE,CAAC,UAAU,KAAK,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC;AAC7C,GAAG;AACH,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"progress2.js","sources":["../../../../../../packages/components/progress/src/progress.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n ns.b(),\n ns.m(type),\n ns.is(status),\n {\n [ns.m('without-text')]: !showText,\n [ns.m('text-inside')]: textInside,\n },\n ]\"\n role=\"progressbar\"\n :aria-valuenow=\"percentage\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n >\n <div v-if=\"type === 'line'\" :class=\"ns.b('bar')\">\n <div\n :class=\"ns.be('bar', 'outer')\"\n :style=\"{ height: `${strokeWidth}px` }\"\n >\n <div\n :class=\"[\n ns.be('bar', 'inner'),\n { [ns.bem('bar', 'inner', 'indeterminate')]: indeterminate },\n { [ns.bem('bar', 'inner', 'striped')]: striped },\n { [ns.bem('bar', 'inner', 'striped-flow')]: stripedFlow },\n ]\"\n :style=\"barStyle\"\n >\n <div\n v-if=\"(showText || $slots.default) && textInside\"\n :class=\"ns.be('bar', 'innerText')\"\n >\n <slot :percentage=\"percentage\">\n <span>{{ content }}</span>\n </slot>\n </div>\n </div>\n </div>\n </div>\n <div\n v-else\n :class=\"ns.b('circle')\"\n :style=\"{ height: `${width}px`, width: `${width}px` }\"\n >\n <svg viewBox=\"0 0 100 100\">\n <path\n :class=\"ns.be('circle', 'track')\"\n :d=\"trackPath\"\n :stroke=\"`var(${ns.cssVarName('fill-color-light')}, #e5e9f2)`\"\n :stroke-linecap=\"strokeLinecap\"\n :stroke-width=\"relativeStrokeWidth\"\n fill=\"none\"\n :style=\"trailPathStyle\"\n />\n <path\n :class=\"ns.be('circle', 'path')\"\n :d=\"trackPath\"\n :stroke=\"stroke\"\n fill=\"none\"\n :opacity=\"percentage ? 1 : 0\"\n :stroke-linecap=\"strokeLinecap\"\n :stroke-width=\"relativeStrokeWidth\"\n :style=\"circlePathStyle\"\n />\n </svg>\n </div>\n <div\n v-if=\"(showText || $slots.default) && !textInside\"\n :class=\"ns.e('text')\"\n :style=\"{ fontSize: `${progressTextSize}px` }\"\n >\n <slot :percentage=\"percentage\">\n <span v-if=\"!status\">{{ content }}</span>\n <el-icon v-else>\n <component :is=\"statusIcon\" />\n </el-icon>\n </slot>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { ElIcon } from '@element-plus/components/icon'\nimport {\n Check,\n CircleCheck,\n CircleClose,\n Close,\n WarningFilled,\n} from '@element-plus/icons-vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { isFunction, isString } from '@element-plus/utils'\nimport { progressProps } from './progress'\nimport type { CSSProperties } from 'vue'\nimport type { ProgressColor } from './progress'\n\ndefineOptions({\n name: 'ElProgress',\n})\n\nconst STATUS_COLOR_MAP: Record<string, string> = {\n success: '#13ce66',\n exception: '#ff4949',\n warning: '#e6a23c',\n default: '#20a0ff',\n}\n\nconst props = defineProps(progressProps)\n\nconst ns = useNamespace('progress')\n\nconst barStyle = computed<CSSProperties>(() => ({\n width: `${props.percentage}%`,\n animationDuration: `${props.duration}s`,\n background: getCurrentColor(props.percentage),\n}))\n\nconst relativeStrokeWidth = computed(() =>\n ((props.strokeWidth / props.width) * 100).toFixed(1)\n)\n\nconst radius = computed(() => {\n if (['circle', 'dashboard'].includes(props.type)) {\n return Number.parseInt(\n `${50 - Number.parseFloat(relativeStrokeWidth.value) / 2}`,\n 10\n )\n }\n return 0\n})\n\nconst trackPath = computed(() => {\n const r = radius.value\n const isDashboard = props.type === 'dashboard'\n return `\n M 50 50\n m 0 ${isDashboard ? '' : '-'}${r}\n a ${r} ${r} 0 1 1 0 ${isDashboard ? '-' : ''}${r * 2}\n a ${r} ${r} 0 1 1 0 ${isDashboard ? '' : '-'}${r * 2}\n `\n})\n\nconst perimeter = computed(() => 2 * Math.PI * radius.value)\n\nconst rate = computed(() => (props.type === 'dashboard' ? 0.75 : 1))\n\nconst strokeDashoffset = computed(() => {\n const offset = (-1 * perimeter.value * (1 - rate.value)) / 2\n return `${offset}px`\n})\n\nconst trailPathStyle = computed<CSSProperties>(() => ({\n strokeDasharray: `${perimeter.value * rate.value}px, ${perimeter.value}px`,\n strokeDashoffset: strokeDashoffset.value,\n}))\n\nconst circlePathStyle = computed<CSSProperties>(() => ({\n strokeDasharray: `${\n perimeter.value * rate.value * (props.percentage / 100)\n }px, ${perimeter.value}px`,\n strokeDashoffset: strokeDashoffset.value,\n transition:\n 'stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s',\n}))\n\nconst stroke = computed(() => {\n let ret: string\n if (props.color) {\n ret = getCurrentColor(props.percentage)\n } else {\n ret = STATUS_COLOR_MAP[props.status] || STATUS_COLOR_MAP.default\n }\n return ret\n})\n\nconst statusIcon = computed(() => {\n if (props.status === 'warning') {\n return WarningFilled\n }\n if (props.type === 'line') {\n return props.status === 'success' ? CircleCheck : CircleClose\n } else {\n return props.status === 'success' ? Check : Close\n }\n})\n\nconst progressTextSize = computed(() => {\n return props.type === 'line'\n ? 12 + props.strokeWidth * 0.4\n : props.width * 0.111111 + 2\n})\n\nconst content = computed(() => props.format(props.percentage))\n\nfunction getColors(color: ProgressColor[]) {\n const span = 100 / color.length\n const seriesColors = color.map((seriesColor, index) => {\n if (isString(seriesColor)) {\n return {\n color: seriesColor,\n percentage: (index + 1) * span,\n }\n }\n return seriesColor\n })\n return seriesColors.sort((a, b) => a.percentage - b.percentage)\n}\n\nconst getCurrentColor = (percentage: number) => {\n const { color } = props\n if (isFunction(color)) {\n return color(percentage)\n } else if (isString(color)) {\n return color\n } else {\n const colors = getColors(color)\n for (const color of colors) {\n if (color.percentage > percentage) return color.color\n }\n return colors[colors.length - 1]?.color\n }\n}\n</script>\n"],"names":["useNamespace","computed","WarningFilled","CircleCheck","CircleClose","Check","Close","isString","isFunction"],"mappings":";;;;;;;;;;;;;;;;;;;uCAmGc,CAAA;AAAA,EACZ,IAAM,EAAA,YAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAEA,IAAA,MAAM,gBAA2C,GAAA;AAAA,MAC/C,OAAS,EAAA,SAAA;AAAA,MACT,SAAW,EAAA,SAAA;AAAA,MACX,OAAS,EAAA,SAAA;AAAA,MACT,OAAS,EAAA,SAAA;AAAA,KACX,CAAA;AAIA,IAAM,MAAA,EAAA,GAAKA,mBAAa,UAAU,CAAA,CAAA;AAElC,IAAM,MAAA,QAAA,GAAWC,aAAwB,OAAO;AAAA,MAC9C,KAAA,EAAO,GAAG,KAAM,CAAA,UAAA,CAAA,CAAA,CAAA;AAAA,MAChB,iBAAA,EAAmB,GAAG,KAAM,CAAA,QAAA,CAAA,CAAA,CAAA;AAAA,MAC5B,UAAA,EAAY,eAAgB,CAAA,KAAA,CAAM,UAAU,CAAA;AAAA,KAC5C,CAAA,CAAA,CAAA;AAEF,IAAM,MAAA,mBAAA,GAAsBA,YAAS,CAAA,MACjC,CAAM,KAAA,CAAA,WAAA,GAAc,MAAM,KAAS,GAAA,GAAA,EAAK,OAAQ,CAAA,CAAC,CACrD,CAAA,CAAA;AAEA,IAAM,MAAA,MAAA,GAASA,aAAS,MAAM;AAC5B,MAAA,IAAI,CAAC,QAAU,EAAA,WAAW,EAAE,QAAS,CAAA,KAAA,CAAM,IAAI,CAAG,EAAA;AAChD,QAAO,OAAA,MAAA,CAAO,QACZ,CAAA,CAAA,EAAG,EAAK,GAAA,MAAA,CAAO,WAAW,mBAAoB,CAAA,KAAK,CAAI,GAAA,CAAA,CAAA,CAAA,EACvD,EACF,CAAA,CAAA;AAAA,OACF;AACA,MAAO,OAAA,CAAA,CAAA;AAAA,KACR,CAAA,CAAA;AAED,IAAM,MAAA,SAAA,GAAYA,aAAS,MAAM;AAC/B,MAAA,MAAM,IAAI,MAAO,CAAA,KAAA,CAAA;AACjB,MAAM,MAAA,WAAA,GAAc,MAAM,IAAS,KAAA,WAAA,CAAA;AACnC,MAAO,OAAA,CAAA;AAAA;AAAA,cAEO,EAAA,WAAA,GAAc,KAAK,GAAM,CAAA,EAAA,CAAA,CAAA;AAAA,YAAA,EAC3B,CAAK,CAAA,CAAA,EAAA,CAAA,CAAA,SAAA,EAAa,WAAc,GAAA,GAAA,GAAM,KAAK,CAAI,GAAA,CAAA,CAAA;AAAA,YAAA,EAC/C,CAAK,CAAA,CAAA,EAAA,CAAA,CAAA,SAAA,EAAa,WAAc,GAAA,EAAA,GAAK,MAAM,CAAI,GAAA,CAAA,CAAA;AAAA,UAAA,CAAA,CAAA;AAAA,KAE5D,CAAA,CAAA;AAED,IAAA,MAAM,YAAYA,YAAS,CAAA,MAAM,IAAI,IAAK,CAAA,EAAA,GAAK,OAAO,KAAK,CAAA,CAAA;AAE3D,IAAA,MAAM,OAAOA,YAAS,CAAA,MAAO,MAAM,IAAS,KAAA,WAAA,GAAc,OAAO,CAAE,CAAA,CAAA;AAEnE,IAAM,MAAA,gBAAA,GAAmBA,aAAS,MAAM;AACtC,MAAA,MAAM,SAAU,CAAK,CAAA,GAAA,SAAA,CAAU,KAAS,IAAA,CAAA,GAAI,KAAK,KAAU,CAAA,GAAA,CAAA,CAAA;AAC3D,MAAA,OAAO,CAAG,EAAA,MAAA,CAAA,EAAA,CAAA,CAAA;AAAA,KACX,CAAA,CAAA;AAED,IAAM,MAAA,cAAA,GAAiBA,aAAwB,OAAO;AAAA,MACpD,iBAAiB,CAAG,EAAA,SAAA,CAAU,KAAQ,GAAA,IAAA,CAAK,YAAY,SAAU,CAAA,KAAA,CAAA,EAAA,CAAA;AAAA,MACjE,kBAAkB,gBAAiB,CAAA,KAAA;AAAA,KACnC,CAAA,CAAA,CAAA;AAEF,IAAM,MAAA,eAAA,GAAkBA,aAAwB,OAAO;AAAA,MACrD,eAAA,EAAiB,GACf,SAAU,CAAA,KAAA,GAAQ,KAAK,KAAS,IAAA,KAAA,CAAM,UAAa,GAAA,GAAA,CAAA,CAAA,IAAA,EAC9C,SAAU,CAAA,KAAA,CAAA,EAAA,CAAA;AAAA,MACjB,kBAAkB,gBAAiB,CAAA,KAAA;AAAA,MACnC,UACE,EAAA,oEAAA;AAAA,KACF,CAAA,CAAA,CAAA;AAEF,IAAM,MAAA,MAAA,GAASA,aAAS,MAAM;AAC5B,MAAI,IAAA,GAAA,CAAA;AACJ,MAAA,IAAI,MAAM,KAAO,EAAA;AACf,QAAM,GAAA,GAAA,eAAA,CAAgB,MAAM,UAAU,CAAA,CAAA;AAAA,OACjC,MAAA;AACL,QAAM,GAAA,GAAA,gBAAA,CAAiB,KAAM,CAAA,MAAA,CAAA,IAAW,gBAAiB,CAAA,OAAA,CAAA;AAAA,OAC3D;AACA,MAAO,OAAA,GAAA,CAAA;AAAA,KACR,CAAA,CAAA;AAED,IAAM,MAAA,UAAA,GAAaA,aAAS,MAAM;AAChC,MAAI,IAAA,KAAA,CAAM,WAAW,SAAW,EAAA;AAC9B,QAAO,OAAAC,sBAAA,CAAA;AAAA,OACT;AACA,MAAI,IAAA,KAAA,CAAM,SAAS,MAAQ,EAAA;AACzB,QAAO,OAAA,KAAA,CAAM,MAAW,KAAA,SAAA,GAAYC,oBAAc,GAAAC,oBAAA,CAAA;AAAA,OAC7C,MAAA;AACL,QAAO,OAAA,KAAA,CAAM,MAAW,KAAA,SAAA,GAAYC,cAAQ,GAAAC,cAAA,CAAA;AAAA,OAC9C;AAAA,KACD,CAAA,CAAA;AAED,IAAM,MAAA,gBAAA,GAAmBL,aAAS,MAAM;AACtC,MAAO,OAAA,KAAA,CAAM,SAAS,MAClB,GAAA,EAAA,GAAK,MAAM,WAAc,GAAA,GAAA,GACzB,KAAM,CAAA,KAAA,GAAQ,QAAW,GAAA,CAAA,CAAA;AAAA,KAC9B,CAAA,CAAA;AAED,IAAA,MAAM,UAAUA,YAAS,CAAA,MAAM,MAAM,MAAO,CAAA,KAAA,CAAM,UAAU,CAAC,CAAA,CAAA;AAE7D,IAAA,SAAA,SAAA,CAAmB,KAAwB,EAAA;AACzC,MAAM,MAAA,IAAA,GAAO,MAAM,KAAM,CAAA,MAAA,CAAA;AACzB,MAAA,MAAM,YAAe,GAAA,KAAA,CAAM,GAAI,CAAA,CAAC,aAAa,KAAU,KAAA;AACrD,QAAI,IAAAM,eAAA,CAAS,WAAW,CAAG,EAAA;AACzB,UAAO,OAAA;AAAA,YACL,KAAO,EAAA,WAAA;AAAA,YACP,UAAA,EAAa,SAAQ,CAAK,IAAA,IAAA;AAAA,WAC5B,CAAA;AAAA,SACF;AACA,QAAO,OAAA,WAAA,CAAA;AAAA,OACR,CAAA,CAAA;AACD,MAAO,OAAA,YAAA,CAAa,KAAK,CAAC,CAAA,EAAG,MAAM,CAAE,CAAA,UAAA,GAAa,EAAE,UAAU,CAAA,CAAA;AAAA,KAChE;AAEA,IAAM,MAAA,eAAA,GAAkB,CAAC,UAAuB,KAAA;AAC9C,MAAA,IAAA,EAAM;AACN,MAAI,MAAA,EAAA,KAAA,EAAW,QAAQ,CAAA;AACrB,MAAA,IAAAC,kBAAa,KAAU,CAAA,EAAA;AAAA,QACzB,OAAA,KAAoB,CAAA,UAAK,CAAG,CAAA;AAC1B,OAAO,MAAA,IAAAD,eAAA,CAAA,KAAA,CAAA,EAAA;AAAA,QACF,OAAA,KAAA,CAAA;AACL,OAAM,MAAA;AACN,QAAA,MAAA,kBAA4B,CAAA,KAAA,CAAA,CAAA;AAC1B,QAAA,KAAA,YAAuB,IAAA,MAAA,EAAA;AAAY,UAAA,IAAA,MAAa,CAAA,UAAA,GAAA,UAAA;AAAA,YAClD,OAAA,MAAA,CAAA,KAAA,CAAA;AACA,SAAO;AAA2B,QACpC,OAAA,CAAA,EAAA,GAAA,MAAA,CAAA,MAAA,CAAA,MAAA,GAAA,CAAA,CAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,KAAA,CAAA;AAAA,OACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -2,30 +2,101 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('
|
|
7
|
-
require('../../../
|
|
8
|
-
|
|
9
|
-
var
|
|
10
|
-
var
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
var index$1 = require('../../tooltip/index.js');
|
|
7
|
+
require('../../../hooks/index.js');
|
|
8
|
+
require('./composables/index.js');
|
|
9
|
+
var button = require('./button2.js');
|
|
10
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
11
|
+
var index = require('../../../hooks/use-namespace/index.js');
|
|
12
|
+
var useSliderButton = require('./composables/use-slider-button.js');
|
|
11
13
|
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
14
|
+
const _hoisted_1 = ["tabindex"];
|
|
15
|
+
const __default__ = vue.defineComponent({
|
|
16
|
+
name: "ElSliderButton"
|
|
17
|
+
});
|
|
18
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
19
|
+
...__default__,
|
|
20
|
+
props: button.sliderButtonProps,
|
|
21
|
+
emits: button.sliderButtonEmits,
|
|
22
|
+
setup(__props, { expose, emit }) {
|
|
23
|
+
const props = __props;
|
|
24
|
+
const ns = index.useNamespace("slider");
|
|
25
|
+
const initData = vue.reactive({
|
|
26
|
+
hovering: false,
|
|
27
|
+
dragging: false,
|
|
28
|
+
isClick: false,
|
|
29
|
+
startX: 0,
|
|
30
|
+
currentX: 0,
|
|
31
|
+
startY: 0,
|
|
32
|
+
currentY: 0,
|
|
33
|
+
startPosition: 0,
|
|
34
|
+
newPosition: 0,
|
|
35
|
+
oldValue: props.modelValue
|
|
36
|
+
});
|
|
37
|
+
const {
|
|
38
|
+
disabled,
|
|
39
|
+
button,
|
|
40
|
+
tooltip,
|
|
41
|
+
showTooltip,
|
|
42
|
+
tooltipVisible,
|
|
43
|
+
wrapperStyle,
|
|
44
|
+
formatValue,
|
|
45
|
+
handleMouseEnter,
|
|
46
|
+
handleMouseLeave,
|
|
47
|
+
onButtonDown,
|
|
48
|
+
onKeyDown,
|
|
49
|
+
setPosition
|
|
50
|
+
} = useSliderButton.useSliderButton(props, initData, emit);
|
|
51
|
+
const { hovering, dragging } = vue.toRefs(initData);
|
|
52
|
+
expose({
|
|
53
|
+
onButtonDown,
|
|
54
|
+
onKeyDown,
|
|
55
|
+
setPosition,
|
|
56
|
+
hovering,
|
|
57
|
+
dragging
|
|
58
|
+
});
|
|
59
|
+
return (_ctx, _cache) => {
|
|
60
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
61
|
+
ref_key: "button",
|
|
62
|
+
ref: button,
|
|
63
|
+
class: vue.normalizeClass([vue.unref(ns).e("button-wrapper"), { hover: vue.unref(hovering), dragging: vue.unref(dragging) }]),
|
|
64
|
+
style: vue.normalizeStyle(vue.unref(wrapperStyle)),
|
|
65
|
+
tabindex: vue.unref(disabled) ? -1 : 0,
|
|
66
|
+
onMouseenter: _cache[0] || (_cache[0] = (...args) => vue.unref(handleMouseEnter) && vue.unref(handleMouseEnter)(...args)),
|
|
67
|
+
onMouseleave: _cache[1] || (_cache[1] = (...args) => vue.unref(handleMouseLeave) && vue.unref(handleMouseLeave)(...args)),
|
|
68
|
+
onMousedown: _cache[2] || (_cache[2] = (...args) => vue.unref(onButtonDown) && vue.unref(onButtonDown)(...args)),
|
|
69
|
+
onTouchstart: _cache[3] || (_cache[3] = (...args) => vue.unref(onButtonDown) && vue.unref(onButtonDown)(...args)),
|
|
70
|
+
onFocus: _cache[4] || (_cache[4] = (...args) => vue.unref(handleMouseEnter) && vue.unref(handleMouseEnter)(...args)),
|
|
71
|
+
onBlur: _cache[5] || (_cache[5] = (...args) => vue.unref(handleMouseLeave) && vue.unref(handleMouseLeave)(...args)),
|
|
72
|
+
onKeydown: _cache[6] || (_cache[6] = (...args) => vue.unref(onKeyDown) && vue.unref(onKeyDown)(...args))
|
|
73
|
+
}, [
|
|
74
|
+
vue.createVNode(vue.unref(index$1.ElTooltip), {
|
|
75
|
+
ref_key: "tooltip",
|
|
76
|
+
ref: tooltip,
|
|
77
|
+
visible: vue.unref(tooltipVisible),
|
|
78
|
+
placement: _ctx.placement,
|
|
79
|
+
"fallback-placements": ["top", "bottom", "right", "left"],
|
|
80
|
+
"stop-popper-mouse-event": false,
|
|
81
|
+
"popper-class": _ctx.tooltipClass,
|
|
82
|
+
disabled: !vue.unref(showTooltip),
|
|
83
|
+
persistent: ""
|
|
84
|
+
}, {
|
|
85
|
+
content: vue.withCtx(() => [
|
|
86
|
+
vue.createElementVNode("span", null, vue.toDisplayString(vue.unref(formatValue)), 1)
|
|
87
|
+
]),
|
|
88
|
+
default: vue.withCtx(() => [
|
|
89
|
+
vue.createElementVNode("div", {
|
|
90
|
+
class: vue.normalizeClass([vue.unref(ns).e("button"), { hover: vue.unref(hovering), dragging: vue.unref(dragging) }])
|
|
91
|
+
}, null, 2)
|
|
92
|
+
]),
|
|
93
|
+
_: 1
|
|
94
|
+
}, 8, ["visible", "placement", "popper-class", "disabled"])
|
|
95
|
+
], 46, _hoisted_1);
|
|
96
|
+
};
|
|
23
97
|
}
|
|
24
98
|
});
|
|
25
|
-
|
|
26
|
-
[event.UPDATE_MODEL_EVENT]: (value) => types.isNumber(value)
|
|
27
|
-
};
|
|
99
|
+
var SliderButton = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "button.vue"]]);
|
|
28
100
|
|
|
29
|
-
exports
|
|
30
|
-
exports.sliderButtonProps = sliderButtonProps;
|
|
101
|
+
exports["default"] = SliderButton;
|
|
31
102
|
//# sourceMappingURL=button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","sources":["../../../../../../packages/components/slider/src/button.
|
|
1
|
+
{"version":3,"file":"button.js","sources":["../../../../../../packages/components/slider/src/button.vue"],"sourcesContent":["<template>\n <div\n ref=\"button\"\n :class=\"[ns.e('button-wrapper'), { hover: hovering, dragging }]\"\n :style=\"wrapperStyle\"\n :tabindex=\"disabled ? -1 : 0\"\n @mouseenter=\"handleMouseEnter\"\n @mouseleave=\"handleMouseLeave\"\n @mousedown=\"onButtonDown\"\n @touchstart=\"onButtonDown\"\n @focus=\"handleMouseEnter\"\n @blur=\"handleMouseLeave\"\n @keydown=\"onKeyDown\"\n >\n <el-tooltip\n ref=\"tooltip\"\n :visible=\"tooltipVisible\"\n :placement=\"placement\"\n :fallback-placements=\"['top', 'bottom', 'right', 'left']\"\n :stop-popper-mouse-event=\"false\"\n :popper-class=\"tooltipClass\"\n :disabled=\"!showTooltip\"\n persistent\n >\n <template #content>\n <span>{{ formatValue }}</span>\n </template>\n <div :class=\"[ns.e('button'), { hover: hovering, dragging }]\" />\n </el-tooltip>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { reactive, toRefs } from 'vue'\nimport { ElTooltip } from '@element-plus/components/tooltip'\nimport { useNamespace } from '@element-plus/hooks'\nimport { useSliderButton } from './composables'\nimport { sliderButtonEmits, sliderButtonProps } from './button'\nimport type { SliderButtonInitData } from './button'\n\ndefineOptions({\n name: 'ElSliderButton',\n})\n\nconst props = defineProps(sliderButtonProps)\nconst emit = defineEmits(sliderButtonEmits)\n\nconst ns = useNamespace('slider')\n\nconst initData = reactive<SliderButtonInitData>({\n hovering: false,\n dragging: false,\n isClick: false,\n startX: 0,\n currentX: 0,\n startY: 0,\n currentY: 0,\n startPosition: 0,\n newPosition: 0,\n oldValue: props.modelValue,\n})\n\nconst {\n disabled,\n button,\n tooltip,\n showTooltip,\n tooltipVisible,\n wrapperStyle,\n formatValue,\n handleMouseEnter,\n handleMouseLeave,\n onButtonDown,\n onKeyDown,\n setPosition,\n} = useSliderButton(props, initData, emit)\n\nconst { hovering, dragging } = toRefs(initData)\n\ndefineExpose({\n onButtonDown,\n onKeyDown,\n setPosition,\n hovering,\n dragging,\n})\n</script>\n"],"names":["useNamespace","reactive","useSliderButton","toRefs"],"mappings":";;;;;;;;;;;;;;uCAwCc,CAAA;AAAA,EACZ,IAAM,EAAA,gBAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,EAAA,GAAKA,mBAAa,QAAQ,CAAA,CAAA;AAEhC,IAAA,MAAM,WAAWC,YAA+B,CAAA;AAAA,MAC9C,QAAU,EAAA,KAAA;AAAA,MACV,QAAU,EAAA,KAAA;AAAA,MACV,OAAS,EAAA,KAAA;AAAA,MACT,MAAQ,EAAA,CAAA;AAAA,MACR,QAAU,EAAA,CAAA;AAAA,MACV,MAAQ,EAAA,CAAA;AAAA,MACR,QAAU,EAAA,CAAA;AAAA,MACV,aAAe,EAAA,CAAA;AAAA,MACf,WAAa,EAAA,CAAA;AAAA,MACb,UAAU,KAAM,CAAA,UAAA;AAAA,KACjB,CAAA,CAAA;AAED,IAAM,MAAA;AAAA,MACJ,QAAA;AAAA,MACA,MAAA;AAAA,MACA,OAAA;AAAA,MACA,WAAA;AAAA,MACA,cAAA;AAAA,MACA,YAAA;AAAA,MACA,WAAA;AAAA,MACA,gBAAA;AAAA,MACA,gBAAA;AAAA,MACA,YAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA;AAAA,KACE,GAAAC,+BAAA,CAAgB,KAAO,EAAA,QAAA,EAAU,IAAI,CAAA,CAAA;AAEzC,IAAA,MAAM,EAAE,QAAA,EAAU,QAAa,EAAA,GAAAC,UAAA,CAAO,QAAQ,CAAA,CAAA;AAE9C,IAAa,MAAA,CAAA;AAAA,MACX,YAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA;AAAA,MACA,QAAA;AAAA,MACA,QAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -2,101 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
require('../../../
|
|
8
|
-
require('
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var index = require('../../../hooks/use-namespace/index.js');
|
|
12
|
-
var useSliderButton = require('./composables/use-slider-button.js');
|
|
5
|
+
var core = require('@popperjs/core');
|
|
6
|
+
require('../../../utils/index.js');
|
|
7
|
+
require('../../../constants/index.js');
|
|
8
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
9
|
+
var event = require('../../../constants/event.js');
|
|
10
|
+
var types = require('../../../utils/types.js');
|
|
13
11
|
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const initData = vue.reactive({
|
|
26
|
-
hovering: false,
|
|
27
|
-
dragging: false,
|
|
28
|
-
isClick: false,
|
|
29
|
-
startX: 0,
|
|
30
|
-
currentX: 0,
|
|
31
|
-
startY: 0,
|
|
32
|
-
currentY: 0,
|
|
33
|
-
startPosition: 0,
|
|
34
|
-
newPosition: 0,
|
|
35
|
-
oldValue: props.modelValue
|
|
36
|
-
});
|
|
37
|
-
const {
|
|
38
|
-
disabled,
|
|
39
|
-
button,
|
|
40
|
-
tooltip,
|
|
41
|
-
showTooltip,
|
|
42
|
-
tooltipVisible,
|
|
43
|
-
wrapperStyle,
|
|
44
|
-
formatValue,
|
|
45
|
-
handleMouseEnter,
|
|
46
|
-
handleMouseLeave,
|
|
47
|
-
onButtonDown,
|
|
48
|
-
onKeyDown,
|
|
49
|
-
setPosition
|
|
50
|
-
} = useSliderButton.useSliderButton(props, initData, emit);
|
|
51
|
-
const { hovering, dragging } = vue.toRefs(initData);
|
|
52
|
-
expose({
|
|
53
|
-
onButtonDown,
|
|
54
|
-
onKeyDown,
|
|
55
|
-
setPosition,
|
|
56
|
-
hovering,
|
|
57
|
-
dragging
|
|
58
|
-
});
|
|
59
|
-
return (_ctx, _cache) => {
|
|
60
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
61
|
-
ref_key: "button",
|
|
62
|
-
ref: button,
|
|
63
|
-
class: vue.normalizeClass([vue.unref(ns).e("button-wrapper"), { hover: vue.unref(hovering), dragging: vue.unref(dragging) }]),
|
|
64
|
-
style: vue.normalizeStyle(vue.unref(wrapperStyle)),
|
|
65
|
-
tabindex: vue.unref(disabled) ? -1 : 0,
|
|
66
|
-
onMouseenter: _cache[0] || (_cache[0] = (...args) => vue.unref(handleMouseEnter) && vue.unref(handleMouseEnter)(...args)),
|
|
67
|
-
onMouseleave: _cache[1] || (_cache[1] = (...args) => vue.unref(handleMouseLeave) && vue.unref(handleMouseLeave)(...args)),
|
|
68
|
-
onMousedown: _cache[2] || (_cache[2] = (...args) => vue.unref(onButtonDown) && vue.unref(onButtonDown)(...args)),
|
|
69
|
-
onTouchstart: _cache[3] || (_cache[3] = (...args) => vue.unref(onButtonDown) && vue.unref(onButtonDown)(...args)),
|
|
70
|
-
onFocus: _cache[4] || (_cache[4] = (...args) => vue.unref(handleMouseEnter) && vue.unref(handleMouseEnter)(...args)),
|
|
71
|
-
onBlur: _cache[5] || (_cache[5] = (...args) => vue.unref(handleMouseLeave) && vue.unref(handleMouseLeave)(...args)),
|
|
72
|
-
onKeydown: _cache[6] || (_cache[6] = (...args) => vue.unref(onKeyDown) && vue.unref(onKeyDown)(...args))
|
|
73
|
-
}, [
|
|
74
|
-
vue.createVNode(vue.unref(index$1.ElTooltip), {
|
|
75
|
-
ref_key: "tooltip",
|
|
76
|
-
ref: tooltip,
|
|
77
|
-
visible: vue.unref(tooltipVisible),
|
|
78
|
-
placement: _ctx.placement,
|
|
79
|
-
"fallback-placements": ["top", "bottom", "right", "left"],
|
|
80
|
-
"stop-popper-mouse-event": false,
|
|
81
|
-
"popper-class": _ctx.tooltipClass,
|
|
82
|
-
disabled: !vue.unref(showTooltip),
|
|
83
|
-
persistent: ""
|
|
84
|
-
}, {
|
|
85
|
-
content: vue.withCtx(() => [
|
|
86
|
-
vue.createElementVNode("span", null, vue.toDisplayString(vue.unref(formatValue)), 1)
|
|
87
|
-
]),
|
|
88
|
-
default: vue.withCtx(() => [
|
|
89
|
-
vue.createElementVNode("div", {
|
|
90
|
-
class: vue.normalizeClass([vue.unref(ns).e("button"), { hover: vue.unref(hovering), dragging: vue.unref(dragging) }])
|
|
91
|
-
}, null, 2)
|
|
92
|
-
]),
|
|
93
|
-
_: 1
|
|
94
|
-
}, 8, ["visible", "placement", "popper-class", "disabled"])
|
|
95
|
-
], 46, _hoisted_1);
|
|
96
|
-
};
|
|
12
|
+
const sliderButtonProps = runtime.buildProps({
|
|
13
|
+
modelValue: {
|
|
14
|
+
type: Number,
|
|
15
|
+
default: 0
|
|
16
|
+
},
|
|
17
|
+
vertical: Boolean,
|
|
18
|
+
tooltipClass: String,
|
|
19
|
+
placement: {
|
|
20
|
+
type: String,
|
|
21
|
+
values: core.placements,
|
|
22
|
+
default: "top"
|
|
97
23
|
}
|
|
98
24
|
});
|
|
99
|
-
|
|
25
|
+
const sliderButtonEmits = {
|
|
26
|
+
[event.UPDATE_MODEL_EVENT]: (value) => types.isNumber(value)
|
|
27
|
+
};
|
|
100
28
|
|
|
101
|
-
exports
|
|
29
|
+
exports.sliderButtonEmits = sliderButtonEmits;
|
|
30
|
+
exports.sliderButtonProps = sliderButtonProps;
|
|
102
31
|
//# sourceMappingURL=button2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button2.js","sources":["../../../../../../packages/components/slider/src/button.
|
|
1
|
+
{"version":3,"file":"button2.js","sources":["../../../../../../packages/components/slider/src/button.ts"],"sourcesContent":["import { placements } from '@popperjs/core'\nimport { buildProps, isNumber } from '@element-plus/utils'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport type { ExtractPropTypes, Ref } from 'vue'\nimport type Button from './button.vue'\n\nexport const sliderButtonProps = buildProps({\n modelValue: {\n type: Number,\n default: 0,\n },\n vertical: Boolean,\n tooltipClass: String,\n placement: {\n type: String,\n values: placements,\n default: 'top',\n },\n} as const)\nexport type SliderButtonProps = ExtractPropTypes<typeof sliderButtonProps>\n\nexport const sliderButtonEmits = {\n [UPDATE_MODEL_EVENT]: (value: number) => isNumber(value),\n}\nexport type SliderButtonEmits = typeof sliderButtonEmits\n\nexport type SliderButtonInstance = InstanceType<typeof Button>\n\nexport type ButtonRefs = Record<\n 'firstButton' | 'secondButton',\n Ref<SliderButtonInstance | undefined>\n>\n\nexport interface SliderButtonInitData {\n hovering: boolean\n dragging: boolean\n isClick: boolean\n startX: number\n currentX: number\n startY: number\n currentY: number\n startPosition: number\n newPosition: number\n oldValue: number\n}\n"],"names":["buildProps","placements","UPDATE_MODEL_EVENT","isNumber"],"mappings":";;;;;;;;;;;AAGY,MAAC,iBAAiB,GAAGA,kBAAU,CAAC;AAC5C,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,YAAY,EAAE,MAAM;AACtB,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAEC,eAAU;AACtB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,iBAAiB,GAAG;AACjC,EAAE,CAACC,wBAAkB,GAAG,CAAC,KAAK,KAAKC,cAAQ,CAAC,KAAK,CAAC;AAClD;;;;;"}
|
|
@@ -8,7 +8,7 @@ require('../../form/index.js');
|
|
|
8
8
|
require('../../../hooks/index.js');
|
|
9
9
|
var constants = require('./constants.js');
|
|
10
10
|
var slider = require('./slider.js');
|
|
11
|
-
var button = require('./
|
|
11
|
+
var button = require('./button.js');
|
|
12
12
|
var marker = require('./marker.js');
|
|
13
13
|
require('./composables/index.js');
|
|
14
14
|
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
require('../../utils/index.js');
|
|
6
|
-
var steps$1 = require('./src/
|
|
6
|
+
var steps$1 = require('./src/steps2.js');
|
|
7
7
|
var item$1 = require('./src/item2.js');
|
|
8
8
|
var item = require('./src/item.js');
|
|
9
|
-
var steps = require('./src/
|
|
9
|
+
var steps = require('./src/steps.js');
|
|
10
10
|
var install = require('../../utils/vue/install.js');
|
|
11
11
|
|
|
12
12
|
const ElSteps = install.withInstall(steps$1["default"], {
|