@element-plus/nightly 0.0.20241020 → 0.0.20241022
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/my.js +1 -1
- package/dist/locale/my.min.js +1 -1
- package/dist/locale/my.min.mjs +1 -1
- package/dist/locale/my.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/sw.js +1 -1
- package/dist/locale/sw.min.js +1 -1
- package/dist/locale/sw.min.mjs +1 -1
- package/dist/locale/sw.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/avatar/index.mjs +2 -2
- package/es/components/avatar/src/avatar.mjs +66 -32
- package/es/components/avatar/src/avatar.mjs.map +1 -1
- package/es/components/avatar/src/avatar2.mjs +32 -66
- package/es/components/avatar/src/avatar2.mjs.map +1 -1
- package/es/components/breadcrumb/index.mjs +4 -4
- package/es/components/breadcrumb/src/breadcrumb-item.mjs +57 -9
- package/es/components/breadcrumb/src/breadcrumb-item.mjs.map +1 -1
- package/es/components/breadcrumb/src/breadcrumb-item2.mjs +9 -57
- package/es/components/breadcrumb/src/breadcrumb-item2.mjs.map +1 -1
- package/es/components/breadcrumb/src/breadcrumb.mjs +38 -11
- package/es/components/breadcrumb/src/breadcrumb.mjs.map +1 -1
- package/es/components/breadcrumb/src/breadcrumb2.mjs +11 -38
- package/es/components/breadcrumb/src/breadcrumb2.mjs.map +1 -1
- package/es/components/check-tag/index.mjs +2 -2
- package/es/components/check-tag/src/check-tag.mjs +39 -15
- package/es/components/check-tag/src/check-tag.mjs.map +1 -1
- package/es/components/check-tag/src/check-tag2.mjs +15 -39
- package/es/components/check-tag/src/check-tag2.mjs.map +1 -1
- package/es/components/collapse/index.mjs +2 -2
- package/es/components/collapse/src/collapse-item.mjs +90 -19
- package/es/components/collapse/src/collapse-item.mjs.map +1 -1
- package/es/components/collapse/src/collapse-item2.mjs +19 -90
- package/es/components/collapse/src/collapse-item2.mjs.map +1 -1
- package/es/components/index.mjs +6 -6
- package/es/components/message-box/src/messageBox.mjs.map +1 -1
- package/es/components/timeline/index.mjs +2 -2
- package/es/components/timeline/src/timeline-item.mjs +73 -34
- package/es/components/timeline/src/timeline-item.mjs.map +1 -1
- package/es/components/timeline/src/timeline-item2.mjs +34 -73
- package/es/components/timeline/src/timeline-item2.mjs.map +1 -1
- package/es/index.mjs +6 -6
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/avatar/index.js +2 -2
- package/lib/components/avatar/src/avatar.js +66 -33
- package/lib/components/avatar/src/avatar.js.map +1 -1
- package/lib/components/avatar/src/avatar2.js +33 -66
- package/lib/components/avatar/src/avatar2.js.map +1 -1
- package/lib/components/breadcrumb/index.js +4 -4
- package/lib/components/breadcrumb/src/breadcrumb-item.js +57 -9
- package/lib/components/breadcrumb/src/breadcrumb-item.js.map +1 -1
- package/lib/components/breadcrumb/src/breadcrumb-item2.js +9 -57
- package/lib/components/breadcrumb/src/breadcrumb-item2.js.map +1 -1
- package/lib/components/breadcrumb/src/breadcrumb.js +38 -11
- package/lib/components/breadcrumb/src/breadcrumb.js.map +1 -1
- package/lib/components/breadcrumb/src/breadcrumb2.js +11 -38
- package/lib/components/breadcrumb/src/breadcrumb2.js.map +1 -1
- package/lib/components/check-tag/index.js +2 -2
- package/lib/components/check-tag/src/check-tag.js +39 -16
- package/lib/components/check-tag/src/check-tag.js.map +1 -1
- package/lib/components/check-tag/src/check-tag2.js +16 -39
- package/lib/components/check-tag/src/check-tag2.js.map +1 -1
- package/lib/components/collapse/index.js +2 -2
- package/lib/components/collapse/src/collapse-item.js +90 -19
- package/lib/components/collapse/src/collapse-item.js.map +1 -1
- package/lib/components/collapse/src/collapse-item2.js +19 -90
- package/lib/components/collapse/src/collapse-item2.js.map +1 -1
- package/lib/components/index.js +6 -6
- package/lib/components/message-box/src/messageBox.js.map +1 -1
- package/lib/components/timeline/index.js +2 -2
- package/lib/components/timeline/src/timeline-item.js +73 -34
- package/lib/components/timeline/src/timeline-item.js.map +1 -1
- package/lib/components/timeline/src/timeline-item2.js +34 -73
- package/lib/components/timeline/src/timeline-item2.js.map +1 -1
- package/lib/index.js +6 -6
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/web-types.json +1 -1
|
@@ -1,94 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { useCollapseItem, useCollapseItemDOM } from './use-collapse-item.mjs';
|
|
6
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
1
|
+
import '../../../utils/index.mjs';
|
|
2
|
+
import { ArrowRight } from '@element-plus/icons-vue';
|
|
3
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
4
|
+
import { iconPropType } from '../../../utils/vue/icon.mjs';
|
|
7
5
|
|
|
8
|
-
const
|
|
9
|
-
|
|
6
|
+
const collapseItemProps = buildProps({
|
|
7
|
+
title: {
|
|
8
|
+
type: String,
|
|
9
|
+
default: ""
|
|
10
|
+
},
|
|
11
|
+
name: {
|
|
12
|
+
type: definePropType([String, Number]),
|
|
13
|
+
default: void 0
|
|
14
|
+
},
|
|
15
|
+
icon: {
|
|
16
|
+
type: iconPropType,
|
|
17
|
+
default: ArrowRight
|
|
18
|
+
},
|
|
19
|
+
disabled: Boolean
|
|
10
20
|
});
|
|
11
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
12
|
-
...__default__,
|
|
13
|
-
props: collapseItemProps,
|
|
14
|
-
setup(__props, { expose }) {
|
|
15
|
-
const props = __props;
|
|
16
|
-
const {
|
|
17
|
-
focusing,
|
|
18
|
-
id,
|
|
19
|
-
isActive,
|
|
20
|
-
handleFocus,
|
|
21
|
-
handleHeaderClick,
|
|
22
|
-
handleEnterClick
|
|
23
|
-
} = useCollapseItem(props);
|
|
24
|
-
const {
|
|
25
|
-
arrowKls,
|
|
26
|
-
headKls,
|
|
27
|
-
rootKls,
|
|
28
|
-
itemWrapperKls,
|
|
29
|
-
itemContentKls,
|
|
30
|
-
scopedContentId,
|
|
31
|
-
scopedHeadId
|
|
32
|
-
} = useCollapseItemDOM(props, { focusing, isActive, id });
|
|
33
|
-
expose({
|
|
34
|
-
isActive
|
|
35
|
-
});
|
|
36
|
-
return (_ctx, _cache) => {
|
|
37
|
-
return openBlock(), createElementBlock("div", {
|
|
38
|
-
class: normalizeClass(unref(rootKls))
|
|
39
|
-
}, [
|
|
40
|
-
createElementVNode("button", {
|
|
41
|
-
id: unref(scopedHeadId),
|
|
42
|
-
class: normalizeClass(unref(headKls)),
|
|
43
|
-
"aria-expanded": unref(isActive),
|
|
44
|
-
"aria-controls": unref(scopedContentId),
|
|
45
|
-
"aria-describedby": unref(scopedContentId),
|
|
46
|
-
tabindex: _ctx.disabled ? -1 : 0,
|
|
47
|
-
type: "button",
|
|
48
|
-
onClick: unref(handleHeaderClick),
|
|
49
|
-
onKeydown: withKeys(withModifiers(unref(handleEnterClick), ["stop", "prevent"]), ["space", "enter"]),
|
|
50
|
-
onFocus: unref(handleFocus),
|
|
51
|
-
onBlur: ($event) => focusing.value = false
|
|
52
|
-
}, [
|
|
53
|
-
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
54
|
-
createTextVNode(toDisplayString(_ctx.title), 1)
|
|
55
|
-
]),
|
|
56
|
-
renderSlot(_ctx.$slots, "icon", { isActive: unref(isActive) }, () => [
|
|
57
|
-
createVNode(unref(ElIcon), {
|
|
58
|
-
class: normalizeClass(unref(arrowKls))
|
|
59
|
-
}, {
|
|
60
|
-
default: withCtx(() => [
|
|
61
|
-
(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon)))
|
|
62
|
-
]),
|
|
63
|
-
_: 1
|
|
64
|
-
}, 8, ["class"])
|
|
65
|
-
])
|
|
66
|
-
], 42, ["id", "aria-expanded", "aria-controls", "aria-describedby", "tabindex", "onClick", "onKeydown", "onFocus", "onBlur"]),
|
|
67
|
-
createVNode(unref(ElCollapseTransition), null, {
|
|
68
|
-
default: withCtx(() => [
|
|
69
|
-
withDirectives(createElementVNode("div", {
|
|
70
|
-
id: unref(scopedContentId),
|
|
71
|
-
role: "region",
|
|
72
|
-
class: normalizeClass(unref(itemWrapperKls)),
|
|
73
|
-
"aria-hidden": !unref(isActive),
|
|
74
|
-
"aria-labelledby": unref(scopedHeadId)
|
|
75
|
-
}, [
|
|
76
|
-
createElementVNode("div", {
|
|
77
|
-
class: normalizeClass(unref(itemContentKls))
|
|
78
|
-
}, [
|
|
79
|
-
renderSlot(_ctx.$slots, "default")
|
|
80
|
-
], 2)
|
|
81
|
-
], 10, ["id", "aria-hidden", "aria-labelledby"]), [
|
|
82
|
-
[vShow, unref(isActive)]
|
|
83
|
-
])
|
|
84
|
-
]),
|
|
85
|
-
_: 3
|
|
86
|
-
})
|
|
87
|
-
], 2);
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
var CollapseItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "collapse-item.vue"]]);
|
|
92
21
|
|
|
93
|
-
export {
|
|
22
|
+
export { collapseItemProps };
|
|
94
23
|
//# sourceMappingURL=collapse-item2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collapse-item2.mjs","sources":["../../../../../../packages/components/collapse/src/collapse-item.
|
|
1
|
+
{"version":3,"file":"collapse-item2.mjs","sources":["../../../../../../packages/components/collapse/src/collapse-item.ts"],"sourcesContent":["import { buildProps, definePropType, iconPropType } from '@element-plus/utils'\nimport { ArrowRight } from '@element-plus/icons-vue'\nimport type { ExtractPropTypes } from 'vue'\nimport type { CollapseActiveName } from './collapse'\n\nexport const collapseItemProps = buildProps({\n /**\n * @description title of the panel\n */\n title: {\n type: String,\n default: '',\n },\n /**\n * @description unique identification of the panel\n */\n name: {\n type: definePropType<CollapseActiveName>([String, Number]),\n default: undefined,\n },\n /**\n * @description icon of the collapse item\n */\n icon: {\n type: iconPropType,\n default: ArrowRight,\n },\n /**\n * @description disable the collapse item\n */\n disabled: Boolean,\n} as const)\nexport type CollapseItemProps = ExtractPropTypes<typeof collapseItemProps>\n"],"names":[],"mappings":";;;;;AAEY,MAAC,iBAAiB,GAAG,UAAU,CAAC;AAC5C,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,YAAY;AACtB,IAAI,OAAO,EAAE,UAAU;AACvB,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,CAAC;;;;"}
|
package/es/components/index.mjs
CHANGED
|
@@ -83,11 +83,11 @@ export { ElPopover, ElPopoverDirective } from './popover/index.mjs';
|
|
|
83
83
|
export { affixEmits, affixProps } from './affix/src/affix.mjs';
|
|
84
84
|
export { alertEffects, alertEmits, alertProps } from './alert/src/alert.mjs';
|
|
85
85
|
export { autocompleteEmits, autocompleteProps } from './autocomplete/src/autocomplete.mjs';
|
|
86
|
-
export { avatarEmits, avatarProps } from './avatar/src/
|
|
86
|
+
export { avatarEmits, avatarProps } from './avatar/src/avatar2.mjs';
|
|
87
87
|
export { backtopEmits, backtopProps } from './backtop/src/backtop.mjs';
|
|
88
88
|
export { badgeProps } from './badge/src/badge.mjs';
|
|
89
|
-
export { breadcrumbProps } from './breadcrumb/src/
|
|
90
|
-
export { breadcrumbItemProps } from './breadcrumb/src/breadcrumb-
|
|
89
|
+
export { breadcrumbProps } from './breadcrumb/src/breadcrumb2.mjs';
|
|
90
|
+
export { breadcrumbItemProps } from './breadcrumb/src/breadcrumb-item2.mjs';
|
|
91
91
|
export { breadcrumbKey } from './breadcrumb/src/constants.mjs';
|
|
92
92
|
export { buttonEmits, buttonNativeTypes, buttonProps, buttonTypes } from './button/src/button.mjs';
|
|
93
93
|
export { buttonGroupContextKey } from './button/src/constants.mjs';
|
|
@@ -99,13 +99,13 @@ export { CAROUSEL_ITEM_NAME, carouselContextKey } from './carousel/src/constants
|
|
|
99
99
|
export { cascaderEmits, cascaderProps } from './cascader/src/cascader.mjs';
|
|
100
100
|
export { CASCADER_PANEL_INJECTION_KEY } from './cascader-panel/src/types.mjs';
|
|
101
101
|
export { CommonProps, DefaultProps, useCascaderConfig } from './cascader-panel/src/config.mjs';
|
|
102
|
-
export { checkTagEmits, checkTagProps } from './check-tag/src/check-
|
|
102
|
+
export { checkTagEmits, checkTagProps } from './check-tag/src/check-tag2.mjs';
|
|
103
103
|
export { checkboxGroupEmits, checkboxGroupProps } from './checkbox/src/checkbox-group.mjs';
|
|
104
104
|
export { checkboxEmits, checkboxProps } from './checkbox/src/checkbox.mjs';
|
|
105
105
|
export { checkboxGroupContextKey } from './checkbox/src/constants.mjs';
|
|
106
106
|
export { colProps } from './col/src/col.mjs';
|
|
107
107
|
export { collapseEmits, collapseProps, emitChangeFn } from './collapse/src/collapse.mjs';
|
|
108
|
-
export { collapseItemProps } from './collapse/src/collapse-
|
|
108
|
+
export { collapseItemProps } from './collapse/src/collapse-item2.mjs';
|
|
109
109
|
export { collapseContextKey } from './collapse/src/constants.mjs';
|
|
110
110
|
export { colorPickerContextKey, colorPickerEmits, colorPickerProps } from './color-picker/src/color-picker.mjs';
|
|
111
111
|
export { messageConfig } from './config-provider/src/config-provider.mjs';
|
|
@@ -198,7 +198,7 @@ export { timePickerDefaultProps } from './time-picker/src/common/props.mjs';
|
|
|
198
198
|
export { default as CommonPicker } from './time-picker/src/common/picker.mjs';
|
|
199
199
|
export { default as TimePickPanel } from './time-picker/src/time-picker-com/panel-time-pick.mjs';
|
|
200
200
|
export { timeSelectProps } from './time-select/src/time-select.mjs';
|
|
201
|
-
export { timelineItemProps } from './timeline/src/timeline-
|
|
201
|
+
export { timelineItemProps } from './timeline/src/timeline-item2.mjs';
|
|
202
202
|
export { tooltipEmits, useTooltipModelToggle, useTooltipModelToggleEmits, useTooltipModelToggleProps, useTooltipProps } from './tooltip/src/tooltip.mjs';
|
|
203
203
|
export { useTooltipTriggerProps } from './tooltip/src/trigger.mjs';
|
|
204
204
|
export { useTooltipContentProps } from './tooltip/src/content.mjs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messageBox.mjs","sources":["../../../../../../packages/components/message-box/src/messageBox.ts"],"sourcesContent":["import { createVNode, render } from 'vue'\nimport {\n debugWarn,\n hasOwn,\n isClient,\n isElement,\n isFunction,\n isObject,\n isString,\n isUndefined,\n isVNode,\n} from '@element-plus/utils'\nimport MessageBoxConstructor from './index.vue'\n\nimport type { AppContext, ComponentPublicInstance, VNode } from 'vue'\nimport type {\n Action,\n Callback,\n ElMessageBoxOptions,\n ElMessageBoxShortcutMethod,\n IElMessageBox,\n MessageBoxData,\n MessageBoxState,\n} from './message-box.type'\n\n// component default merge props & data\n\nconst messageInstance = new Map<\n ComponentPublicInstance<{ doClose: () => void }>, // marking doClose as function\n {\n options: any\n callback: Callback | undefined\n resolve: (res: any) => void\n reject: (reason?: any) => void\n }\n>()\n\nconst getAppendToElement = (props: any): HTMLElement => {\n let appendTo: HTMLElement | null = document.body\n if (props.appendTo) {\n if (isString(props.appendTo)) {\n appendTo = document.querySelector<HTMLElement>(props.appendTo)\n }\n if (isElement(props.appendTo)) {\n appendTo = props.appendTo\n }\n\n // should fallback to default value with a warning\n if (!isElement(appendTo)) {\n debugWarn(\n 'ElMessageBox',\n 'the appendTo option is not an HTMLElement. Falling back to document.body.'\n )\n appendTo = document.body\n }\n }\n return appendTo\n}\n\nconst initInstance = (\n props: any,\n container: HTMLElement,\n appContext: AppContext | null = null\n) => {\n const vnode = createVNode(\n MessageBoxConstructor,\n props,\n isFunction(props.message) || isVNode(props.message)\n ? {\n default: isFunction(props.message)\n ? props.message\n : () => props.message,\n }\n : null\n )\n vnode.appContext = appContext\n render(vnode, container)\n getAppendToElement(props).appendChild(container.firstElementChild!)\n return vnode.component\n}\n\nconst genContainer = () => {\n return document.createElement('div')\n}\n\nconst showMessage = (options: any, appContext?: AppContext | null) => {\n const container = genContainer()\n // Adding destruct method.\n // when transition leaves emitting `vanish` evt. so that we can do the clean job.\n options.onVanish = () => {\n // not sure if this causes mem leak, need proof to verify that.\n // maybe calling out like 1000 msg-box then close them all.\n render(null, container)\n messageInstance.delete(vm) // Remove vm to avoid mem leak.\n // here we were suppose to call document.body.removeChild(container.firstElementChild)\n // but render(null, container) did that job for us. so that we do not call that directly\n }\n\n options.onAction = (action: Action) => {\n const currentMsg = messageInstance.get(vm)!\n let resolve: Action | { value: string; action: Action }\n if (options.showInput) {\n resolve = { value: vm.inputValue, action }\n } else {\n resolve = action\n }\n if (options.callback) {\n options.callback(resolve, instance.proxy)\n } else {\n if (action === 'cancel' || action === 'close') {\n if (options.distinguishCancelAndClose && action !== 'cancel') {\n currentMsg.reject('close')\n } else {\n currentMsg.reject('cancel')\n }\n } else {\n currentMsg.resolve(resolve)\n }\n }\n }\n\n const instance = initInstance(options, container, appContext)!\n\n // This is how we use message box programmably.\n // Maybe consider releasing a template version?\n // get component instance like v2.\n const vm = instance.proxy as ComponentPublicInstance<\n {\n visible: boolean\n doClose: () => void\n } & MessageBoxState\n >\n\n for (const prop in options) {\n if (hasOwn(options, prop) && !hasOwn(vm.$props, prop)) {\n vm[prop as keyof ComponentPublicInstance] = options[prop]\n }\n }\n\n // change visibility after everything is settled\n vm.visible = true\n return vm\n}\n\nasync function MessageBox(\n options: ElMessageBoxOptions,\n appContext?: AppContext | null\n): Promise<MessageBoxData>\nfunction MessageBox(\n options: ElMessageBoxOptions | string | VNode,\n appContext: AppContext | null = null\n): Promise<{ value: string; action: Action } | Action> {\n if (!isClient) return Promise.reject()\n let callback: Callback | undefined\n if (isString(options) || isVNode(options)) {\n options = {\n message: options,\n }\n } else {\n callback = options.callback\n }\n\n return new Promise((resolve, reject) => {\n const vm = showMessage(\n options,\n appContext ?? (MessageBox as IElMessageBox)._context\n )\n // collect this vm in order to handle upcoming events.\n messageInstance.set(vm, {\n options,\n callback,\n resolve,\n reject,\n })\n })\n}\n\nconst MESSAGE_BOX_VARIANTS = ['alert', 'confirm', 'prompt'] as const\nconst MESSAGE_BOX_DEFAULT_OPTS: Record<\n typeof MESSAGE_BOX_VARIANTS[number],\n Partial<ElMessageBoxOptions>\n> = {\n alert: { closeOnPressEscape: false, closeOnClickModal: false },\n confirm: { showCancelButton: true },\n prompt: { showCancelButton: true, showInput: true },\n}\n\nMESSAGE_BOX_VARIANTS.forEach((boxType) => {\n ;(MessageBox as IElMessageBox)[boxType] = messageBoxFactory(\n boxType\n ) as ElMessageBoxShortcutMethod\n})\n\nfunction messageBoxFactory(boxType: typeof MESSAGE_BOX_VARIANTS[number]) {\n return (\n message: string | VNode,\n title: string | ElMessageBoxOptions,\n options?: ElMessageBoxOptions,\n appContext?: AppContext | null\n ) => {\n let titleOrOpts = ''\n if (isObject(title)) {\n options = title as ElMessageBoxOptions\n titleOrOpts = ''\n } else if (isUndefined(title)) {\n titleOrOpts = ''\n } else {\n titleOrOpts = title as string\n }\n\n return MessageBox(\n Object.assign(\n {\n title: titleOrOpts,\n message,\n type: '',\n ...MESSAGE_BOX_DEFAULT_OPTS[boxType],\n },\n options,\n {\n boxType,\n }\n ),\n appContext\n )\n }\n}\n\nMessageBox.close = () => {\n // instance.setupInstall.doClose()\n // instance.setupInstall.state.visible = false\n\n messageInstance.forEach((_, vm) => {\n vm.doClose()\n })\n\n messageInstance.clear()\n}\n;(MessageBox as IElMessageBox)._context = null\n\nexport default MessageBox as IElMessageBox\n"],"names":[],"mappings":";;;;;;;;AAaA,MAAM,eAAe,mBAAmB,IAAI,GAAG,EAAE,CAAC;AAClD,MAAM,kBAAkB,GAAG,CAAC,KAAK,KAAK;AACtC,EAAE,IAAI,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC;AAC/B,EAAE,IAAI,KAAK,CAAC,QAAQ,EAAE;AACtB,IAAI,IAAI,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE;AAClC,MA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E,EAAE,KAAK;AACrC,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC;AACjB,GAAG,CAAC,CAAC;AACL,EAAE,eAAe,CAAC,KAAK,EAAE,CAAC;AAC1B,CAAC,CAAC;AACF,UAAU,CAAC,QAAQ,GAAG,IAAI;;;;"}
|
|
1
|
+
{"version":3,"file":"messageBox.mjs","sources":["../../../../../../packages/components/message-box/src/messageBox.ts"],"sourcesContent":["import { createVNode, render } from 'vue'\nimport {\n debugWarn,\n hasOwn,\n isClient,\n isElement,\n isFunction,\n isObject,\n isString,\n isUndefined,\n isVNode,\n} from '@element-plus/utils'\nimport MessageBoxConstructor from './index.vue'\n\nimport type { AppContext, ComponentPublicInstance, VNode } from 'vue'\nimport type {\n Action,\n Callback,\n ElMessageBoxOptions,\n ElMessageBoxShortcutMethod,\n IElMessageBox,\n MessageBoxData,\n MessageBoxState,\n} from './message-box.type'\n\n// component default merge props & data\n\nconst messageInstance = new Map<\n ComponentPublicInstance<{ doClose: () => void }>, // marking doClose as function\n {\n options: any\n callback: Callback | undefined\n resolve: (res: any) => void\n reject: (reason?: any) => void\n }\n>()\n\nconst getAppendToElement = (props: any): HTMLElement => {\n let appendTo: HTMLElement | null = document.body\n if (props.appendTo) {\n if (isString(props.appendTo)) {\n appendTo = document.querySelector<HTMLElement>(props.appendTo)\n }\n if (isElement(props.appendTo)) {\n appendTo = props.appendTo\n }\n\n // should fallback to default value with a warning\n if (!isElement(appendTo)) {\n debugWarn(\n 'ElMessageBox',\n 'the appendTo option is not an HTMLElement. Falling back to document.body.'\n )\n appendTo = document.body\n }\n }\n return appendTo\n}\n\nconst initInstance = (\n props: any,\n container: HTMLElement,\n appContext: AppContext | null = null\n) => {\n const vnode = createVNode(\n MessageBoxConstructor,\n props,\n isFunction(props.message) || isVNode(props.message)\n ? {\n default: isFunction(props.message)\n ? props.message\n : () => props.message,\n }\n : null\n )\n vnode.appContext = appContext\n render(vnode, container)\n getAppendToElement(props).appendChild(container.firstElementChild!)\n return vnode.component\n}\n\nconst genContainer = () => {\n return document.createElement('div')\n}\n\nconst showMessage = (options: any, appContext?: AppContext | null) => {\n const container = genContainer()\n // Adding destruct method.\n // when transition leaves emitting `vanish` evt. so that we can do the clean job.\n options.onVanish = () => {\n // not sure if this causes mem leak, need proof to verify that.\n // maybe calling out like 1000 msg-box then close them all.\n render(null, container)\n messageInstance.delete(vm) // Remove vm to avoid mem leak.\n // here we were suppose to call document.body.removeChild(container.firstElementChild)\n // but render(null, container) did that job for us. so that we do not call that directly\n }\n\n options.onAction = (action: Action) => {\n const currentMsg = messageInstance.get(vm)!\n let resolve: Action | { value: string; action: Action }\n if (options.showInput) {\n resolve = { value: vm.inputValue, action }\n } else {\n resolve = action\n }\n if (options.callback) {\n options.callback(resolve, instance.proxy)\n } else {\n if (action === 'cancel' || action === 'close') {\n if (options.distinguishCancelAndClose && action !== 'cancel') {\n currentMsg.reject('close')\n } else {\n currentMsg.reject('cancel')\n }\n } else {\n currentMsg.resolve(resolve)\n }\n }\n }\n\n const instance = initInstance(options, container, appContext)!\n\n // This is how we use message box programmatically.\n // Maybe consider releasing a template version?\n // get component instance like v2.\n const vm = instance.proxy as ComponentPublicInstance<\n {\n visible: boolean\n doClose: () => void\n } & MessageBoxState\n >\n\n for (const prop in options) {\n if (hasOwn(options, prop) && !hasOwn(vm.$props, prop)) {\n vm[prop as keyof ComponentPublicInstance] = options[prop]\n }\n }\n\n // change visibility after everything is settled\n vm.visible = true\n return vm\n}\n\nasync function MessageBox(\n options: ElMessageBoxOptions,\n appContext?: AppContext | null\n): Promise<MessageBoxData>\nfunction MessageBox(\n options: ElMessageBoxOptions | string | VNode,\n appContext: AppContext | null = null\n): Promise<{ value: string; action: Action } | Action> {\n if (!isClient) return Promise.reject()\n let callback: Callback | undefined\n if (isString(options) || isVNode(options)) {\n options = {\n message: options,\n }\n } else {\n callback = options.callback\n }\n\n return new Promise((resolve, reject) => {\n const vm = showMessage(\n options,\n appContext ?? (MessageBox as IElMessageBox)._context\n )\n // collect this vm in order to handle upcoming events.\n messageInstance.set(vm, {\n options,\n callback,\n resolve,\n reject,\n })\n })\n}\n\nconst MESSAGE_BOX_VARIANTS = ['alert', 'confirm', 'prompt'] as const\nconst MESSAGE_BOX_DEFAULT_OPTS: Record<\n typeof MESSAGE_BOX_VARIANTS[number],\n Partial<ElMessageBoxOptions>\n> = {\n alert: { closeOnPressEscape: false, closeOnClickModal: false },\n confirm: { showCancelButton: true },\n prompt: { showCancelButton: true, showInput: true },\n}\n\nMESSAGE_BOX_VARIANTS.forEach((boxType) => {\n ;(MessageBox as IElMessageBox)[boxType] = messageBoxFactory(\n boxType\n ) as ElMessageBoxShortcutMethod\n})\n\nfunction messageBoxFactory(boxType: typeof MESSAGE_BOX_VARIANTS[number]) {\n return (\n message: string | VNode,\n title: string | ElMessageBoxOptions,\n options?: ElMessageBoxOptions,\n appContext?: AppContext | null\n ) => {\n let titleOrOpts = ''\n if (isObject(title)) {\n options = title as ElMessageBoxOptions\n titleOrOpts = ''\n } else if (isUndefined(title)) {\n titleOrOpts = ''\n } else {\n titleOrOpts = title as string\n }\n\n return MessageBox(\n Object.assign(\n {\n title: titleOrOpts,\n message,\n type: '',\n ...MESSAGE_BOX_DEFAULT_OPTS[boxType],\n },\n options,\n {\n boxType,\n }\n ),\n appContext\n )\n }\n}\n\nMessageBox.close = () => {\n // instance.setupInstall.doClose()\n // instance.setupInstall.state.visible = false\n\n messageInstance.forEach((_, vm) => {\n vm.doClose()\n })\n\n messageInstance.clear()\n}\n;(MessageBox as IElMessageBox)._context = null\n\nexport default MessageBox as IElMessageBox\n"],"names":[],"mappings":";;;;;;;;AAaA,MAAM,eAAe,mBAAmB,IAAI,GAAG,EAAE,CAAC;AAClD,MAAM,kBAAkB,GAAG,CAAC,KAAK,KAAK;AACtC,EAAE,IAAI,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC;AAC/B,EAAE,IAAI,KAAK,CAAC,QAAQ,EAAE;AACtB,IAAI,IAAI,QAAQ,CA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AE,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,KAAK;AACrC,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC;AACjB,GAAG,CAAC,CAAC;AACL,EAAE,eAAe,CAAC,KAAK,EAAE,CAAC;AAC1B,CAAC,CAAC;AACF,UAAU,CAAC,QAAQ,GAAG,IAAI;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '../../utils/index.mjs';
|
|
2
2
|
import Timeline from './src/timeline.mjs';
|
|
3
|
-
import TimelineItem from './src/timeline-
|
|
4
|
-
export { timelineItemProps } from './src/timeline-
|
|
3
|
+
import TimelineItem from './src/timeline-item.mjs';
|
|
4
|
+
export { timelineItemProps } from './src/timeline-item2.mjs';
|
|
5
5
|
import { withInstall, withNoopInstall } from '../../utils/vue/install.mjs';
|
|
6
6
|
|
|
7
7
|
const ElTimeline = withInstall(Timeline, {
|
|
@@ -1,38 +1,77 @@
|
|
|
1
|
-
import '
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, normalizeStyle, createBlock, withCtx, resolveDynamicComponent, createCommentVNode, renderSlot, toDisplayString } from 'vue';
|
|
2
|
+
import { ElIcon } from '../../icon/index.mjs';
|
|
3
|
+
import '../../../hooks/index.mjs';
|
|
4
|
+
import { timelineItemProps } from './timeline-item2.mjs';
|
|
5
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
6
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
4
7
|
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
type: String,
|
|
8
|
-
default: ""
|
|
9
|
-
},
|
|
10
|
-
hideTimestamp: Boolean,
|
|
11
|
-
center: Boolean,
|
|
12
|
-
placement: {
|
|
13
|
-
type: String,
|
|
14
|
-
values: ["top", "bottom"],
|
|
15
|
-
default: "bottom"
|
|
16
|
-
},
|
|
17
|
-
type: {
|
|
18
|
-
type: String,
|
|
19
|
-
values: ["primary", "success", "warning", "danger", "info"],
|
|
20
|
-
default: ""
|
|
21
|
-
},
|
|
22
|
-
color: {
|
|
23
|
-
type: String,
|
|
24
|
-
default: ""
|
|
25
|
-
},
|
|
26
|
-
size: {
|
|
27
|
-
type: String,
|
|
28
|
-
values: ["normal", "large"],
|
|
29
|
-
default: "normal"
|
|
30
|
-
},
|
|
31
|
-
icon: {
|
|
32
|
-
type: iconPropType
|
|
33
|
-
},
|
|
34
|
-
hollow: Boolean
|
|
8
|
+
const __default__ = defineComponent({
|
|
9
|
+
name: "ElTimelineItem"
|
|
35
10
|
});
|
|
11
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
12
|
+
...__default__,
|
|
13
|
+
props: timelineItemProps,
|
|
14
|
+
setup(__props) {
|
|
15
|
+
const props = __props;
|
|
16
|
+
const ns = useNamespace("timeline-item");
|
|
17
|
+
const defaultNodeKls = computed(() => [
|
|
18
|
+
ns.e("node"),
|
|
19
|
+
ns.em("node", props.size || ""),
|
|
20
|
+
ns.em("node", props.type || ""),
|
|
21
|
+
ns.is("hollow", props.hollow)
|
|
22
|
+
]);
|
|
23
|
+
return (_ctx, _cache) => {
|
|
24
|
+
return openBlock(), createElementBlock("li", {
|
|
25
|
+
class: normalizeClass([unref(ns).b(), { [unref(ns).e("center")]: _ctx.center }])
|
|
26
|
+
}, [
|
|
27
|
+
createElementVNode("div", {
|
|
28
|
+
class: normalizeClass(unref(ns).e("tail"))
|
|
29
|
+
}, null, 2),
|
|
30
|
+
!_ctx.$slots.dot ? (openBlock(), createElementBlock("div", {
|
|
31
|
+
key: 0,
|
|
32
|
+
class: normalizeClass(unref(defaultNodeKls)),
|
|
33
|
+
style: normalizeStyle({
|
|
34
|
+
backgroundColor: _ctx.color
|
|
35
|
+
})
|
|
36
|
+
}, [
|
|
37
|
+
_ctx.icon ? (openBlock(), createBlock(unref(ElIcon), {
|
|
38
|
+
key: 0,
|
|
39
|
+
class: normalizeClass(unref(ns).e("icon"))
|
|
40
|
+
}, {
|
|
41
|
+
default: withCtx(() => [
|
|
42
|
+
(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon)))
|
|
43
|
+
]),
|
|
44
|
+
_: 1
|
|
45
|
+
}, 8, ["class"])) : createCommentVNode("v-if", true)
|
|
46
|
+
], 6)) : createCommentVNode("v-if", true),
|
|
47
|
+
_ctx.$slots.dot ? (openBlock(), createElementBlock("div", {
|
|
48
|
+
key: 1,
|
|
49
|
+
class: normalizeClass(unref(ns).e("dot"))
|
|
50
|
+
}, [
|
|
51
|
+
renderSlot(_ctx.$slots, "dot")
|
|
52
|
+
], 2)) : createCommentVNode("v-if", true),
|
|
53
|
+
createElementVNode("div", {
|
|
54
|
+
class: normalizeClass(unref(ns).e("wrapper"))
|
|
55
|
+
}, [
|
|
56
|
+
!_ctx.hideTimestamp && _ctx.placement === "top" ? (openBlock(), createElementBlock("div", {
|
|
57
|
+
key: 0,
|
|
58
|
+
class: normalizeClass([unref(ns).e("timestamp"), unref(ns).is("top")])
|
|
59
|
+
}, toDisplayString(_ctx.timestamp), 3)) : createCommentVNode("v-if", true),
|
|
60
|
+
createElementVNode("div", {
|
|
61
|
+
class: normalizeClass(unref(ns).e("content"))
|
|
62
|
+
}, [
|
|
63
|
+
renderSlot(_ctx.$slots, "default")
|
|
64
|
+
], 2),
|
|
65
|
+
!_ctx.hideTimestamp && _ctx.placement === "bottom" ? (openBlock(), createElementBlock("div", {
|
|
66
|
+
key: 1,
|
|
67
|
+
class: normalizeClass([unref(ns).e("timestamp"), unref(ns).is("bottom")])
|
|
68
|
+
}, toDisplayString(_ctx.timestamp), 3)) : createCommentVNode("v-if", true)
|
|
69
|
+
], 2)
|
|
70
|
+
], 2);
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
var TimelineItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "timeline-item.vue"]]);
|
|
36
75
|
|
|
37
|
-
export {
|
|
76
|
+
export { TimelineItem as default };
|
|
38
77
|
//# sourceMappingURL=timeline-item.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timeline-item.mjs","sources":["../../../../../../packages/components/timeline/src/timeline-item.
|
|
1
|
+
{"version":3,"file":"timeline-item.mjs","sources":["../../../../../../packages/components/timeline/src/timeline-item.vue"],"sourcesContent":["<template>\n <li :class=\"[ns.b(), { [ns.e('center')]: center }]\">\n <div :class=\"ns.e('tail')\" />\n <div\n v-if=\"!$slots.dot\"\n :class=\"defaultNodeKls\"\n :style=\"{\n backgroundColor: color,\n }\"\n >\n <el-icon v-if=\"icon\" :class=\"ns.e('icon')\">\n <component :is=\"icon\" />\n </el-icon>\n </div>\n <div v-if=\"$slots.dot\" :class=\"ns.e('dot')\">\n <slot name=\"dot\" />\n </div>\n\n <div :class=\"ns.e('wrapper')\">\n <div\n v-if=\"!hideTimestamp && placement === 'top'\"\n :class=\"[ns.e('timestamp'), ns.is('top')]\"\n >\n {{ timestamp }}\n </div>\n\n <div :class=\"ns.e('content')\">\n <slot />\n </div>\n\n <div\n v-if=\"!hideTimestamp && placement === 'bottom'\"\n :class=\"[ns.e('timestamp'), ns.is('bottom')]\"\n >\n {{ timestamp }}\n </div>\n </div>\n </li>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { useNamespace } from '@element-plus/hooks'\nimport { timelineItemProps } from './timeline-item'\n\ndefineOptions({\n name: 'ElTimelineItem',\n})\n\nconst props = defineProps(timelineItemProps)\n\nconst ns = useNamespace('timeline-item')\nconst defaultNodeKls = computed(() => [\n ns.e('node'),\n ns.em('node', props.size || ''),\n ns.em('node', props.type || ''),\n ns.is('hollow', props.hollow),\n])\n</script>\n"],"names":[],"mappings":";;;;;;;mCA8Cc,CAAA;AAAA,EACZ,IAAM,EAAA,gBAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAIA,IAAM,MAAA,EAAA,GAAK,aAAa,eAAe,CAAA,CAAA;AACvC,IAAM,MAAA,cAAA,GAAiB,SAAS,MAAM;AAAA,MACpC,EAAA,CAAG,EAAE,MAAM,CAAA;AAAA,MACX,EAAG,CAAA,EAAA,CAAG,MAAQ,EAAA,KAAA,CAAM,QAAQ,EAAE,CAAA;AAAA,MAC9B,EAAG,CAAA,EAAA,CAAG,MAAQ,EAAA,KAAA,CAAM,QAAQ,EAAE,CAAA;AAAA,MAC9B,EAAG,CAAA,EAAA,CAAG,QAAU,EAAA,KAAA,CAAM,MAAM,CAAA;AAAA,KAC7B,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,77 +1,38 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import '../../../
|
|
4
|
-
import { timelineItemProps } from './timeline-item.mjs';
|
|
5
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
6
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
1
|
+
import '../../../utils/index.mjs';
|
|
2
|
+
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
|
3
|
+
import { iconPropType } from '../../../utils/vue/icon.mjs';
|
|
7
4
|
|
|
8
|
-
const
|
|
9
|
-
|
|
5
|
+
const timelineItemProps = buildProps({
|
|
6
|
+
timestamp: {
|
|
7
|
+
type: String,
|
|
8
|
+
default: ""
|
|
9
|
+
},
|
|
10
|
+
hideTimestamp: Boolean,
|
|
11
|
+
center: Boolean,
|
|
12
|
+
placement: {
|
|
13
|
+
type: String,
|
|
14
|
+
values: ["top", "bottom"],
|
|
15
|
+
default: "bottom"
|
|
16
|
+
},
|
|
17
|
+
type: {
|
|
18
|
+
type: String,
|
|
19
|
+
values: ["primary", "success", "warning", "danger", "info"],
|
|
20
|
+
default: ""
|
|
21
|
+
},
|
|
22
|
+
color: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: ""
|
|
25
|
+
},
|
|
26
|
+
size: {
|
|
27
|
+
type: String,
|
|
28
|
+
values: ["normal", "large"],
|
|
29
|
+
default: "normal"
|
|
30
|
+
},
|
|
31
|
+
icon: {
|
|
32
|
+
type: iconPropType
|
|
33
|
+
},
|
|
34
|
+
hollow: Boolean
|
|
10
35
|
});
|
|
11
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
12
|
-
...__default__,
|
|
13
|
-
props: timelineItemProps,
|
|
14
|
-
setup(__props) {
|
|
15
|
-
const props = __props;
|
|
16
|
-
const ns = useNamespace("timeline-item");
|
|
17
|
-
const defaultNodeKls = computed(() => [
|
|
18
|
-
ns.e("node"),
|
|
19
|
-
ns.em("node", props.size || ""),
|
|
20
|
-
ns.em("node", props.type || ""),
|
|
21
|
-
ns.is("hollow", props.hollow)
|
|
22
|
-
]);
|
|
23
|
-
return (_ctx, _cache) => {
|
|
24
|
-
return openBlock(), createElementBlock("li", {
|
|
25
|
-
class: normalizeClass([unref(ns).b(), { [unref(ns).e("center")]: _ctx.center }])
|
|
26
|
-
}, [
|
|
27
|
-
createElementVNode("div", {
|
|
28
|
-
class: normalizeClass(unref(ns).e("tail"))
|
|
29
|
-
}, null, 2),
|
|
30
|
-
!_ctx.$slots.dot ? (openBlock(), createElementBlock("div", {
|
|
31
|
-
key: 0,
|
|
32
|
-
class: normalizeClass(unref(defaultNodeKls)),
|
|
33
|
-
style: normalizeStyle({
|
|
34
|
-
backgroundColor: _ctx.color
|
|
35
|
-
})
|
|
36
|
-
}, [
|
|
37
|
-
_ctx.icon ? (openBlock(), createBlock(unref(ElIcon), {
|
|
38
|
-
key: 0,
|
|
39
|
-
class: normalizeClass(unref(ns).e("icon"))
|
|
40
|
-
}, {
|
|
41
|
-
default: withCtx(() => [
|
|
42
|
-
(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon)))
|
|
43
|
-
]),
|
|
44
|
-
_: 1
|
|
45
|
-
}, 8, ["class"])) : createCommentVNode("v-if", true)
|
|
46
|
-
], 6)) : createCommentVNode("v-if", true),
|
|
47
|
-
_ctx.$slots.dot ? (openBlock(), createElementBlock("div", {
|
|
48
|
-
key: 1,
|
|
49
|
-
class: normalizeClass(unref(ns).e("dot"))
|
|
50
|
-
}, [
|
|
51
|
-
renderSlot(_ctx.$slots, "dot")
|
|
52
|
-
], 2)) : createCommentVNode("v-if", true),
|
|
53
|
-
createElementVNode("div", {
|
|
54
|
-
class: normalizeClass(unref(ns).e("wrapper"))
|
|
55
|
-
}, [
|
|
56
|
-
!_ctx.hideTimestamp && _ctx.placement === "top" ? (openBlock(), createElementBlock("div", {
|
|
57
|
-
key: 0,
|
|
58
|
-
class: normalizeClass([unref(ns).e("timestamp"), unref(ns).is("top")])
|
|
59
|
-
}, toDisplayString(_ctx.timestamp), 3)) : createCommentVNode("v-if", true),
|
|
60
|
-
createElementVNode("div", {
|
|
61
|
-
class: normalizeClass(unref(ns).e("content"))
|
|
62
|
-
}, [
|
|
63
|
-
renderSlot(_ctx.$slots, "default")
|
|
64
|
-
], 2),
|
|
65
|
-
!_ctx.hideTimestamp && _ctx.placement === "bottom" ? (openBlock(), createElementBlock("div", {
|
|
66
|
-
key: 1,
|
|
67
|
-
class: normalizeClass([unref(ns).e("timestamp"), unref(ns).is("bottom")])
|
|
68
|
-
}, toDisplayString(_ctx.timestamp), 3)) : createCommentVNode("v-if", true)
|
|
69
|
-
], 2)
|
|
70
|
-
], 2);
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
var TimelineItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "timeline-item.vue"]]);
|
|
75
36
|
|
|
76
|
-
export {
|
|
37
|
+
export { timelineItemProps };
|
|
77
38
|
//# sourceMappingURL=timeline-item2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timeline-item2.mjs","sources":["../../../../../../packages/components/timeline/src/timeline-item.
|
|
1
|
+
{"version":3,"file":"timeline-item2.mjs","sources":["../../../../../../packages/components/timeline/src/timeline-item.ts"],"sourcesContent":["import { buildProps, iconPropType } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type TimelineItem from './timeline-item.vue'\n\nexport const timelineItemProps = buildProps({\n /**\n * @description timestamp content\n */\n timestamp: {\n type: String,\n default: '',\n },\n /**\n * @description whether to show timestamp\n */\n hideTimestamp: Boolean,\n /**\n * @description whether vertically centered\n */\n center: Boolean,\n /**\n * @description position of timestamp\n */\n placement: {\n type: String,\n values: ['top', 'bottom'],\n default: 'bottom',\n },\n /**\n * @description node type\n */\n type: {\n type: String,\n values: ['primary', 'success', 'warning', 'danger', 'info'],\n default: '',\n },\n /**\n * @description background color of node\n */\n color: {\n type: String,\n default: '',\n },\n /**\n * @description node size\n */\n size: {\n type: String,\n values: ['normal', 'large'],\n default: 'normal',\n },\n /**\n * @description icon component\n */\n icon: {\n type: iconPropType,\n },\n /**\n * @description icon is hollow\n */\n hollow: Boolean,\n} as const)\nexport type TimelineItemProps = ExtractPropTypes<typeof timelineItemProps>\n\nexport type TimelineItemInstance = InstanceType<typeof TimelineItem>\n"],"names":[],"mappings":";;;;AACY,MAAC,iBAAiB,GAAG,UAAU,CAAC;AAC5C,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,aAAa,EAAE,OAAO;AACxB,EAAE,MAAM,EAAE,OAAO;AACjB,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC;AAC7B,IAAI,OAAO,EAAE,QAAQ;AACrB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,CAAC;AAC/D,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC;AAC/B,IAAI,OAAO,EAAE,QAAQ;AACrB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,YAAY;AACtB,GAAG;AACH,EAAE,MAAM,EAAE,OAAO;AACjB,CAAC;;;;"}
|
package/es/index.mjs
CHANGED
|
@@ -12,14 +12,14 @@ export { alertEffects, alertEmits, alertProps } from './components/alert/src/ale
|
|
|
12
12
|
export { ElAlert } from './components/alert/index.mjs';
|
|
13
13
|
export { autocompleteEmits, autocompleteProps } from './components/autocomplete/src/autocomplete.mjs';
|
|
14
14
|
export { ElAutocomplete } from './components/autocomplete/index.mjs';
|
|
15
|
-
export { avatarEmits, avatarProps } from './components/avatar/src/
|
|
15
|
+
export { avatarEmits, avatarProps } from './components/avatar/src/avatar2.mjs';
|
|
16
16
|
export { ElAvatar } from './components/avatar/index.mjs';
|
|
17
17
|
export { backtopEmits, backtopProps } from './components/backtop/src/backtop.mjs';
|
|
18
18
|
export { ElBacktop } from './components/backtop/index.mjs';
|
|
19
19
|
export { badgeProps } from './components/badge/src/badge.mjs';
|
|
20
20
|
export { ElBadge } from './components/badge/index.mjs';
|
|
21
|
-
export { breadcrumbProps } from './components/breadcrumb/src/
|
|
22
|
-
export { breadcrumbItemProps } from './components/breadcrumb/src/breadcrumb-
|
|
21
|
+
export { breadcrumbProps } from './components/breadcrumb/src/breadcrumb2.mjs';
|
|
22
|
+
export { breadcrumbItemProps } from './components/breadcrumb/src/breadcrumb-item2.mjs';
|
|
23
23
|
export { breadcrumbKey } from './components/breadcrumb/src/constants.mjs';
|
|
24
24
|
export { ElBreadcrumb, ElBreadcrumbItem } from './components/breadcrumb/index.mjs';
|
|
25
25
|
export { buttonEmits, buttonNativeTypes, buttonProps, buttonTypes } from './components/button/src/button.mjs';
|
|
@@ -38,7 +38,7 @@ export { ElCascader } from './components/cascader/index.mjs';
|
|
|
38
38
|
export { CASCADER_PANEL_INJECTION_KEY } from './components/cascader-panel/src/types.mjs';
|
|
39
39
|
export { CommonProps, DefaultProps, useCascaderConfig } from './components/cascader-panel/src/config.mjs';
|
|
40
40
|
export { ElCascaderPanel } from './components/cascader-panel/index.mjs';
|
|
41
|
-
export { checkTagEmits, checkTagProps } from './components/check-tag/src/check-
|
|
41
|
+
export { checkTagEmits, checkTagProps } from './components/check-tag/src/check-tag2.mjs';
|
|
42
42
|
export { ElCheckTag } from './components/check-tag/index.mjs';
|
|
43
43
|
export { checkboxGroupEmits, checkboxGroupProps } from './components/checkbox/src/checkbox-group.mjs';
|
|
44
44
|
export { checkboxEmits, checkboxProps } from './components/checkbox/src/checkbox.mjs';
|
|
@@ -47,7 +47,7 @@ export { ElCheckbox, ElCheckboxButton, ElCheckboxGroup } from './components/chec
|
|
|
47
47
|
export { colProps } from './components/col/src/col.mjs';
|
|
48
48
|
export { ElCol } from './components/col/index.mjs';
|
|
49
49
|
export { collapseEmits, collapseProps, emitChangeFn } from './components/collapse/src/collapse.mjs';
|
|
50
|
-
export { collapseItemProps } from './components/collapse/src/collapse-
|
|
50
|
+
export { collapseItemProps } from './components/collapse/src/collapse-item2.mjs';
|
|
51
51
|
export { collapseContextKey } from './components/collapse/src/constants.mjs';
|
|
52
52
|
export { ElCollapse, ElCollapseItem } from './components/collapse/index.mjs';
|
|
53
53
|
export { ElCollapseTransition } from './components/collapse-transition/index.mjs';
|
|
@@ -187,7 +187,7 @@ export { default as CommonPicker } from './components/time-picker/src/common/pic
|
|
|
187
187
|
export { default as TimePickPanel } from './components/time-picker/src/time-picker-com/panel-time-pick.mjs';
|
|
188
188
|
export { timeSelectProps } from './components/time-select/src/time-select.mjs';
|
|
189
189
|
export { ElTimeSelect } from './components/time-select/index.mjs';
|
|
190
|
-
export { timelineItemProps } from './components/timeline/src/timeline-
|
|
190
|
+
export { timelineItemProps } from './components/timeline/src/timeline-item2.mjs';
|
|
191
191
|
export { ElTimeline, ElTimelineItem } from './components/timeline/index.mjs';
|
|
192
192
|
export { tooltipEmits, useTooltipModelToggle, useTooltipModelToggleEmits, useTooltipModelToggleProps, useTooltipProps } from './components/tooltip/src/tooltip.mjs';
|
|
193
193
|
export { useTooltipTriggerProps } from './components/tooltip/src/trigger.mjs';
|
package/es/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "0.0.
|
|
1
|
+
export declare const version = "0.0.20241022";
|
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.20241022'\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
require('../../utils/index.js');
|
|
6
|
-
var avatar$1 = require('./src/
|
|
7
|
-
var avatar = require('./src/
|
|
6
|
+
var avatar$1 = require('./src/avatar.js');
|
|
7
|
+
var avatar = require('./src/avatar2.js');
|
|
8
8
|
var install = require('../../utils/vue/install.js');
|
|
9
9
|
|
|
10
10
|
const ElAvatar = install.withInstall(avatar$1["default"]);
|