@element-plus/nightly 0.0.20240413 → 0.0.20240414
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/button/index.mjs +2 -2
- package/es/components/button/src/button-group.mjs +1 -1
- package/es/components/button/src/button.mjs +57 -77
- package/es/components/button/src/button.mjs.map +1 -1
- package/es/components/button/src/button2.mjs +77 -57
- package/es/components/button/src/button2.mjs.map +1 -1
- package/es/components/index.mjs +7 -7
- package/es/components/popconfirm/index.mjs +2 -2
- package/es/components/popconfirm/src/popconfirm.mjs +47 -110
- package/es/components/popconfirm/src/popconfirm.mjs.map +1 -1
- package/es/components/popconfirm/src/popconfirm2.mjs +110 -47
- package/es/components/popconfirm/src/popconfirm2.mjs.map +1 -1
- package/es/components/popper/index.mjs +2 -2
- package/es/components/popper/src/popper.mjs +25 -32
- package/es/components/popper/src/popper.mjs.map +1 -1
- package/es/components/popper/src/popper2.mjs +32 -25
- package/es/components/popper/src/popper2.mjs.map +1 -1
- package/es/components/radio/index.mjs +2 -2
- package/es/components/radio/src/radio-button.mjs +6 -67
- package/es/components/radio/src/radio-button.mjs.map +1 -1
- package/es/components/radio/src/radio-button2.mjs +67 -6
- package/es/components/radio/src/radio-button2.mjs.map +1 -1
- package/es/components/skeleton/index.mjs +2 -2
- package/es/components/skeleton/src/skeleton.mjs +49 -22
- package/es/components/skeleton/src/skeleton.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton2.mjs +22 -49
- package/es/components/skeleton/src/skeleton2.mjs.map +1 -1
- package/es/components/tooltip/src/tooltip.mjs +1 -1
- package/es/components/tour/index.mjs +2 -2
- package/es/components/tour/src/tour.mjs +69 -152
- package/es/components/tour/src/tour.mjs.map +1 -1
- package/es/components/tour/src/tour2.mjs +152 -69
- package/es/components/tour/src/tour2.mjs.map +1 -1
- package/es/components/transfer/index.mjs +2 -2
- package/es/components/transfer/src/composables/use-checked-change.mjs +1 -1
- package/es/components/transfer/src/transfer-panel.mjs +1 -1
- package/es/components/transfer/src/transfer.mjs +160 -69
- package/es/components/transfer/src/transfer.mjs.map +1 -1
- package/es/components/transfer/src/transfer2.mjs +69 -160
- package/es/components/transfer/src/transfer2.mjs.map +1 -1
- package/es/index.mjs +7 -7
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/button/index.js +2 -2
- package/lib/components/button/src/button-group.js +1 -1
- package/lib/components/button/src/button.js +60 -77
- package/lib/components/button/src/button.js.map +1 -1
- package/lib/components/button/src/button2.js +77 -60
- package/lib/components/button/src/button2.js.map +1 -1
- package/lib/components/index.js +7 -7
- package/lib/components/popconfirm/index.js +2 -2
- package/lib/components/popconfirm/src/popconfirm.js +48 -110
- package/lib/components/popconfirm/src/popconfirm.js.map +1 -1
- package/lib/components/popconfirm/src/popconfirm2.js +110 -48
- package/lib/components/popconfirm/src/popconfirm2.js.map +1 -1
- package/lib/components/popper/index.js +2 -2
- package/lib/components/popper/src/popper.js +28 -32
- package/lib/components/popper/src/popper.js.map +1 -1
- package/lib/components/popper/src/popper2.js +32 -28
- package/lib/components/popper/src/popper2.js.map +1 -1
- package/lib/components/radio/index.js +2 -2
- package/lib/components/radio/src/radio-button.js +6 -67
- package/lib/components/radio/src/radio-button.js.map +1 -1
- package/lib/components/radio/src/radio-button2.js +67 -6
- package/lib/components/radio/src/radio-button2.js.map +1 -1
- package/lib/components/skeleton/index.js +2 -2
- package/lib/components/skeleton/src/skeleton.js +49 -22
- package/lib/components/skeleton/src/skeleton.js.map +1 -1
- package/lib/components/skeleton/src/skeleton2.js +22 -49
- package/lib/components/skeleton/src/skeleton2.js.map +1 -1
- package/lib/components/tooltip/src/tooltip.js +1 -1
- package/lib/components/tour/index.js +2 -2
- package/lib/components/tour/src/tour.js +69 -151
- package/lib/components/tour/src/tour.js.map +1 -1
- package/lib/components/tour/src/tour2.js +151 -69
- package/lib/components/tour/src/tour2.js.map +1 -1
- package/lib/components/transfer/index.js +2 -2
- package/lib/components/transfer/src/composables/use-checked-change.js +1 -1
- package/lib/components/transfer/src/transfer-panel.js +1 -1
- package/lib/components/transfer/src/transfer.js +160 -73
- package/lib/components/transfer/src/transfer.js.map +1 -1
- package/lib/components/transfer/src/transfer2.js +73 -160
- package/lib/components/transfer/src/transfer2.js.map +1 -1
- package/lib/index.js +7 -7
- 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,83 +1,63 @@
|
|
|
1
|
-
import { defineComponent, computed, openBlock, createBlock, resolveDynamicComponent, mergeProps, unref, withCtx, createElementBlock, Fragment, renderSlot, normalizeClass, createCommentVNode } from 'vue';
|
|
2
|
-
import { ElIcon } from '../../icon/index.mjs';
|
|
3
1
|
import '../../../hooks/index.mjs';
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
2
|
+
import '../../../utils/index.mjs';
|
|
3
|
+
import { Loading } from '@element-plus/icons-vue';
|
|
4
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
5
|
+
import { useSizeProp } from '../../../hooks/use-size/index.mjs';
|
|
6
|
+
import { iconPropType } from '../../../utils/vue/icon.mjs';
|
|
9
7
|
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
(openBlock(), createBlock(resolveDynamicComponent(_ctx.loadingIcon)))
|
|
59
|
-
]),
|
|
60
|
-
_: 1
|
|
61
|
-
}, 8, ["class"]))
|
|
62
|
-
], 64)) : _ctx.icon || _ctx.$slots.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 1 }, {
|
|
63
|
-
default: withCtx(() => [
|
|
64
|
-
_ctx.icon ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon), { key: 0 })) : renderSlot(_ctx.$slots, "icon", { key: 1 })
|
|
65
|
-
]),
|
|
66
|
-
_: 3
|
|
67
|
-
})) : createCommentVNode("v-if", true),
|
|
68
|
-
_ctx.$slots.default ? (openBlock(), createElementBlock("span", {
|
|
69
|
-
key: 2,
|
|
70
|
-
class: normalizeClass({ [unref(ns).em("text", "expand")]: unref(shouldAddSpace) })
|
|
71
|
-
}, [
|
|
72
|
-
renderSlot(_ctx.$slots, "default")
|
|
73
|
-
], 2)) : createCommentVNode("v-if", true)
|
|
74
|
-
]),
|
|
75
|
-
_: 3
|
|
76
|
-
}, 16, ["class", "style", "onClick"]);
|
|
77
|
-
};
|
|
8
|
+
const buttonTypes = [
|
|
9
|
+
"default",
|
|
10
|
+
"primary",
|
|
11
|
+
"success",
|
|
12
|
+
"warning",
|
|
13
|
+
"info",
|
|
14
|
+
"danger",
|
|
15
|
+
"text",
|
|
16
|
+
""
|
|
17
|
+
];
|
|
18
|
+
const buttonNativeTypes = ["button", "submit", "reset"];
|
|
19
|
+
const buttonProps = buildProps({
|
|
20
|
+
size: useSizeProp,
|
|
21
|
+
disabled: Boolean,
|
|
22
|
+
type: {
|
|
23
|
+
type: String,
|
|
24
|
+
values: buttonTypes,
|
|
25
|
+
default: ""
|
|
26
|
+
},
|
|
27
|
+
icon: {
|
|
28
|
+
type: iconPropType
|
|
29
|
+
},
|
|
30
|
+
nativeType: {
|
|
31
|
+
type: String,
|
|
32
|
+
values: buttonNativeTypes,
|
|
33
|
+
default: "button"
|
|
34
|
+
},
|
|
35
|
+
loading: Boolean,
|
|
36
|
+
loadingIcon: {
|
|
37
|
+
type: iconPropType,
|
|
38
|
+
default: () => Loading
|
|
39
|
+
},
|
|
40
|
+
plain: Boolean,
|
|
41
|
+
text: Boolean,
|
|
42
|
+
link: Boolean,
|
|
43
|
+
bg: Boolean,
|
|
44
|
+
autofocus: Boolean,
|
|
45
|
+
round: Boolean,
|
|
46
|
+
circle: Boolean,
|
|
47
|
+
color: String,
|
|
48
|
+
dark: Boolean,
|
|
49
|
+
autoInsertSpace: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
default: void 0
|
|
52
|
+
},
|
|
53
|
+
tag: {
|
|
54
|
+
type: definePropType([String, Object]),
|
|
55
|
+
default: "button"
|
|
78
56
|
}
|
|
79
57
|
});
|
|
80
|
-
|
|
58
|
+
const buttonEmits = {
|
|
59
|
+
click: (evt) => evt instanceof MouseEvent
|
|
60
|
+
};
|
|
81
61
|
|
|
82
|
-
export {
|
|
62
|
+
export { buttonEmits, buttonNativeTypes, buttonProps, buttonTypes };
|
|
83
63
|
//# sourceMappingURL=button.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.mjs","sources":["../../../../../../packages/components/button/src/button.
|
|
1
|
+
{"version":3,"file":"button.mjs","sources":["../../../../../../packages/components/button/src/button.ts"],"sourcesContent":["import { useSizeProp } from '@element-plus/hooks'\nimport { buildProps, definePropType, iconPropType } from '@element-plus/utils'\nimport { Loading } from '@element-plus/icons-vue'\nimport type { Component, ExtractPropTypes } from 'vue'\n\nexport const buttonTypes = [\n 'default',\n 'primary',\n 'success',\n 'warning',\n 'info',\n 'danger',\n /**\n * @deprecated\n * Text type will be deprecated in the next major version (3.0.0)\n */\n 'text',\n '',\n] as const\nexport const buttonNativeTypes = ['button', 'submit', 'reset'] as const\n\nexport const buttonProps = buildProps({\n /**\n * @description button size\n */\n size: useSizeProp,\n /**\n * @description disable the button\n */\n disabled: Boolean,\n /**\n * @description button type\n */\n type: {\n type: String,\n values: buttonTypes,\n default: '',\n },\n /**\n * @description icon component\n */\n icon: {\n type: iconPropType,\n },\n /**\n * @description native button type\n */\n nativeType: {\n type: String,\n values: buttonNativeTypes,\n default: 'button',\n },\n /**\n * @description determine whether it's loading\n */\n loading: Boolean,\n /**\n * @description customize loading icon component\n */\n loadingIcon: {\n type: iconPropType,\n default: () => Loading,\n },\n /**\n * @description determine whether it's a plain button\n */\n plain: Boolean,\n /**\n * @description determine whether it's a text button\n */\n text: Boolean,\n /**\n * @description determine whether it's a link button\n */\n link: Boolean,\n /**\n * @description determine whether the text button background color is always on\n */\n bg: Boolean,\n /**\n * @description native button autofocus\n */\n autofocus: Boolean,\n /**\n * @description determine whether it's a round button\n */\n round: Boolean,\n /**\n * @description determine whether it's a circle button\n */\n circle: Boolean,\n /**\n * @description custom button color, automatically calculate `hover` and `active` color\n */\n color: String,\n /**\n * @description dark mode, which automatically converts `color` to dark mode colors\n */\n dark: Boolean,\n /**\n * @description automatically insert a space between two chinese characters\n */\n autoInsertSpace: {\n type: Boolean,\n default: undefined,\n },\n /**\n * @description custom element tag\n */\n tag: {\n type: definePropType<string | Component>([String, Object]),\n default: 'button',\n },\n} as const)\nexport const buttonEmits = {\n click: (evt: MouseEvent) => evt instanceof MouseEvent,\n}\n\nexport type ButtonProps = ExtractPropTypes<typeof buttonProps>\nexport type ButtonEmits = typeof buttonEmits\n\nexport type ButtonType = ButtonProps['type']\nexport type ButtonNativeType = ButtonProps['nativeType']\n\nexport interface ButtonConfigContext {\n autoInsertSpace?: boolean\n}\n"],"names":[],"mappings":";;;;;;;AAGY,MAAC,WAAW,GAAG;AAC3B,EAAE,SAAS;AACX,EAAE,SAAS;AACX,EAAE,SAAS;AACX,EAAE,SAAS;AACX,EAAE,MAAM;AACR,EAAE,QAAQ;AACV,EAAE,MAAM;AACR,EAAE,EAAE;AACJ,EAAE;AACU,MAAC,iBAAiB,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE;AACnD,MAAC,WAAW,GAAG,UAAU,CAAC;AACtC,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,WAAW;AACvB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,YAAY;AACtB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,iBAAiB;AAC7B,IAAI,OAAO,EAAE,QAAQ;AACrB,GAAG;AACH,EAAE,OAAO,EAAE,OAAO;AAClB,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,YAAY;AACtB,IAAI,OAAO,EAAE,MAAM,OAAO;AAC1B,GAAG;AACH,EAAE,KAAK,EAAE,OAAO;AAChB,EAAE,IAAI,EAAE,OAAO;AACf,EAAE,IAAI,EAAE,OAAO;AACf,EAAE,EAAE,EAAE,OAAO;AACb,EAAE,SAAS,EAAE,OAAO;AACpB,EAAE,KAAK,EAAE,OAAO;AAChB,EAAE,MAAM,EAAE,OAAO;AACjB,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,IAAI,EAAE,OAAO;AACf,EAAE,eAAe,EAAE;AACnB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,QAAQ;AACrB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,WAAW,GAAG;AAC3B,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,GAAG,YAAY,UAAU;AAC3C;;;;"}
|
|
@@ -1,63 +1,83 @@
|
|
|
1
|
+
import { defineComponent, computed, openBlock, createBlock, resolveDynamicComponent, mergeProps, unref, withCtx, createElementBlock, Fragment, renderSlot, normalizeClass, createCommentVNode } from 'vue';
|
|
2
|
+
import { ElIcon } from '../../icon/index.mjs';
|
|
1
3
|
import '../../../hooks/index.mjs';
|
|
2
|
-
import '
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
4
|
+
import { useButton } from './use-button.mjs';
|
|
5
|
+
import { buttonProps, buttonEmits } from './button.mjs';
|
|
6
|
+
import { useButtonCustomStyle } from './button-custom.mjs';
|
|
7
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
8
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
7
9
|
|
|
8
|
-
const
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
10
|
+
const __default__ = defineComponent({
|
|
11
|
+
name: "ElButton"
|
|
12
|
+
});
|
|
13
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
14
|
+
...__default__,
|
|
15
|
+
props: buttonProps,
|
|
16
|
+
emits: buttonEmits,
|
|
17
|
+
setup(__props, { expose, emit }) {
|
|
18
|
+
const props = __props;
|
|
19
|
+
const buttonStyle = useButtonCustomStyle(props);
|
|
20
|
+
const ns = useNamespace("button");
|
|
21
|
+
const { _ref, _size, _type, _disabled, _props, shouldAddSpace, handleClick } = useButton(props, emit);
|
|
22
|
+
const buttonKls = computed(() => [
|
|
23
|
+
ns.b(),
|
|
24
|
+
ns.m(_type.value),
|
|
25
|
+
ns.m(_size.value),
|
|
26
|
+
ns.is("disabled", _disabled.value),
|
|
27
|
+
ns.is("loading", props.loading),
|
|
28
|
+
ns.is("plain", props.plain),
|
|
29
|
+
ns.is("round", props.round),
|
|
30
|
+
ns.is("circle", props.circle),
|
|
31
|
+
ns.is("text", props.text),
|
|
32
|
+
ns.is("link", props.link),
|
|
33
|
+
ns.is("has-bg", props.bg)
|
|
34
|
+
]);
|
|
35
|
+
expose({
|
|
36
|
+
ref: _ref,
|
|
37
|
+
size: _size,
|
|
38
|
+
type: _type,
|
|
39
|
+
disabled: _disabled,
|
|
40
|
+
shouldAddSpace
|
|
41
|
+
});
|
|
42
|
+
return (_ctx, _cache) => {
|
|
43
|
+
return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), mergeProps({
|
|
44
|
+
ref_key: "_ref",
|
|
45
|
+
ref: _ref
|
|
46
|
+
}, unref(_props), {
|
|
47
|
+
class: unref(buttonKls),
|
|
48
|
+
style: unref(buttonStyle),
|
|
49
|
+
onClick: unref(handleClick)
|
|
50
|
+
}), {
|
|
51
|
+
default: withCtx(() => [
|
|
52
|
+
_ctx.loading ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
53
|
+
_ctx.$slots.loading ? renderSlot(_ctx.$slots, "loading", { key: 0 }) : (openBlock(), createBlock(unref(ElIcon), {
|
|
54
|
+
key: 1,
|
|
55
|
+
class: normalizeClass(unref(ns).is("loading"))
|
|
56
|
+
}, {
|
|
57
|
+
default: withCtx(() => [
|
|
58
|
+
(openBlock(), createBlock(resolveDynamicComponent(_ctx.loadingIcon)))
|
|
59
|
+
]),
|
|
60
|
+
_: 1
|
|
61
|
+
}, 8, ["class"]))
|
|
62
|
+
], 64)) : _ctx.icon || _ctx.$slots.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 1 }, {
|
|
63
|
+
default: withCtx(() => [
|
|
64
|
+
_ctx.icon ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon), { key: 0 })) : renderSlot(_ctx.$slots, "icon", { key: 1 })
|
|
65
|
+
]),
|
|
66
|
+
_: 3
|
|
67
|
+
})) : createCommentVNode("v-if", true),
|
|
68
|
+
_ctx.$slots.default ? (openBlock(), createElementBlock("span", {
|
|
69
|
+
key: 2,
|
|
70
|
+
class: normalizeClass({ [unref(ns).em("text", "expand")]: unref(shouldAddSpace) })
|
|
71
|
+
}, [
|
|
72
|
+
renderSlot(_ctx.$slots, "default")
|
|
73
|
+
], 2)) : createCommentVNode("v-if", true)
|
|
74
|
+
]),
|
|
75
|
+
_: 3
|
|
76
|
+
}, 16, ["class", "style", "onClick"]);
|
|
77
|
+
};
|
|
56
78
|
}
|
|
57
79
|
});
|
|
58
|
-
|
|
59
|
-
click: (evt) => evt instanceof MouseEvent
|
|
60
|
-
};
|
|
80
|
+
var Button = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "button.vue"]]);
|
|
61
81
|
|
|
62
|
-
export {
|
|
82
|
+
export { Button as default };
|
|
63
83
|
//# sourceMappingURL=button2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button2.mjs","sources":["../../../../../../packages/components/button/src/button.
|
|
1
|
+
{"version":3,"file":"button2.mjs","sources":["../../../../../../packages/components/button/src/button.vue"],"sourcesContent":["<template>\n <component\n :is=\"tag\"\n ref=\"_ref\"\n v-bind=\"_props\"\n :class=\"buttonKls\"\n :style=\"buttonStyle\"\n @click=\"handleClick\"\n >\n <template v-if=\"loading\">\n <slot v-if=\"$slots.loading\" name=\"loading\" />\n <el-icon v-else :class=\"ns.is('loading')\">\n <component :is=\"loadingIcon\" />\n </el-icon>\n </template>\n <el-icon v-else-if=\"icon || $slots.icon\">\n <component :is=\"icon\" v-if=\"icon\" />\n <slot v-else name=\"icon\" />\n </el-icon>\n <span\n v-if=\"$slots.default\"\n :class=\"{ [ns.em('text', 'expand')]: shouldAddSpace }\"\n >\n <slot />\n </span>\n </component>\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 { useButton } from './use-button'\nimport { buttonEmits, buttonProps } from './button'\nimport { useButtonCustomStyle } from './button-custom'\n\ndefineOptions({\n name: 'ElButton',\n})\n\nconst props = defineProps(buttonProps)\nconst emit = defineEmits(buttonEmits)\n\nconst buttonStyle = useButtonCustomStyle(props)\nconst ns = useNamespace('button')\nconst { _ref, _size, _type, _disabled, _props, shouldAddSpace, handleClick } =\n useButton(props, emit)\nconst buttonKls = computed(() => [\n ns.b(),\n ns.m(_type.value),\n ns.m(_size.value),\n ns.is('disabled', _disabled.value),\n ns.is('loading', props.loading),\n ns.is('plain', props.plain),\n ns.is('round', props.round),\n ns.is('circle', props.circle),\n ns.is('text', props.text),\n ns.is('link', props.link),\n ns.is('has-bg', props.bg),\n])\n\ndefineExpose({\n /** @description button html element */\n ref: _ref,\n /** @description button size */\n size: _size,\n /** @description button type */\n type: _type,\n /** @description button disabled */\n disabled: _disabled,\n /** @description whether adding space */\n shouldAddSpace,\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;mCAoCc,CAAA;AAAA,EACZ,IAAM,EAAA,UAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,WAAA,GAAc,qBAAqB,KAAK,CAAA,CAAA;AAC9C,IAAM,MAAA,EAAA,GAAK,aAAa,QAAQ,CAAA,CAAA;AAChC,IAAM,MAAA,EAAE,IAAM,EAAA,KAAA,EAAO,KAAO,EAAA,SAAA,EAAW,QAAQ,cAAgB,EAAA,WAAA,EAAA,GAC7D,SAAU,CAAA,KAAA,EAAO,IAAI,CAAA,CAAA;AACvB,IAAM,MAAA,SAAA,GAAY,SAAS,MAAM;AAAA,MAC/B,GAAG,CAAE,EAAA;AAAA,MACL,EAAA,CAAG,CAAE,CAAA,KAAA,CAAM,KAAK,CAAA;AAAA,MAChB,EAAA,CAAG,CAAE,CAAA,KAAA,CAAM,KAAK,CAAA;AAAA,MAChB,EAAG,CAAA,EAAA,CAAG,UAAY,EAAA,SAAA,CAAU,KAAK,CAAA;AAAA,MACjC,EAAG,CAAA,EAAA,CAAG,SAAW,EAAA,KAAA,CAAM,OAAO,CAAA;AAAA,MAC9B,EAAG,CAAA,EAAA,CAAG,OAAS,EAAA,KAAA,CAAM,KAAK,CAAA;AAAA,MAC1B,EAAG,CAAA,EAAA,CAAG,OAAS,EAAA,KAAA,CAAM,KAAK,CAAA;AAAA,MAC1B,EAAG,CAAA,EAAA,CAAG,QAAU,EAAA,KAAA,CAAM,MAAM,CAAA;AAAA,MAC5B,EAAG,CAAA,EAAA,CAAG,MAAQ,EAAA,KAAA,CAAM,IAAI,CAAA;AAAA,MACxB,EAAG,CAAA,EAAA,CAAG,MAAQ,EAAA,KAAA,CAAM,IAAI,CAAA;AAAA,MACxB,EAAG,CAAA,EAAA,CAAG,QAAU,EAAA,KAAA,CAAM,EAAE,CAAA;AAAA,KACzB,CAAA,CAAA;AAED,IAAa,MAAA,CAAA;AAAA,MAEX,GAAK,EAAA,IAAA;AAAA,MAEL,IAAM,EAAA,KAAA;AAAA,MAEN,IAAM,EAAA,KAAA;AAAA,MAEN,QAAU,EAAA,SAAA;AAAA,MAEV,cAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/es/components/index.mjs
CHANGED
|
@@ -88,7 +88,7 @@ export { badgeProps } from './badge/src/badge.mjs';
|
|
|
88
88
|
export { breadcrumbProps } from './breadcrumb/src/breadcrumb.mjs';
|
|
89
89
|
export { breadcrumbItemProps } from './breadcrumb/src/breadcrumb-item.mjs';
|
|
90
90
|
export { breadcrumbKey } from './breadcrumb/src/constants.mjs';
|
|
91
|
-
export { buttonEmits, buttonNativeTypes, buttonProps, buttonTypes } from './button/src/
|
|
91
|
+
export { buttonEmits, buttonNativeTypes, buttonProps, buttonTypes } from './button/src/button.mjs';
|
|
92
92
|
export { buttonGroupContextKey } from './button/src/constants.mjs';
|
|
93
93
|
export { calendarEmits, calendarProps } from './calendar/src/calendar.mjs';
|
|
94
94
|
export { cardProps } from './card/src/card.mjs';
|
|
@@ -142,8 +142,8 @@ export { overlayEmits, overlayProps } from './overlay/src/overlay.mjs';
|
|
|
142
142
|
export { pageHeaderEmits, pageHeaderProps } from './page-header/src/page-header.mjs';
|
|
143
143
|
export { paginationEmits, paginationProps } from './pagination/src/pagination.mjs';
|
|
144
144
|
export { elPaginationKey } from './pagination/src/constants.mjs';
|
|
145
|
-
export { popconfirmEmits, popconfirmProps } from './popconfirm/src/
|
|
146
|
-
export { Effect, popperProps, roleTypes, usePopperProps } from './popper/src/
|
|
145
|
+
export { popconfirmEmits, popconfirmProps } from './popconfirm/src/popconfirm.mjs';
|
|
146
|
+
export { Effect, popperProps, roleTypes, usePopperProps } from './popper/src/popper.mjs';
|
|
147
147
|
export { popperTriggerProps, usePopperTriggerProps } from './popper/src/trigger.mjs';
|
|
148
148
|
export { popperContentEmits, popperContentProps, popperCoreConfigProps, usePopperContentEmits, usePopperContentProps, usePopperCoreConfigProps } from './popper/src/content.mjs';
|
|
149
149
|
export { popperArrowProps, usePopperArrowProps } from './popper/src/arrow.mjs';
|
|
@@ -154,7 +154,7 @@ export { default as ElPopperContent } from './popper/src/content2.mjs';
|
|
|
154
154
|
export { progressProps } from './progress/src/progress.mjs';
|
|
155
155
|
export { radioEmits, radioProps, radioPropsBase } from './radio/src/radio.mjs';
|
|
156
156
|
export { radioGroupEmits, radioGroupProps } from './radio/src/radio-group.mjs';
|
|
157
|
-
export { radioButtonProps } from './radio/src/radio-
|
|
157
|
+
export { radioButtonProps } from './radio/src/radio-button.mjs';
|
|
158
158
|
export { radioGroupKey } from './radio/src/constants.mjs';
|
|
159
159
|
export { rateEmits, rateProps } from './rate/src/rate.mjs';
|
|
160
160
|
export { IconComponentMap, IconMap, resultProps } from './result/src/result.mjs';
|
|
@@ -166,7 +166,7 @@ export { thumbProps } from './scrollbar/src/thumb.mjs';
|
|
|
166
166
|
export { scrollbarContextKey } from './scrollbar/src/constants.mjs';
|
|
167
167
|
export { selectGroupKey, selectKey } from './select/src/token.mjs';
|
|
168
168
|
export { selectV2InjectionKey } from './select-v2/src/token.mjs';
|
|
169
|
-
export { skeletonProps } from './skeleton/src/
|
|
169
|
+
export { skeletonProps } from './skeleton/src/skeleton2.mjs';
|
|
170
170
|
export { skeletonItemProps } from './skeleton/src/skeleton-item.mjs';
|
|
171
171
|
export { sliderEmits, sliderProps } from './slider/src/slider.mjs';
|
|
172
172
|
export { sliderContextKey } from './slider/src/constants.mjs';
|
|
@@ -199,7 +199,7 @@ export { tooltipEmits, useTooltipModelToggle, useTooltipModelToggleEmits, useToo
|
|
|
199
199
|
export { useTooltipTriggerProps } from './tooltip/src/trigger.mjs';
|
|
200
200
|
export { useTooltipContentProps } from './tooltip/src/content.mjs';
|
|
201
201
|
export { TOOLTIP_INJECTION_KEY } from './tooltip/src/constants.mjs';
|
|
202
|
-
export { LEFT_CHECK_CHANGE_EVENT, RIGHT_CHECK_CHANGE_EVENT, transferCheckedChangeFn, transferEmits, transferProps } from './transfer/src/
|
|
202
|
+
export { LEFT_CHECK_CHANGE_EVENT, RIGHT_CHECK_CHANGE_EVENT, transferCheckedChangeFn, transferEmits, transferProps } from './transfer/src/transfer2.mjs';
|
|
203
203
|
export { genFileId, uploadBaseProps, uploadListTypes, uploadProps } from './upload/src/upload.mjs';
|
|
204
204
|
export { uploadContentProps } from './upload/src/upload-content.mjs';
|
|
205
205
|
export { uploadListEmits, uploadListProps } from './upload/src/upload-list.mjs';
|
|
@@ -211,7 +211,7 @@ export { default as FixedSizeGrid } from './virtual-list/src/components/fixed-si
|
|
|
211
211
|
export { default as DynamicSizeGrid } from './virtual-list/src/components/dynamic-size-grid.mjs';
|
|
212
212
|
export { virtualizedGridProps, virtualizedListProps, virtualizedProps, virtualizedScrollbarProps } from './virtual-list/src/props.mjs';
|
|
213
213
|
export { watermarkProps } from './watermark/src/watermark.mjs';
|
|
214
|
-
export { tourEmits, tourProps } from './tour/src/
|
|
214
|
+
export { tourEmits, tourProps } from './tour/src/tour.mjs';
|
|
215
215
|
export { anchorEmits, anchorProps } from './anchor/src/anchor.mjs';
|
|
216
216
|
export { segmentedEmits, segmentedProps } from './segmented/src/segmented.mjs';
|
|
217
217
|
export { vLoading as ElLoadingDirective, vLoading } from './loading/src/directive.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../../utils/index.mjs';
|
|
2
|
-
import Popconfirm from './src/
|
|
3
|
-
export { popconfirmEmits, popconfirmProps } from './src/
|
|
2
|
+
import Popconfirm from './src/popconfirm2.mjs';
|
|
3
|
+
export { popconfirmEmits, popconfirmProps } from './src/popconfirm.mjs';
|
|
4
4
|
import { withInstall } from '../../utils/vue/install.mjs';
|
|
5
5
|
|
|
6
6
|
const ElPopconfirm = withInstall(Popconfirm);
|
|
@@ -1,116 +1,53 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { ElIcon } from '../../icon/index.mjs';
|
|
4
|
-
import { ElTooltip } from '../../tooltip/index.mjs';
|
|
5
|
-
import '../../../hooks/index.mjs';
|
|
1
|
+
import '../../button/index.mjs';
|
|
2
|
+
import { QuestionFilled } from '@element-plus/icons-vue';
|
|
6
3
|
import '../../../utils/index.mjs';
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
4
|
+
import '../../tooltip/index.mjs';
|
|
5
|
+
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
|
6
|
+
import { buttonTypes } from '../../button/src/button.mjs';
|
|
7
|
+
import { iconPropType } from '../../../utils/vue/icon.mjs';
|
|
8
|
+
import { useTooltipContentProps } from '../../tooltip/src/content.mjs';
|
|
12
9
|
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
trigger: "click",
|
|
49
|
-
effect: "light"
|
|
50
|
-
}, _ctx.$attrs, {
|
|
51
|
-
"popper-class": `${unref(ns).namespace.value}-popover`,
|
|
52
|
-
"popper-style": unref(style),
|
|
53
|
-
teleported: _ctx.teleported,
|
|
54
|
-
"fallback-placements": ["bottom", "top", "right", "left"],
|
|
55
|
-
"hide-after": _ctx.hideAfter,
|
|
56
|
-
persistent: _ctx.persistent
|
|
57
|
-
}), {
|
|
58
|
-
content: withCtx(() => [
|
|
59
|
-
createElementVNode("div", {
|
|
60
|
-
class: normalizeClass(unref(ns).b())
|
|
61
|
-
}, [
|
|
62
|
-
createElementVNode("div", {
|
|
63
|
-
class: normalizeClass(unref(ns).e("main"))
|
|
64
|
-
}, [
|
|
65
|
-
!_ctx.hideIcon && _ctx.icon ? (openBlock(), createBlock(unref(ElIcon), {
|
|
66
|
-
key: 0,
|
|
67
|
-
class: normalizeClass(unref(ns).e("icon")),
|
|
68
|
-
style: normalizeStyle({ color: _ctx.iconColor })
|
|
69
|
-
}, {
|
|
70
|
-
default: withCtx(() => [
|
|
71
|
-
(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon)))
|
|
72
|
-
]),
|
|
73
|
-
_: 1
|
|
74
|
-
}, 8, ["class", "style"])) : createCommentVNode("v-if", true),
|
|
75
|
-
createTextVNode(" " + toDisplayString(_ctx.title), 1)
|
|
76
|
-
], 2),
|
|
77
|
-
createElementVNode("div", {
|
|
78
|
-
class: normalizeClass(unref(ns).e("action"))
|
|
79
|
-
}, [
|
|
80
|
-
createVNode(unref(ElButton), {
|
|
81
|
-
size: "small",
|
|
82
|
-
type: _ctx.cancelButtonType === "text" ? "" : _ctx.cancelButtonType,
|
|
83
|
-
text: _ctx.cancelButtonType === "text",
|
|
84
|
-
onClick: cancel
|
|
85
|
-
}, {
|
|
86
|
-
default: withCtx(() => [
|
|
87
|
-
createTextVNode(toDisplayString(unref(finalCancelButtonText)), 1)
|
|
88
|
-
]),
|
|
89
|
-
_: 1
|
|
90
|
-
}, 8, ["type", "text"]),
|
|
91
|
-
createVNode(unref(ElButton), {
|
|
92
|
-
size: "small",
|
|
93
|
-
type: _ctx.confirmButtonType === "text" ? "" : _ctx.confirmButtonType,
|
|
94
|
-
text: _ctx.confirmButtonType === "text",
|
|
95
|
-
onClick: confirm
|
|
96
|
-
}, {
|
|
97
|
-
default: withCtx(() => [
|
|
98
|
-
createTextVNode(toDisplayString(unref(finalConfirmButtonText)), 1)
|
|
99
|
-
]),
|
|
100
|
-
_: 1
|
|
101
|
-
}, 8, ["type", "text"])
|
|
102
|
-
], 2)
|
|
103
|
-
], 2)
|
|
104
|
-
]),
|
|
105
|
-
default: withCtx(() => [
|
|
106
|
-
_ctx.$slots.reference ? renderSlot(_ctx.$slots, "reference", { key: 0 }) : createCommentVNode("v-if", true)
|
|
107
|
-
]),
|
|
108
|
-
_: 3
|
|
109
|
-
}, 16, ["popper-class", "popper-style", "teleported", "hide-after", "persistent"]);
|
|
110
|
-
};
|
|
10
|
+
const popconfirmProps = buildProps({
|
|
11
|
+
title: String,
|
|
12
|
+
confirmButtonText: String,
|
|
13
|
+
cancelButtonText: String,
|
|
14
|
+
confirmButtonType: {
|
|
15
|
+
type: String,
|
|
16
|
+
values: buttonTypes,
|
|
17
|
+
default: "primary"
|
|
18
|
+
},
|
|
19
|
+
cancelButtonType: {
|
|
20
|
+
type: String,
|
|
21
|
+
values: buttonTypes,
|
|
22
|
+
default: "text"
|
|
23
|
+
},
|
|
24
|
+
icon: {
|
|
25
|
+
type: iconPropType,
|
|
26
|
+
default: () => QuestionFilled
|
|
27
|
+
},
|
|
28
|
+
iconColor: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: "#f90"
|
|
31
|
+
},
|
|
32
|
+
hideIcon: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: false
|
|
35
|
+
},
|
|
36
|
+
hideAfter: {
|
|
37
|
+
type: Number,
|
|
38
|
+
default: 200
|
|
39
|
+
},
|
|
40
|
+
teleported: useTooltipContentProps.teleported,
|
|
41
|
+
persistent: useTooltipContentProps.persistent,
|
|
42
|
+
width: {
|
|
43
|
+
type: [String, Number],
|
|
44
|
+
default: 150
|
|
111
45
|
}
|
|
112
46
|
});
|
|
113
|
-
|
|
47
|
+
const popconfirmEmits = {
|
|
48
|
+
confirm: (e) => e instanceof MouseEvent,
|
|
49
|
+
cancel: (e) => e instanceof MouseEvent
|
|
50
|
+
};
|
|
114
51
|
|
|
115
|
-
export {
|
|
52
|
+
export { popconfirmEmits, popconfirmProps };
|
|
116
53
|
//# sourceMappingURL=popconfirm.mjs.map
|