@element-plus/nightly 0.0.20240407 → 0.0.20240408
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.full.js +2 -2
- 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 +2 -2
- 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/index.mjs +2 -2
- package/es/components/message/index.mjs +1 -1
- package/es/components/message/src/message.mjs +91 -149
- package/es/components/message/src/message.mjs.map +1 -1
- package/es/components/message/src/message2.mjs +149 -91
- package/es/components/message/src/message2.mjs.map +1 -1
- package/es/components/message/src/method.mjs +2 -2
- 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/item.mjs +19 -191
- package/es/components/steps/src/item.mjs.map +1 -1
- package/es/components/steps/src/item2.mjs +191 -19
- package/es/components/steps/src/item2.mjs.map +1 -1
- package/es/index.mjs +2 -2
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/index.js +2 -2
- package/lib/components/message/index.js +1 -1
- package/lib/components/message/src/message.js +93 -148
- package/lib/components/message/src/message.js.map +1 -1
- package/lib/components/message/src/message2.js +148 -93
- package/lib/components/message/src/message2.js.map +1 -1
- package/lib/components/message/src/method.js +2 -2
- 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/item.js +19 -191
- package/lib/components/steps/src/item.js.map +1 -1
- package/lib/components/steps/src/item2.js +191 -19
- package/lib/components/steps/src/item2.js.map +1 -1
- package/lib/index.js +2 -2
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +1 -1
- package/web-types.json +1 -1
|
@@ -2,104 +2,159 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
require('
|
|
6
|
-
var typescript = require('../../../utils/typescript.js');
|
|
5
|
+
var vue = require('vue');
|
|
7
6
|
var core = require('@vueuse/core');
|
|
8
|
-
|
|
7
|
+
require('../../../utils/index.js');
|
|
8
|
+
require('../../../constants/index.js');
|
|
9
|
+
var index = require('../../badge/index.js');
|
|
10
|
+
require('../../config-provider/index.js');
|
|
11
|
+
var index$1 = require('../../icon/index.js');
|
|
12
|
+
var message = require('./message.js');
|
|
13
|
+
var instance = require('./instance.js');
|
|
14
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
9
15
|
var icon = require('../../../utils/vue/icon.js');
|
|
16
|
+
var useGlobalConfig = require('../../config-provider/src/hooks/use-global-config.js');
|
|
17
|
+
var aria = require('../../../constants/aria.js');
|
|
10
18
|
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
dangerouslyUseHTMLString: false,
|
|
16
|
-
duration: 3e3,
|
|
17
|
-
icon: void 0,
|
|
18
|
-
id: "",
|
|
19
|
-
message: "",
|
|
20
|
-
onClose: void 0,
|
|
21
|
-
showClose: false,
|
|
22
|
-
type: "info",
|
|
23
|
-
plain: false,
|
|
24
|
-
offset: 16,
|
|
25
|
-
zIndex: 0,
|
|
26
|
-
grouping: false,
|
|
27
|
-
repeatNum: 1,
|
|
28
|
-
appendTo: core.isClient ? document.body : void 0
|
|
19
|
+
const _hoisted_1 = ["id"];
|
|
20
|
+
const _hoisted_2 = ["innerHTML"];
|
|
21
|
+
const __default__ = vue.defineComponent({
|
|
22
|
+
name: "ElMessage"
|
|
29
23
|
});
|
|
30
|
-
const
|
|
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
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
24
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
25
|
+
...__default__,
|
|
26
|
+
props: message.messageProps,
|
|
27
|
+
emits: message.messageEmits,
|
|
28
|
+
setup(__props, { expose }) {
|
|
29
|
+
const props = __props;
|
|
30
|
+
const { Close } = icon.TypeComponents;
|
|
31
|
+
const { ns, zIndex } = useGlobalConfig.useGlobalComponentSettings("message");
|
|
32
|
+
const { currentZIndex, nextZIndex } = zIndex;
|
|
33
|
+
const messageRef = vue.ref();
|
|
34
|
+
const visible = vue.ref(false);
|
|
35
|
+
const height = vue.ref(0);
|
|
36
|
+
let stopTimer = void 0;
|
|
37
|
+
const badgeType = vue.computed(() => props.type ? props.type === "error" ? "danger" : props.type : "info");
|
|
38
|
+
const typeClass = vue.computed(() => {
|
|
39
|
+
const type = props.type;
|
|
40
|
+
return { [ns.bm("icon", type)]: type && icon.TypeComponentsMap[type] };
|
|
41
|
+
});
|
|
42
|
+
const iconComponent = vue.computed(() => props.icon || icon.TypeComponentsMap[props.type] || "");
|
|
43
|
+
const lastOffset = vue.computed(() => instance.getLastOffset(props.id));
|
|
44
|
+
const offset = vue.computed(() => instance.getOffsetOrSpace(props.id, props.offset) + lastOffset.value);
|
|
45
|
+
const bottom = vue.computed(() => height.value + offset.value);
|
|
46
|
+
const customStyle = vue.computed(() => ({
|
|
47
|
+
top: `${offset.value}px`,
|
|
48
|
+
zIndex: currentZIndex.value
|
|
49
|
+
}));
|
|
50
|
+
function startTimer() {
|
|
51
|
+
if (props.duration === 0)
|
|
52
|
+
return;
|
|
53
|
+
({ stop: stopTimer } = core.useTimeoutFn(() => {
|
|
54
|
+
close();
|
|
55
|
+
}, props.duration));
|
|
56
|
+
}
|
|
57
|
+
function clearTimer() {
|
|
58
|
+
stopTimer == null ? void 0 : stopTimer();
|
|
59
|
+
}
|
|
60
|
+
function close() {
|
|
61
|
+
visible.value = false;
|
|
62
|
+
}
|
|
63
|
+
function keydown({ code }) {
|
|
64
|
+
if (code === aria.EVENT_CODE.esc) {
|
|
65
|
+
close();
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
vue.onMounted(() => {
|
|
69
|
+
startTimer();
|
|
70
|
+
nextZIndex();
|
|
71
|
+
visible.value = true;
|
|
72
|
+
});
|
|
73
|
+
vue.watch(() => props.repeatNum, () => {
|
|
74
|
+
clearTimer();
|
|
75
|
+
startTimer();
|
|
76
|
+
});
|
|
77
|
+
core.useEventListener(document, "keydown", keydown);
|
|
78
|
+
core.useResizeObserver(messageRef, () => {
|
|
79
|
+
height.value = messageRef.value.getBoundingClientRect().height;
|
|
80
|
+
});
|
|
81
|
+
expose({
|
|
82
|
+
visible,
|
|
83
|
+
bottom,
|
|
84
|
+
close
|
|
85
|
+
});
|
|
86
|
+
return (_ctx, _cache) => {
|
|
87
|
+
return vue.openBlock(), vue.createBlock(vue.Transition, {
|
|
88
|
+
name: vue.unref(ns).b("fade"),
|
|
89
|
+
onBeforeLeave: _ctx.onClose,
|
|
90
|
+
onAfterLeave: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("destroy")),
|
|
91
|
+
persisted: ""
|
|
92
|
+
}, {
|
|
93
|
+
default: vue.withCtx(() => [
|
|
94
|
+
vue.withDirectives(vue.createElementVNode("div", {
|
|
95
|
+
id: _ctx.id,
|
|
96
|
+
ref_key: "messageRef",
|
|
97
|
+
ref: messageRef,
|
|
98
|
+
class: vue.normalizeClass([
|
|
99
|
+
vue.unref(ns).b(),
|
|
100
|
+
{ [vue.unref(ns).m(_ctx.type)]: _ctx.type },
|
|
101
|
+
vue.unref(ns).is("center", _ctx.center),
|
|
102
|
+
vue.unref(ns).is("closable", _ctx.showClose),
|
|
103
|
+
vue.unref(ns).is("plain", _ctx.plain),
|
|
104
|
+
_ctx.customClass
|
|
105
|
+
]),
|
|
106
|
+
style: vue.normalizeStyle(vue.unref(customStyle)),
|
|
107
|
+
role: "alert",
|
|
108
|
+
onMouseenter: clearTimer,
|
|
109
|
+
onMouseleave: startTimer
|
|
110
|
+
}, [
|
|
111
|
+
_ctx.repeatNum > 1 ? (vue.openBlock(), vue.createBlock(vue.unref(index.ElBadge), {
|
|
112
|
+
key: 0,
|
|
113
|
+
value: _ctx.repeatNum,
|
|
114
|
+
type: vue.unref(badgeType),
|
|
115
|
+
class: vue.normalizeClass(vue.unref(ns).e("badge"))
|
|
116
|
+
}, null, 8, ["value", "type", "class"])) : vue.createCommentVNode("v-if", true),
|
|
117
|
+
vue.unref(iconComponent) ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), {
|
|
118
|
+
key: 1,
|
|
119
|
+
class: vue.normalizeClass([vue.unref(ns).e("icon"), vue.unref(typeClass)])
|
|
120
|
+
}, {
|
|
121
|
+
default: vue.withCtx(() => [
|
|
122
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(iconComponent))))
|
|
123
|
+
]),
|
|
124
|
+
_: 1
|
|
125
|
+
}, 8, ["class"])) : vue.createCommentVNode("v-if", true),
|
|
126
|
+
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
127
|
+
!_ctx.dangerouslyUseHTMLString ? (vue.openBlock(), vue.createElementBlock("p", {
|
|
128
|
+
key: 0,
|
|
129
|
+
class: vue.normalizeClass(vue.unref(ns).e("content"))
|
|
130
|
+
}, vue.toDisplayString(_ctx.message), 3)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
131
|
+
vue.createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "),
|
|
132
|
+
vue.createElementVNode("p", {
|
|
133
|
+
class: vue.normalizeClass(vue.unref(ns).e("content")),
|
|
134
|
+
innerHTML: _ctx.message
|
|
135
|
+
}, null, 10, _hoisted_2)
|
|
136
|
+
], 2112))
|
|
137
|
+
]),
|
|
138
|
+
_ctx.showClose ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), {
|
|
139
|
+
key: 2,
|
|
140
|
+
class: vue.normalizeClass(vue.unref(ns).e("closeBtn")),
|
|
141
|
+
onClick: vue.withModifiers(close, ["stop"])
|
|
142
|
+
}, {
|
|
143
|
+
default: vue.withCtx(() => [
|
|
144
|
+
vue.createVNode(vue.unref(Close))
|
|
145
|
+
]),
|
|
146
|
+
_: 1
|
|
147
|
+
}, 8, ["class", "onClick"])) : vue.createCommentVNode("v-if", true)
|
|
148
|
+
], 46, _hoisted_1), [
|
|
149
|
+
[vue.vShow, visible.value]
|
|
150
|
+
])
|
|
151
|
+
]),
|
|
152
|
+
_: 3
|
|
153
|
+
}, 8, ["name", "onBeforeLeave"]);
|
|
154
|
+
};
|
|
95
155
|
}
|
|
96
156
|
});
|
|
97
|
-
|
|
98
|
-
destroy: () => true
|
|
99
|
-
};
|
|
157
|
+
var MessageConstructor = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "message.vue"]]);
|
|
100
158
|
|
|
101
|
-
exports
|
|
102
|
-
exports.messageEmits = messageEmits;
|
|
103
|
-
exports.messageProps = messageProps;
|
|
104
|
-
exports.messageTypes = messageTypes;
|
|
159
|
+
exports["default"] = MessageConstructor;
|
|
105
160
|
//# sourceMappingURL=message2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message2.js","sources":["../../../../../../packages/components/message/src/message.
|
|
1
|
+
{"version":3,"file":"message2.js","sources":["../../../../../../packages/components/message/src/message.vue"],"sourcesContent":["<template>\n <transition\n :name=\"ns.b('fade')\"\n @before-leave=\"onClose\"\n @after-leave=\"$emit('destroy')\"\n >\n <div\n v-show=\"visible\"\n :id=\"id\"\n ref=\"messageRef\"\n :class=\"[\n ns.b(),\n { [ns.m(type)]: type },\n ns.is('center', center),\n ns.is('closable', showClose),\n ns.is('plain', plain),\n customClass,\n ]\"\n :style=\"customStyle\"\n role=\"alert\"\n @mouseenter=\"clearTimer\"\n @mouseleave=\"startTimer\"\n >\n <el-badge\n v-if=\"repeatNum > 1\"\n :value=\"repeatNum\"\n :type=\"badgeType\"\n :class=\"ns.e('badge')\"\n />\n <el-icon v-if=\"iconComponent\" :class=\"[ns.e('icon'), typeClass]\">\n <component :is=\"iconComponent\" />\n </el-icon>\n <slot>\n <p v-if=\"!dangerouslyUseHTMLString\" :class=\"ns.e('content')\">\n {{ message }}\n </p>\n <!-- Caution here, message could've been compromised, never use user's input as message -->\n <p v-else :class=\"ns.e('content')\" v-html=\"message\" />\n </slot>\n <el-icon v-if=\"showClose\" :class=\"ns.e('closeBtn')\" @click.stop=\"close\">\n <Close />\n </el-icon>\n </div>\n </transition>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, onMounted, ref, watch } from 'vue'\nimport { useEventListener, useResizeObserver, useTimeoutFn } from '@vueuse/core'\nimport { TypeComponents, TypeComponentsMap } from '@element-plus/utils'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport ElBadge from '@element-plus/components/badge'\nimport { useGlobalComponentSettings } from '@element-plus/components/config-provider'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { messageEmits, messageProps } from './message'\nimport { getLastOffset, getOffsetOrSpace } from './instance'\nimport type { BadgeProps } from '@element-plus/components/badge'\nimport type { CSSProperties } from 'vue'\n\nconst { Close } = TypeComponents\n\ndefineOptions({\n name: 'ElMessage',\n})\n\nconst props = defineProps(messageProps)\ndefineEmits(messageEmits)\n\nconst { ns, zIndex } = useGlobalComponentSettings('message')\nconst { currentZIndex, nextZIndex } = zIndex\n\nconst messageRef = ref<HTMLDivElement>()\nconst visible = ref(false)\nconst height = ref(0)\n\nlet stopTimer: (() => void) | undefined = undefined\n\nconst badgeType = computed<BadgeProps['type']>(() =>\n props.type ? (props.type === 'error' ? 'danger' : props.type) : 'info'\n)\nconst typeClass = computed(() => {\n const type = props.type\n return { [ns.bm('icon', type)]: type && TypeComponentsMap[type] }\n})\nconst iconComponent = computed(\n () => props.icon || TypeComponentsMap[props.type] || ''\n)\n\nconst lastOffset = computed(() => getLastOffset(props.id))\nconst offset = computed(\n () => getOffsetOrSpace(props.id, props.offset) + lastOffset.value\n)\nconst bottom = computed((): number => height.value + offset.value)\nconst customStyle = computed<CSSProperties>(() => ({\n top: `${offset.value}px`,\n zIndex: currentZIndex.value,\n}))\n\nfunction startTimer() {\n if (props.duration === 0) return\n ;({ stop: stopTimer } = useTimeoutFn(() => {\n close()\n }, props.duration))\n}\n\nfunction clearTimer() {\n stopTimer?.()\n}\n\nfunction close() {\n visible.value = false\n}\n\nfunction keydown({ code }: KeyboardEvent) {\n if (code === EVENT_CODE.esc) {\n // press esc to close the message\n close()\n }\n}\n\nonMounted(() => {\n startTimer()\n nextZIndex()\n visible.value = true\n})\n\nwatch(\n () => props.repeatNum,\n () => {\n clearTimer()\n startTimer()\n }\n)\n\nuseEventListener(document, 'keydown', keydown)\n\nuseResizeObserver(messageRef, () => {\n height.value = messageRef.value!.getBoundingClientRect().height\n})\n\ndefineExpose({\n visible,\n bottom,\n close,\n})\n</script>\n"],"names":["TypeComponents","useGlobalComponentSettings","ref","computed","TypeComponentsMap","getLastOffset","getOffsetOrSpace","useTimeoutFn","EVENT_CODE","onMounted","watch","useEventListener","useResizeObserver"],"mappings":"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"}
|
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var vue = require('vue');
|
|
6
6
|
require('../../../utils/index.js');
|
|
7
7
|
require('../../config-provider/index.js');
|
|
8
|
-
var message$2 = require('./
|
|
9
|
-
var message$1 = require('./
|
|
8
|
+
var message$2 = require('./message2.js');
|
|
9
|
+
var message$1 = require('./message.js');
|
|
10
10
|
var instance = require('./instance.js');
|
|
11
11
|
var shared = require('@vue/shared');
|
|
12
12
|
var types = require('../../../utils/types.js');
|
|
@@ -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');
|