@element-plus/nightly 0.0.20240405 → 0.0.20240407
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 +149 -91
- package/es/components/message/src/message.mjs.map +1 -1
- package/es/components/message/src/message2.mjs +91 -149
- package/es/components/message/src/message2.mjs.map +1 -1
- package/es/components/message/src/method.mjs +2 -2
- package/es/components/pagination/src/components/jumper.mjs +9 -60
- package/es/components/pagination/src/components/jumper.mjs.map +1 -1
- package/es/components/pagination/src/components/jumper2.mjs +60 -9
- package/es/components/pagination/src/components/jumper2.mjs.map +1 -1
- package/es/components/pagination/src/components/next.mjs +19 -38
- package/es/components/pagination/src/components/next.mjs.map +1 -1
- package/es/components/pagination/src/components/next2.mjs +38 -19
- package/es/components/pagination/src/components/next2.mjs.map +1 -1
- package/es/components/pagination/src/components/pager.mjs +17 -216
- package/es/components/pagination/src/components/pager.mjs.map +1 -1
- package/es/components/pagination/src/components/pager2.mjs +216 -17
- package/es/components/pagination/src/components/pager2.mjs.map +1 -1
- package/es/components/pagination/src/pagination.mjs +3 -3
- package/es/components/steps/index.mjs +2 -2
- package/es/components/steps/src/item.mjs +191 -19
- package/es/components/steps/src/item.mjs.map +1 -1
- package/es/components/steps/src/item2.mjs +19 -191
- 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 +148 -93
- package/lib/components/message/src/message.js.map +1 -1
- package/lib/components/message/src/message2.js +93 -148
- package/lib/components/message/src/message2.js.map +1 -1
- package/lib/components/message/src/method.js +2 -2
- package/lib/components/pagination/src/components/jumper.js +9 -60
- package/lib/components/pagination/src/components/jumper.js.map +1 -1
- package/lib/components/pagination/src/components/jumper2.js +60 -9
- package/lib/components/pagination/src/components/jumper2.js.map +1 -1
- package/lib/components/pagination/src/components/next.js +19 -38
- package/lib/components/pagination/src/components/next.js.map +1 -1
- package/lib/components/pagination/src/components/next2.js +38 -19
- package/lib/components/pagination/src/components/next2.js.map +1 -1
- package/lib/components/pagination/src/components/pager.js +17 -216
- package/lib/components/pagination/src/components/pager.js.map +1 -1
- package/lib/components/pagination/src/components/pager2.js +216 -17
- package/lib/components/pagination/src/components/pager2.js.map +1 -1
- package/lib/components/pagination/src/pagination.js +3 -3
- package/lib/components/steps/index.js +2 -2
- package/lib/components/steps/src/item.js +191 -19
- package/lib/components/steps/src/item.js.map +1 -1
- package/lib/components/steps/src/item2.js +19 -191
- 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
|
@@ -1,197 +1,25 @@
|
|
|
1
|
-
import { defineComponent, ref, inject, getCurrentInstance, onMounted, watch, onBeforeUnmount, computed, reactive, openBlock, createElementBlock, normalizeStyle, unref, normalizeClass, createCommentVNode, createElementVNode, renderSlot, createBlock, withCtx, resolveDynamicComponent, createVNode, toDisplayString, createTextVNode } from 'vue';
|
|
2
|
-
import '../../../hooks/index.mjs';
|
|
3
|
-
import { ElIcon } from '../../icon/index.mjs';
|
|
4
|
-
import { Check, Close } from '@element-plus/icons-vue';
|
|
5
1
|
import '../../../utils/index.mjs';
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
9
|
-
import { isNumber } from '../../../utils/types.mjs';
|
|
2
|
+
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
|
3
|
+
import { iconPropType } from '../../../utils/vue/icon.mjs';
|
|
10
4
|
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
() => parent.props.active,
|
|
28
|
-
() => parent.props.processStatus,
|
|
29
|
-
() => parent.props.finishStatus
|
|
30
|
-
], ([active]) => {
|
|
31
|
-
updateStatus(active);
|
|
32
|
-
}, { immediate: true });
|
|
33
|
-
});
|
|
34
|
-
onBeforeUnmount(() => {
|
|
35
|
-
parent.removeStep(stepItemState.uid);
|
|
36
|
-
});
|
|
37
|
-
const currentStatus = computed(() => {
|
|
38
|
-
return props.status || internalStatus.value;
|
|
39
|
-
});
|
|
40
|
-
const prevStatus = computed(() => {
|
|
41
|
-
const prevStep = parent.steps.value[index.value - 1];
|
|
42
|
-
return prevStep ? prevStep.currentStatus : "wait";
|
|
43
|
-
});
|
|
44
|
-
const isCenter = computed(() => {
|
|
45
|
-
return parent.props.alignCenter;
|
|
46
|
-
});
|
|
47
|
-
const isVertical = computed(() => {
|
|
48
|
-
return parent.props.direction === "vertical";
|
|
49
|
-
});
|
|
50
|
-
const isSimple = computed(() => {
|
|
51
|
-
return parent.props.simple;
|
|
52
|
-
});
|
|
53
|
-
const stepsCount = computed(() => {
|
|
54
|
-
return parent.steps.value.length;
|
|
55
|
-
});
|
|
56
|
-
const isLast = computed(() => {
|
|
57
|
-
var _a;
|
|
58
|
-
return ((_a = parent.steps.value[stepsCount.value - 1]) == null ? void 0 : _a.uid) === (currentInstance == null ? void 0 : currentInstance.uid);
|
|
59
|
-
});
|
|
60
|
-
const space = computed(() => {
|
|
61
|
-
return isSimple.value ? "" : parent.props.space;
|
|
62
|
-
});
|
|
63
|
-
const containerKls = computed(() => {
|
|
64
|
-
return [
|
|
65
|
-
ns.b(),
|
|
66
|
-
ns.is(isSimple.value ? "simple" : parent.props.direction),
|
|
67
|
-
ns.is("flex", isLast.value && !space.value && !isCenter.value),
|
|
68
|
-
ns.is("center", isCenter.value && !isVertical.value && !isSimple.value)
|
|
69
|
-
];
|
|
70
|
-
});
|
|
71
|
-
const style = computed(() => {
|
|
72
|
-
const style2 = {
|
|
73
|
-
flexBasis: isNumber(space.value) ? `${space.value}px` : space.value ? space.value : `${100 / (stepsCount.value - (isCenter.value ? 0 : 1))}%`
|
|
74
|
-
};
|
|
75
|
-
if (isVertical.value)
|
|
76
|
-
return style2;
|
|
77
|
-
if (isLast.value) {
|
|
78
|
-
style2.maxWidth = `${100 / stepsCount.value}%`;
|
|
79
|
-
}
|
|
80
|
-
return style2;
|
|
81
|
-
});
|
|
82
|
-
const setIndex = (val) => {
|
|
83
|
-
index.value = val;
|
|
84
|
-
};
|
|
85
|
-
const calcProgress = (status) => {
|
|
86
|
-
const isWait = status === "wait";
|
|
87
|
-
const style2 = {
|
|
88
|
-
transitionDelay: `${isWait ? "-" : ""}${150 * index.value}ms`
|
|
89
|
-
};
|
|
90
|
-
const step = status === parent.props.processStatus || isWait ? 0 : 100;
|
|
91
|
-
style2.borderWidth = step && !isSimple.value ? "1px" : 0;
|
|
92
|
-
style2[parent.props.direction === "vertical" ? "height" : "width"] = `${step}%`;
|
|
93
|
-
lineStyle.value = style2;
|
|
94
|
-
};
|
|
95
|
-
const updateStatus = (activeIndex) => {
|
|
96
|
-
if (activeIndex > index.value) {
|
|
97
|
-
internalStatus.value = parent.props.finishStatus;
|
|
98
|
-
} else if (activeIndex === index.value && prevStatus.value !== "error") {
|
|
99
|
-
internalStatus.value = parent.props.processStatus;
|
|
100
|
-
} else {
|
|
101
|
-
internalStatus.value = "wait";
|
|
102
|
-
}
|
|
103
|
-
const prevChild = parent.steps.value[index.value - 1];
|
|
104
|
-
if (prevChild)
|
|
105
|
-
prevChild.calcProgress(internalStatus.value);
|
|
106
|
-
};
|
|
107
|
-
const stepItemState = reactive({
|
|
108
|
-
uid: currentInstance.uid,
|
|
109
|
-
currentStatus,
|
|
110
|
-
setIndex,
|
|
111
|
-
calcProgress
|
|
112
|
-
});
|
|
113
|
-
parent.addStep(stepItemState);
|
|
114
|
-
return (_ctx, _cache) => {
|
|
115
|
-
return openBlock(), createElementBlock("div", {
|
|
116
|
-
style: normalizeStyle(unref(style)),
|
|
117
|
-
class: normalizeClass(unref(containerKls))
|
|
118
|
-
}, [
|
|
119
|
-
createCommentVNode(" icon & line "),
|
|
120
|
-
createElementVNode("div", {
|
|
121
|
-
class: normalizeClass([unref(ns).e("head"), unref(ns).is(unref(currentStatus))])
|
|
122
|
-
}, [
|
|
123
|
-
!unref(isSimple) ? (openBlock(), createElementBlock("div", {
|
|
124
|
-
key: 0,
|
|
125
|
-
class: normalizeClass(unref(ns).e("line"))
|
|
126
|
-
}, [
|
|
127
|
-
createElementVNode("i", {
|
|
128
|
-
class: normalizeClass(unref(ns).e("line-inner")),
|
|
129
|
-
style: normalizeStyle(lineStyle.value)
|
|
130
|
-
}, null, 6)
|
|
131
|
-
], 2)) : createCommentVNode("v-if", true),
|
|
132
|
-
createElementVNode("div", {
|
|
133
|
-
class: normalizeClass([unref(ns).e("icon"), unref(ns).is(_ctx.icon || _ctx.$slots.icon ? "icon" : "text")])
|
|
134
|
-
}, [
|
|
135
|
-
renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
136
|
-
_ctx.icon ? (openBlock(), createBlock(unref(ElIcon), {
|
|
137
|
-
key: 0,
|
|
138
|
-
class: normalizeClass(unref(ns).e("icon-inner"))
|
|
139
|
-
}, {
|
|
140
|
-
default: withCtx(() => [
|
|
141
|
-
(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon)))
|
|
142
|
-
]),
|
|
143
|
-
_: 1
|
|
144
|
-
}, 8, ["class"])) : unref(currentStatus) === "success" ? (openBlock(), createBlock(unref(ElIcon), {
|
|
145
|
-
key: 1,
|
|
146
|
-
class: normalizeClass([unref(ns).e("icon-inner"), unref(ns).is("status")])
|
|
147
|
-
}, {
|
|
148
|
-
default: withCtx(() => [
|
|
149
|
-
createVNode(unref(Check))
|
|
150
|
-
]),
|
|
151
|
-
_: 1
|
|
152
|
-
}, 8, ["class"])) : unref(currentStatus) === "error" ? (openBlock(), createBlock(unref(ElIcon), {
|
|
153
|
-
key: 2,
|
|
154
|
-
class: normalizeClass([unref(ns).e("icon-inner"), unref(ns).is("status")])
|
|
155
|
-
}, {
|
|
156
|
-
default: withCtx(() => [
|
|
157
|
-
createVNode(unref(Close))
|
|
158
|
-
]),
|
|
159
|
-
_: 1
|
|
160
|
-
}, 8, ["class"])) : !unref(isSimple) ? (openBlock(), createElementBlock("div", {
|
|
161
|
-
key: 3,
|
|
162
|
-
class: normalizeClass(unref(ns).e("icon-inner"))
|
|
163
|
-
}, toDisplayString(index.value + 1), 3)) : createCommentVNode("v-if", true)
|
|
164
|
-
])
|
|
165
|
-
], 2)
|
|
166
|
-
], 2),
|
|
167
|
-
createCommentVNode(" title & description "),
|
|
168
|
-
createElementVNode("div", {
|
|
169
|
-
class: normalizeClass(unref(ns).e("main"))
|
|
170
|
-
}, [
|
|
171
|
-
createElementVNode("div", {
|
|
172
|
-
class: normalizeClass([unref(ns).e("title"), unref(ns).is(unref(currentStatus))])
|
|
173
|
-
}, [
|
|
174
|
-
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
175
|
-
createTextVNode(toDisplayString(_ctx.title), 1)
|
|
176
|
-
])
|
|
177
|
-
], 2),
|
|
178
|
-
unref(isSimple) ? (openBlock(), createElementBlock("div", {
|
|
179
|
-
key: 0,
|
|
180
|
-
class: normalizeClass(unref(ns).e("arrow"))
|
|
181
|
-
}, null, 2)) : (openBlock(), createElementBlock("div", {
|
|
182
|
-
key: 1,
|
|
183
|
-
class: normalizeClass([unref(ns).e("description"), unref(ns).is(unref(currentStatus))])
|
|
184
|
-
}, [
|
|
185
|
-
renderSlot(_ctx.$slots, "description", {}, () => [
|
|
186
|
-
createTextVNode(toDisplayString(_ctx.description), 1)
|
|
187
|
-
])
|
|
188
|
-
], 2))
|
|
189
|
-
], 2)
|
|
190
|
-
], 6);
|
|
191
|
-
};
|
|
5
|
+
const stepProps = buildProps({
|
|
6
|
+
title: {
|
|
7
|
+
type: String,
|
|
8
|
+
default: ""
|
|
9
|
+
},
|
|
10
|
+
icon: {
|
|
11
|
+
type: iconPropType
|
|
12
|
+
},
|
|
13
|
+
description: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: ""
|
|
16
|
+
},
|
|
17
|
+
status: {
|
|
18
|
+
type: String,
|
|
19
|
+
values: ["", "wait", "process", "finish", "error", "success"],
|
|
20
|
+
default: ""
|
|
192
21
|
}
|
|
193
22
|
});
|
|
194
|
-
var Step = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "item.vue"]]);
|
|
195
23
|
|
|
196
|
-
export {
|
|
24
|
+
export { stepProps };
|
|
197
25
|
//# sourceMappingURL=item2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"item2.mjs","sources":["../../../../../../packages/components/steps/src/item.vue"],"sourcesContent":["<template>\n <div :style=\"style\" :class=\"containerKls\">\n <!-- icon & line -->\n <div :class=\"[ns.e('head'), ns.is(currentStatus)]\">\n <div v-if=\"!isSimple\" :class=\"ns.e('line')\">\n <i :class=\"ns.e('line-inner')\" :style=\"lineStyle\" />\n </div>\n\n <div\n :class=\"[ns.e('icon'), ns.is(icon || $slots.icon ? 'icon' : 'text')]\"\n >\n <slot name=\"icon\">\n <el-icon v-if=\"icon\" :class=\"ns.e('icon-inner')\">\n <component :is=\"icon\" />\n </el-icon>\n <el-icon\n v-else-if=\"currentStatus === 'success'\"\n :class=\"[ns.e('icon-inner'), ns.is('status')]\"\n >\n <Check />\n </el-icon>\n <el-icon\n v-else-if=\"currentStatus === 'error'\"\n :class=\"[ns.e('icon-inner'), ns.is('status')]\"\n >\n <Close />\n </el-icon>\n <div v-else-if=\"!isSimple\" :class=\"ns.e('icon-inner')\">\n {{ index + 1 }}\n </div>\n </slot>\n </div>\n </div>\n <!-- title & description -->\n <div :class=\"ns.e('main')\">\n <div :class=\"[ns.e('title'), ns.is(currentStatus)]\">\n <slot name=\"title\">{{ title }}</slot>\n </div>\n <div v-if=\"isSimple\" :class=\"ns.e('arrow')\" />\n <div v-else :class=\"[ns.e('description'), ns.is(currentStatus)]\">\n <slot name=\"description\">{{ description }}</slot>\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n computed,\n getCurrentInstance,\n inject,\n onBeforeUnmount,\n onMounted,\n reactive,\n ref,\n watch,\n} from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { Check, Close } from '@element-plus/icons-vue'\nimport { isNumber } from '@element-plus/utils'\nimport { stepProps } from './item'\n\nimport type { CSSProperties, Ref } from 'vue'\n\nexport interface IStepsProps {\n space: number | string\n active: number\n direction: string\n alignCenter: boolean\n simple: boolean\n finishStatus: string\n processStatus: string\n}\n\nexport interface StepItemState {\n uid: number\n currentStatus: string\n setIndex: (val: number) => void\n calcProgress: (status: string) => void\n}\n\nexport interface IStepsInject {\n props: IStepsProps\n steps: Ref<StepItemState[]>\n addStep: (item: StepItemState) => void\n removeStep: (uid: number) => void\n}\n\ndefineOptions({\n name: 'ElStep',\n})\n\nconst props = defineProps(stepProps)\nconst ns = useNamespace('step')\nconst index = ref(-1)\nconst lineStyle = ref({})\nconst internalStatus = ref('')\nconst parent = inject('ElSteps') as IStepsInject\nconst currentInstance = getCurrentInstance()\n\nonMounted(() => {\n watch(\n [\n () => parent.props.active,\n () => parent.props.processStatus,\n () => parent.props.finishStatus,\n ],\n ([active]) => {\n updateStatus(active)\n },\n { immediate: true }\n )\n})\n\nonBeforeUnmount(() => {\n parent.removeStep(stepItemState.uid)\n})\n\nconst currentStatus = computed(() => {\n return props.status || internalStatus.value\n})\n\nconst prevStatus = computed(() => {\n const prevStep = parent.steps.value[index.value - 1]\n return prevStep ? prevStep.currentStatus : 'wait'\n})\n\nconst isCenter = computed(() => {\n return parent.props.alignCenter\n})\n\nconst isVertical = computed(() => {\n return parent.props.direction === 'vertical'\n})\n\nconst isSimple = computed(() => {\n return parent.props.simple\n})\n\nconst stepsCount = computed(() => {\n return parent.steps.value.length\n})\n\nconst isLast = computed(() => {\n return parent.steps.value[stepsCount.value - 1]?.uid === currentInstance?.uid\n})\n\nconst space = computed(() => {\n return isSimple.value ? '' : parent.props.space\n})\n\nconst containerKls = computed(() => {\n return [\n ns.b(),\n ns.is(isSimple.value ? 'simple' : parent.props.direction),\n ns.is('flex', isLast.value && !space.value && !isCenter.value),\n ns.is('center', isCenter.value && !isVertical.value && !isSimple.value),\n ]\n})\n\nconst style = computed(() => {\n const style: CSSProperties = {\n flexBasis: isNumber(space.value)\n ? `${space.value}px`\n : space.value\n ? space.value\n : `${100 / (stepsCount.value - (isCenter.value ? 0 : 1))}%`,\n }\n if (isVertical.value) return style\n if (isLast.value) {\n style.maxWidth = `${100 / stepsCount.value}%`\n }\n return style\n})\n\nconst setIndex = (val: number) => {\n index.value = val\n}\n\nconst calcProgress = (status: string) => {\n const isWait = status === 'wait'\n const style: CSSProperties = {\n transitionDelay: `${isWait ? '-' : ''}${150 * index.value}ms`,\n }\n const step = status === parent.props.processStatus || isWait ? 0 : 100\n\n style.borderWidth = step && !isSimple.value ? '1px' : 0\n style[parent.props.direction === 'vertical' ? 'height' : 'width'] = `${step}%`\n lineStyle.value = style\n}\n\nconst updateStatus = (activeIndex: number) => {\n if (activeIndex > index.value) {\n internalStatus.value = parent.props.finishStatus\n } else if (activeIndex === index.value && prevStatus.value !== 'error') {\n internalStatus.value = parent.props.processStatus\n } else {\n internalStatus.value = 'wait'\n }\n const prevChild = parent.steps.value[index.value - 1]\n if (prevChild) prevChild.calcProgress(internalStatus.value)\n}\n\nconst stepItemState = reactive({\n uid: currentInstance!.uid,\n currentStatus,\n setIndex,\n calcProgress,\n})\n\nparent.addStep(stepItemState)\n</script>\n"],"names":[],"mappings":";;;;;;;;;;mCAyFc,CAAA;AAAA,EACZ,IAAM,EAAA,QAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAGA,I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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"item2.mjs","sources":["../../../../../../packages/components/steps/src/item.ts"],"sourcesContent":["import { buildProps, iconPropType } from '@element-plus/utils'\nimport type Step from './item.vue'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const stepProps = buildProps({\n /**\n * @description step title\n */\n title: {\n type: String,\n default: '',\n },\n /**\n * @description step custom icon. Icons can be passed via named slot as well\n */\n icon: {\n type: iconPropType,\n },\n /**\n * @description step description\n */\n description: {\n type: String,\n default: '',\n },\n /**\n * @description current status. It will be automatically set by Steps if not configured.\n */\n status: {\n type: String,\n values: ['', 'wait', 'process', 'finish', 'error', 'success'],\n default: '',\n },\n} as const)\n\nexport type StepProps = ExtractPropTypes<typeof stepProps>\n\nexport type StepInstance = InstanceType<typeof Step>\n"],"names":[],"mappings":";;;;AACY,MAAC,SAAS,GAAG,UAAU,CAAC;AACpC,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,YAAY;AACtB,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,CAAC;AACjE,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,CAAC;;;;"}
|
package/es/index.mjs
CHANGED
|
@@ -154,7 +154,7 @@ export { useSpace } from './components/space/src/use-space.mjs';
|
|
|
154
154
|
export { ElSpace } from './components/space/index.mjs';
|
|
155
155
|
export { statisticProps } from './components/statistic/src/statistic.mjs';
|
|
156
156
|
export { ElStatistic } from './components/statistic/index.mjs';
|
|
157
|
-
export { stepProps } from './components/steps/src/
|
|
157
|
+
export { stepProps } from './components/steps/src/item2.mjs';
|
|
158
158
|
export { stepsEmits, stepsProps } from './components/steps/src/steps.mjs';
|
|
159
159
|
export { ElStep, ElSteps } from './components/steps/index.mjs';
|
|
160
160
|
export { switchEmits, switchProps } from './components/switch/src/switch.mjs';
|
|
@@ -217,7 +217,7 @@ export { ElInfiniteScroll } from './components/infinite-scroll/index.mjs';
|
|
|
217
217
|
export { ElLoading } from './components/loading/index.mjs';
|
|
218
218
|
export { vLoading as ElLoadingDirective, vLoading } from './components/loading/src/directive.mjs';
|
|
219
219
|
export { Loading as ElLoadingService } from './components/loading/src/service.mjs';
|
|
220
|
-
export { messageDefaults, messageEmits, messageProps, messageTypes } from './components/message/src/
|
|
220
|
+
export { messageDefaults, messageEmits, messageProps, messageTypes } from './components/message/src/message2.mjs';
|
|
221
221
|
export { ElMessage } from './components/message/index.mjs';
|
|
222
222
|
export { ElMessageBox } from './components/message-box/index.mjs';
|
|
223
223
|
export { notificationEmits, notificationProps, notificationTypes } from './components/notification/src/notification.mjs';
|
package/es/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "0.0.
|
|
1
|
+
export declare const version = "0.0.20240407";
|
package/es/version.mjs
CHANGED
package/es/version.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '0.0.
|
|
1
|
+
{"version":3,"file":"version.mjs","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '0.0.20240407'\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"}
|
package/lib/components/index.js
CHANGED
|
@@ -176,7 +176,7 @@ var constants$e = require('./slider/src/constants.js');
|
|
|
176
176
|
var space = require('./space/src/space.js');
|
|
177
177
|
var useSpace = require('./space/src/use-space.js');
|
|
178
178
|
var statistic = require('./statistic/src/statistic.js');
|
|
179
|
-
var item = require('./steps/src/
|
|
179
|
+
var item = require('./steps/src/item2.js');
|
|
180
180
|
var steps = require('./steps/src/steps.js');
|
|
181
181
|
var _switch = require('./switch/src/switch.js');
|
|
182
182
|
var constants$f = require('./table-v2/src/constants.js');
|
|
@@ -218,7 +218,7 @@ var tour = require('./tour/src/tour.js');
|
|
|
218
218
|
var anchor = require('./anchor/src/anchor.js');
|
|
219
219
|
var directive = require('./loading/src/directive.js');
|
|
220
220
|
var service = require('./loading/src/service.js');
|
|
221
|
-
var message = require('./message/src/
|
|
221
|
+
var message = require('./message/src/message2.js');
|
|
222
222
|
var notification = require('./notification/src/notification.js');
|
|
223
223
|
var popover = require('./popover/src/popover.js');
|
|
224
224
|
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
require('../../utils/index.js');
|
|
6
6
|
var method = require('./src/method.js');
|
|
7
|
-
var message = require('./src/
|
|
7
|
+
var message = require('./src/message2.js');
|
|
8
8
|
var install = require('../../utils/vue/install.js');
|
|
9
9
|
|
|
10
10
|
const ElMessage = install.withInstallFunction(method["default"], "$message");
|
|
@@ -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('./message2.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=message.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.js","sources":["../../../../../../packages/components/message/src/message.
|
|
1
|
+
{"version":3,"file":"message.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":";;;;;;;;;;;;;;;;;;;;uCA6Dc,CAAA;AAAA,EACZ,IAAM,EAAA,WAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAJA,IAAA,MAAM,EAAE,KAAU,EAAA,GAAAA,mBAAA,CAAA;AASlB,IAAA,MAAM,EAAE,EAAA,EAAI,MAAW,EAAA,GAAAC,0CAAA,CAA2B,SAAS,CAAA,CAAA;AAC3D,IAAM,MAAA,EAAE,eAAe,UAAe,EAAA,GAAA,MAAA,CAAA;AAEtC,IAAA,MAAM,aAAaC,OAAoB,EAAA,CAAA;AACvC,IAAM,MAAA,OAAA,GAAUA,QAAI,KAAK,CAAA,CAAA;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