@element-plus/nightly 0.0.20241120 → 0.0.20241121
Sign up to get free protection for your applications and to get access to all the features.
- package/attributes.json +1 -1
- package/dist/index.full.js +10 -6
- package/dist/index.full.min.js +7 -7
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +7 -7
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +10 -6
- 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/ms.js +1 -1
- package/dist/locale/ms.min.js +1 -1
- package/dist/locale/ms.min.mjs +1 -1
- package/dist/locale/ms.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/anchor/index.mjs +2 -2
- package/es/components/anchor/src/anchor.mjs +38 -193
- package/es/components/anchor/src/anchor.mjs.map +1 -1
- package/es/components/anchor/src/anchor2.mjs +193 -38
- package/es/components/anchor/src/anchor2.mjs.map +1 -1
- package/es/components/badge/index.mjs +2 -2
- package/es/components/badge/src/badge.mjs +32 -69
- package/es/components/badge/src/badge.mjs.map +1 -1
- package/es/components/badge/src/badge2.mjs +69 -32
- package/es/components/badge/src/badge2.mjs.map +1 -1
- package/es/components/index.mjs +6 -6
- package/es/components/mention/src/mention-dropdown.mjs +15 -167
- package/es/components/mention/src/mention-dropdown.mjs.map +1 -1
- package/es/components/mention/src/mention-dropdown2.mjs +167 -15
- package/es/components/mention/src/mention-dropdown2.mjs.map +1 -1
- package/es/components/mention/src/mention2.mjs +1 -1
- package/es/components/menu/index.mjs +2 -2
- package/es/components/menu/src/menu-item-group.mjs +4 -35
- package/es/components/menu/src/menu-item-group.mjs.map +1 -1
- package/es/components/menu/src/menu-item-group2.mjs +35 -4
- package/es/components/menu/src/menu-item-group2.mjs.map +1 -1
- package/es/components/popconfirm/index.mjs +2 -2
- package/es/components/popconfirm/src/popconfirm.mjs +47 -115
- package/es/components/popconfirm/src/popconfirm.mjs.map +1 -1
- package/es/components/popconfirm/src/popconfirm2.mjs +115 -47
- package/es/components/popconfirm/src/popconfirm2.mjs.map +1 -1
- package/es/components/statistic/index.mjs +2 -2
- package/es/components/statistic/src/statistic.mjs +25 -70
- package/es/components/statistic/src/statistic.mjs.map +1 -1
- package/es/components/statistic/src/statistic2.mjs +70 -25
- package/es/components/statistic/src/statistic2.mjs.map +1 -1
- package/es/components/switch/index.mjs +2 -2
- package/es/components/switch/src/switch.mjs +229 -72
- package/es/components/switch/src/switch.mjs.map +1 -1
- package/es/components/switch/src/switch2.mjs +72 -229
- package/es/components/switch/src/switch2.mjs.map +1 -1
- package/es/components/tree-v2/src/tree.mjs +9 -5
- package/es/components/tree-v2/src/tree.mjs.map +1 -1
- package/es/components/tree-v2/src/tree.vue.d.ts +10 -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/anchor/index.js +2 -2
- package/lib/components/anchor/src/anchor.js +38 -192
- package/lib/components/anchor/src/anchor.js.map +1 -1
- package/lib/components/anchor/src/anchor2.js +192 -38
- package/lib/components/anchor/src/anchor2.js.map +1 -1
- package/lib/components/badge/index.js +2 -2
- package/lib/components/badge/src/badge.js +32 -69
- package/lib/components/badge/src/badge.js.map +1 -1
- package/lib/components/badge/src/badge2.js +69 -32
- package/lib/components/badge/src/badge2.js.map +1 -1
- package/lib/components/index.js +6 -6
- package/lib/components/mention/src/mention-dropdown.js +16 -167
- package/lib/components/mention/src/mention-dropdown.js.map +1 -1
- package/lib/components/mention/src/mention-dropdown2.js +167 -16
- package/lib/components/mention/src/mention-dropdown2.js.map +1 -1
- package/lib/components/mention/src/mention2.js +1 -1
- package/lib/components/menu/index.js +2 -2
- package/lib/components/menu/src/menu-item-group.js +4 -35
- package/lib/components/menu/src/menu-item-group.js.map +1 -1
- package/lib/components/menu/src/menu-item-group2.js +35 -4
- package/lib/components/menu/src/menu-item-group2.js.map +1 -1
- package/lib/components/popconfirm/index.js +2 -2
- package/lib/components/popconfirm/src/popconfirm.js +48 -115
- package/lib/components/popconfirm/src/popconfirm.js.map +1 -1
- package/lib/components/popconfirm/src/popconfirm2.js +115 -48
- package/lib/components/popconfirm/src/popconfirm2.js.map +1 -1
- package/lib/components/statistic/index.js +2 -2
- package/lib/components/statistic/src/statistic.js +25 -70
- package/lib/components/statistic/src/statistic.js.map +1 -1
- package/lib/components/statistic/src/statistic2.js +70 -25
- package/lib/components/statistic/src/statistic2.js.map +1 -1
- package/lib/components/switch/index.js +2 -2
- package/lib/components/switch/src/switch.js +228 -72
- package/lib/components/switch/src/switch.js.map +1 -1
- package/lib/components/switch/src/switch2.js +72 -228
- package/lib/components/switch/src/switch2.js.map +1 -1
- package/lib/components/tree-v2/src/tree.js +8 -4
- package/lib/components/tree-v2/src/tree.js.map +1 -1
- package/lib/components/tree-v2/src/tree.vue.d.ts +10 -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,237 +1,80 @@
|
|
1
|
-
import { defineComponent, computed, ref, watch, nextTick, onMounted, openBlock, createElementBlock, normalizeClass, unref, withModifiers, createElementVNode, withKeys, createBlock, withCtx, resolveDynamicComponent, createCommentVNode, toDisplayString, normalizeStyle, createVNode, renderSlot } from 'vue';
|
2
1
|
import '../../../utils/index.mjs';
|
3
|
-
import { ElIcon } from '../../icon/index.mjs';
|
4
|
-
import '../../form/index.mjs';
|
5
|
-
import { Loading } from '@element-plus/icons-vue';
|
6
2
|
import '../../../constants/index.mjs';
|
7
3
|
import '../../../hooks/index.mjs';
|
8
|
-
import {
|
9
|
-
import
|
10
|
-
import {
|
11
|
-
import {
|
12
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
13
|
-
import { addUnit } from '../../../utils/dom/style.mjs';
|
4
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
5
|
+
import { isValidComponentSize } from '../../../utils/vue/validator.mjs';
|
6
|
+
import { iconPropType } from '../../../utils/vue/icon.mjs';
|
7
|
+
import { useAriaProps } from '../../../hooks/use-aria/index.mjs';
|
14
8
|
import { UPDATE_MODEL_EVENT, CHANGE_EVENT, INPUT_EVENT } from '../../../constants/event.mjs';
|
15
|
-
import {
|
16
|
-
import {
|
17
|
-
import { isBoolean } from '../../../utils/types.mjs';
|
9
|
+
import { isBoolean, isNumber } from '../../../utils/types.mjs';
|
10
|
+
import { isString } from '@vue/shared';
|
18
11
|
|
19
|
-
const
|
20
|
-
|
21
|
-
|
12
|
+
const switchProps = buildProps({
|
13
|
+
modelValue: {
|
14
|
+
type: [Boolean, String, Number],
|
15
|
+
default: false
|
16
|
+
},
|
17
|
+
disabled: Boolean,
|
18
|
+
loading: Boolean,
|
19
|
+
size: {
|
20
|
+
type: String,
|
21
|
+
validator: isValidComponentSize
|
22
|
+
},
|
23
|
+
width: {
|
24
|
+
type: [String, Number],
|
25
|
+
default: ""
|
26
|
+
},
|
27
|
+
inlinePrompt: Boolean,
|
28
|
+
inactiveActionIcon: {
|
29
|
+
type: iconPropType
|
30
|
+
},
|
31
|
+
activeActionIcon: {
|
32
|
+
type: iconPropType
|
33
|
+
},
|
34
|
+
activeIcon: {
|
35
|
+
type: iconPropType
|
36
|
+
},
|
37
|
+
inactiveIcon: {
|
38
|
+
type: iconPropType
|
39
|
+
},
|
40
|
+
activeText: {
|
41
|
+
type: String,
|
42
|
+
default: ""
|
43
|
+
},
|
44
|
+
inactiveText: {
|
45
|
+
type: String,
|
46
|
+
default: ""
|
47
|
+
},
|
48
|
+
activeValue: {
|
49
|
+
type: [Boolean, String, Number],
|
50
|
+
default: true
|
51
|
+
},
|
52
|
+
inactiveValue: {
|
53
|
+
type: [Boolean, String, Number],
|
54
|
+
default: false
|
55
|
+
},
|
56
|
+
name: {
|
57
|
+
type: String,
|
58
|
+
default: ""
|
59
|
+
},
|
60
|
+
validateEvent: {
|
61
|
+
type: Boolean,
|
62
|
+
default: true
|
63
|
+
},
|
64
|
+
beforeChange: {
|
65
|
+
type: definePropType(Function)
|
66
|
+
},
|
67
|
+
id: String,
|
68
|
+
tabindex: {
|
69
|
+
type: [String, Number]
|
70
|
+
},
|
71
|
+
...useAriaProps(["ariaLabel"])
|
22
72
|
});
|
23
|
-
const
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
const props = __props;
|
29
|
-
const { formItem } = useFormItem();
|
30
|
-
const switchSize = useFormSize();
|
31
|
-
const ns = useNamespace("switch");
|
32
|
-
const { inputId } = useFormItemInputId(props, {
|
33
|
-
formItemContext: formItem
|
34
|
-
});
|
35
|
-
const switchDisabled = useFormDisabled(computed(() => props.loading));
|
36
|
-
const isControlled = ref(props.modelValue !== false);
|
37
|
-
const input = ref();
|
38
|
-
const core = ref();
|
39
|
-
const switchKls = computed(() => [
|
40
|
-
ns.b(),
|
41
|
-
ns.m(switchSize.value),
|
42
|
-
ns.is("disabled", switchDisabled.value),
|
43
|
-
ns.is("checked", checked.value)
|
44
|
-
]);
|
45
|
-
const labelLeftKls = computed(() => [
|
46
|
-
ns.e("label"),
|
47
|
-
ns.em("label", "left"),
|
48
|
-
ns.is("active", !checked.value)
|
49
|
-
]);
|
50
|
-
const labelRightKls = computed(() => [
|
51
|
-
ns.e("label"),
|
52
|
-
ns.em("label", "right"),
|
53
|
-
ns.is("active", checked.value)
|
54
|
-
]);
|
55
|
-
const coreStyle = computed(() => ({
|
56
|
-
width: addUnit(props.width)
|
57
|
-
}));
|
58
|
-
watch(() => props.modelValue, () => {
|
59
|
-
isControlled.value = true;
|
60
|
-
});
|
61
|
-
const actualValue = computed(() => {
|
62
|
-
return isControlled.value ? props.modelValue : false;
|
63
|
-
});
|
64
|
-
const checked = computed(() => actualValue.value === props.activeValue);
|
65
|
-
if (![props.activeValue, props.inactiveValue].includes(actualValue.value)) {
|
66
|
-
emit(UPDATE_MODEL_EVENT, props.inactiveValue);
|
67
|
-
emit(CHANGE_EVENT, props.inactiveValue);
|
68
|
-
emit(INPUT_EVENT, props.inactiveValue);
|
69
|
-
}
|
70
|
-
watch(checked, (val) => {
|
71
|
-
var _a;
|
72
|
-
input.value.checked = val;
|
73
|
-
if (props.validateEvent) {
|
74
|
-
(_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change").catch((err) => debugWarn(err));
|
75
|
-
}
|
76
|
-
});
|
77
|
-
const handleChange = () => {
|
78
|
-
const val = checked.value ? props.inactiveValue : props.activeValue;
|
79
|
-
emit(UPDATE_MODEL_EVENT, val);
|
80
|
-
emit(CHANGE_EVENT, val);
|
81
|
-
emit(INPUT_EVENT, val);
|
82
|
-
nextTick(() => {
|
83
|
-
input.value.checked = checked.value;
|
84
|
-
});
|
85
|
-
};
|
86
|
-
const switchValue = () => {
|
87
|
-
if (switchDisabled.value)
|
88
|
-
return;
|
89
|
-
const { beforeChange } = props;
|
90
|
-
if (!beforeChange) {
|
91
|
-
handleChange();
|
92
|
-
return;
|
93
|
-
}
|
94
|
-
const shouldChange = beforeChange();
|
95
|
-
const isPromiseOrBool = [
|
96
|
-
isPromise(shouldChange),
|
97
|
-
isBoolean(shouldChange)
|
98
|
-
].includes(true);
|
99
|
-
if (!isPromiseOrBool) {
|
100
|
-
throwError(COMPONENT_NAME, "beforeChange must return type `Promise<boolean>` or `boolean`");
|
101
|
-
}
|
102
|
-
if (isPromise(shouldChange)) {
|
103
|
-
shouldChange.then((result) => {
|
104
|
-
if (result) {
|
105
|
-
handleChange();
|
106
|
-
}
|
107
|
-
}).catch((e) => {
|
108
|
-
debugWarn(COMPONENT_NAME, `some error occurred: ${e}`);
|
109
|
-
});
|
110
|
-
} else if (shouldChange) {
|
111
|
-
handleChange();
|
112
|
-
}
|
113
|
-
};
|
114
|
-
const focus = () => {
|
115
|
-
var _a, _b;
|
116
|
-
(_b = (_a = input.value) == null ? void 0 : _a.focus) == null ? void 0 : _b.call(_a);
|
117
|
-
};
|
118
|
-
onMounted(() => {
|
119
|
-
input.value.checked = checked.value;
|
120
|
-
});
|
121
|
-
expose({
|
122
|
-
focus,
|
123
|
-
checked
|
124
|
-
});
|
125
|
-
return (_ctx, _cache) => {
|
126
|
-
return openBlock(), createElementBlock("div", {
|
127
|
-
class: normalizeClass(unref(switchKls)),
|
128
|
-
onClick: withModifiers(switchValue, ["prevent"])
|
129
|
-
}, [
|
130
|
-
createElementVNode("input", {
|
131
|
-
id: unref(inputId),
|
132
|
-
ref_key: "input",
|
133
|
-
ref: input,
|
134
|
-
class: normalizeClass(unref(ns).e("input")),
|
135
|
-
type: "checkbox",
|
136
|
-
role: "switch",
|
137
|
-
"aria-checked": unref(checked),
|
138
|
-
"aria-disabled": unref(switchDisabled),
|
139
|
-
"aria-label": _ctx.ariaLabel,
|
140
|
-
name: _ctx.name,
|
141
|
-
"true-value": _ctx.activeValue,
|
142
|
-
"false-value": _ctx.inactiveValue,
|
143
|
-
disabled: unref(switchDisabled),
|
144
|
-
tabindex: _ctx.tabindex,
|
145
|
-
onChange: handleChange,
|
146
|
-
onKeydown: withKeys(switchValue, ["enter"])
|
147
|
-
}, null, 42, ["id", "aria-checked", "aria-disabled", "aria-label", "name", "true-value", "false-value", "disabled", "tabindex", "onKeydown"]),
|
148
|
-
!_ctx.inlinePrompt && (_ctx.inactiveIcon || _ctx.inactiveText) ? (openBlock(), createElementBlock("span", {
|
149
|
-
key: 0,
|
150
|
-
class: normalizeClass(unref(labelLeftKls))
|
151
|
-
}, [
|
152
|
-
_ctx.inactiveIcon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
|
153
|
-
default: withCtx(() => [
|
154
|
-
(openBlock(), createBlock(resolveDynamicComponent(_ctx.inactiveIcon)))
|
155
|
-
]),
|
156
|
-
_: 1
|
157
|
-
})) : createCommentVNode("v-if", true),
|
158
|
-
!_ctx.inactiveIcon && _ctx.inactiveText ? (openBlock(), createElementBlock("span", {
|
159
|
-
key: 1,
|
160
|
-
"aria-hidden": unref(checked)
|
161
|
-
}, toDisplayString(_ctx.inactiveText), 9, ["aria-hidden"])) : createCommentVNode("v-if", true)
|
162
|
-
], 2)) : createCommentVNode("v-if", true),
|
163
|
-
createElementVNode("span", {
|
164
|
-
ref_key: "core",
|
165
|
-
ref: core,
|
166
|
-
class: normalizeClass(unref(ns).e("core")),
|
167
|
-
style: normalizeStyle(unref(coreStyle))
|
168
|
-
}, [
|
169
|
-
_ctx.inlinePrompt ? (openBlock(), createElementBlock("div", {
|
170
|
-
key: 0,
|
171
|
-
class: normalizeClass(unref(ns).e("inner"))
|
172
|
-
}, [
|
173
|
-
_ctx.activeIcon || _ctx.inactiveIcon ? (openBlock(), createBlock(unref(ElIcon), {
|
174
|
-
key: 0,
|
175
|
-
class: normalizeClass(unref(ns).is("icon"))
|
176
|
-
}, {
|
177
|
-
default: withCtx(() => [
|
178
|
-
(openBlock(), createBlock(resolveDynamicComponent(unref(checked) ? _ctx.activeIcon : _ctx.inactiveIcon)))
|
179
|
-
]),
|
180
|
-
_: 1
|
181
|
-
}, 8, ["class"])) : _ctx.activeText || _ctx.inactiveText ? (openBlock(), createElementBlock("span", {
|
182
|
-
key: 1,
|
183
|
-
class: normalizeClass(unref(ns).is("text")),
|
184
|
-
"aria-hidden": !unref(checked)
|
185
|
-
}, toDisplayString(unref(checked) ? _ctx.activeText : _ctx.inactiveText), 11, ["aria-hidden"])) : createCommentVNode("v-if", true)
|
186
|
-
], 2)) : createCommentVNode("v-if", true),
|
187
|
-
createElementVNode("div", {
|
188
|
-
class: normalizeClass(unref(ns).e("action"))
|
189
|
-
}, [
|
190
|
-
_ctx.loading ? (openBlock(), createBlock(unref(ElIcon), {
|
191
|
-
key: 0,
|
192
|
-
class: normalizeClass(unref(ns).is("loading"))
|
193
|
-
}, {
|
194
|
-
default: withCtx(() => [
|
195
|
-
createVNode(unref(Loading))
|
196
|
-
]),
|
197
|
-
_: 1
|
198
|
-
}, 8, ["class"])) : unref(checked) ? renderSlot(_ctx.$slots, "active-action", { key: 1 }, () => [
|
199
|
-
_ctx.activeActionIcon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
|
200
|
-
default: withCtx(() => [
|
201
|
-
(openBlock(), createBlock(resolveDynamicComponent(_ctx.activeActionIcon)))
|
202
|
-
]),
|
203
|
-
_: 1
|
204
|
-
})) : createCommentVNode("v-if", true)
|
205
|
-
]) : !unref(checked) ? renderSlot(_ctx.$slots, "inactive-action", { key: 2 }, () => [
|
206
|
-
_ctx.inactiveActionIcon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
|
207
|
-
default: withCtx(() => [
|
208
|
-
(openBlock(), createBlock(resolveDynamicComponent(_ctx.inactiveActionIcon)))
|
209
|
-
]),
|
210
|
-
_: 1
|
211
|
-
})) : createCommentVNode("v-if", true)
|
212
|
-
]) : createCommentVNode("v-if", true)
|
213
|
-
], 2)
|
214
|
-
], 6),
|
215
|
-
!_ctx.inlinePrompt && (_ctx.activeIcon || _ctx.activeText) ? (openBlock(), createElementBlock("span", {
|
216
|
-
key: 1,
|
217
|
-
class: normalizeClass(unref(labelRightKls))
|
218
|
-
}, [
|
219
|
-
_ctx.activeIcon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
|
220
|
-
default: withCtx(() => [
|
221
|
-
(openBlock(), createBlock(resolveDynamicComponent(_ctx.activeIcon)))
|
222
|
-
]),
|
223
|
-
_: 1
|
224
|
-
})) : createCommentVNode("v-if", true),
|
225
|
-
!_ctx.activeIcon && _ctx.activeText ? (openBlock(), createElementBlock("span", {
|
226
|
-
key: 1,
|
227
|
-
"aria-hidden": !unref(checked)
|
228
|
-
}, toDisplayString(_ctx.activeText), 9, ["aria-hidden"])) : createCommentVNode("v-if", true)
|
229
|
-
], 2)) : createCommentVNode("v-if", true)
|
230
|
-
], 10, ["onClick"]);
|
231
|
-
};
|
232
|
-
}
|
233
|
-
});
|
234
|
-
var Switch = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "switch.vue"]]);
|
73
|
+
const switchEmits = {
|
74
|
+
[UPDATE_MODEL_EVENT]: (val) => isBoolean(val) || isString(val) || isNumber(val),
|
75
|
+
[CHANGE_EVENT]: (val) => isBoolean(val) || isString(val) || isNumber(val),
|
76
|
+
[INPUT_EVENT]: (val) => isBoolean(val) || isString(val) || isNumber(val)
|
77
|
+
};
|
235
78
|
|
236
|
-
export {
|
79
|
+
export { switchEmits, switchProps };
|
237
80
|
//# sourceMappingURL=switch2.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"switch2.mjs","sources":["../../../../../../packages/components/switch/src/switch.vue"],"sourcesContent":["<template>\n <div :class=\"switchKls\" @click.prevent=\"switchValue\">\n <input\n :id=\"inputId\"\n ref=\"input\"\n :class=\"ns.e('input')\"\n type=\"checkbox\"\n role=\"switch\"\n :aria-checked=\"checked\"\n :aria-disabled=\"switchDisabled\"\n :aria-label=\"ariaLabel\"\n :name=\"name\"\n :true-value=\"activeValue\"\n :false-value=\"inactiveValue\"\n :disabled=\"switchDisabled\"\n :tabindex=\"tabindex\"\n @change=\"handleChange\"\n @keydown.enter=\"switchValue\"\n />\n <span\n v-if=\"!inlinePrompt && (inactiveIcon || inactiveText)\"\n :class=\"labelLeftKls\"\n >\n <el-icon v-if=\"inactiveIcon\">\n <component :is=\"inactiveIcon\" />\n </el-icon>\n <span v-if=\"!inactiveIcon && inactiveText\" :aria-hidden=\"checked\">{{\n inactiveText\n }}</span>\n </span>\n <span ref=\"core\" :class=\"ns.e('core')\" :style=\"coreStyle\">\n <div v-if=\"inlinePrompt\" :class=\"ns.e('inner')\">\n <template v-if=\"activeIcon || inactiveIcon\">\n <el-icon :class=\"ns.is('icon')\">\n <component :is=\"checked ? activeIcon : inactiveIcon\" />\n </el-icon>\n </template>\n <template v-else-if=\"activeText || inactiveText\">\n <span :class=\"ns.is('text')\" :aria-hidden=\"!checked\">\n {{ checked ? activeText : inactiveText }}\n </span>\n </template>\n </div>\n <div :class=\"ns.e('action')\">\n <el-icon v-if=\"loading\" :class=\"ns.is('loading')\">\n <loading />\n </el-icon>\n <slot v-else-if=\"checked\" name=\"active-action\">\n <el-icon v-if=\"activeActionIcon\">\n <component :is=\"activeActionIcon\" />\n </el-icon>\n </slot>\n <slot v-else-if=\"!checked\" name=\"inactive-action\">\n <el-icon v-if=\"inactiveActionIcon\">\n <component :is=\"inactiveActionIcon\" />\n </el-icon>\n </slot>\n </div>\n </span>\n <span\n v-if=\"!inlinePrompt && (activeIcon || activeText)\"\n :class=\"labelRightKls\"\n >\n <el-icon v-if=\"activeIcon\">\n <component :is=\"activeIcon\" />\n </el-icon>\n <span v-if=\"!activeIcon && activeText\" :aria-hidden=\"!checked\">{{\n activeText\n }}</span>\n </span>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, nextTick, onMounted, ref, watch } from 'vue'\nimport {\n addUnit,\n debugWarn,\n isBoolean,\n isPromise,\n throwError,\n} from '@element-plus/utils'\nimport ElIcon from '@element-plus/components/icon'\nimport {\n useFormDisabled,\n useFormItem,\n useFormItemInputId,\n useFormSize,\n} from '@element-plus/components/form'\nimport { Loading } from '@element-plus/icons-vue'\nimport {\n CHANGE_EVENT,\n INPUT_EVENT,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { useNamespace } from '@element-plus/hooks'\nimport { switchEmits, switchProps } from './switch'\nimport type { CSSProperties } from 'vue'\n\nconst COMPONENT_NAME = 'ElSwitch'\ndefineOptions({\n name: COMPONENT_NAME,\n})\n\nconst props = defineProps(switchProps)\nconst emit = defineEmits(switchEmits)\n\nconst { formItem } = useFormItem()\nconst switchSize = useFormSize()\nconst ns = useNamespace('switch')\n\nconst { inputId } = useFormItemInputId(props, {\n formItemContext: formItem,\n})\n\nconst switchDisabled = useFormDisabled(computed(() => props.loading))\nconst isControlled = ref(props.modelValue !== false)\nconst input = ref<HTMLInputElement>()\nconst core = ref<HTMLSpanElement>()\n\nconst switchKls = computed(() => [\n ns.b(),\n ns.m(switchSize.value),\n ns.is('disabled', switchDisabled.value),\n ns.is('checked', checked.value),\n])\n\nconst labelLeftKls = computed(() => [\n ns.e('label'),\n ns.em('label', 'left'),\n ns.is('active', !checked.value),\n])\n\nconst labelRightKls = computed(() => [\n ns.e('label'),\n ns.em('label', 'right'),\n ns.is('active', checked.value),\n])\n\nconst coreStyle = computed<CSSProperties>(() => ({\n width: addUnit(props.width),\n}))\n\nwatch(\n () => props.modelValue,\n () => {\n isControlled.value = true\n }\n)\n\nconst actualValue = computed(() => {\n return isControlled.value ? props.modelValue : false\n})\n\nconst checked = computed(() => actualValue.value === props.activeValue)\n\nif (![props.activeValue, props.inactiveValue].includes(actualValue.value)) {\n emit(UPDATE_MODEL_EVENT, props.inactiveValue)\n emit(CHANGE_EVENT, props.inactiveValue)\n emit(INPUT_EVENT, props.inactiveValue)\n}\n\nwatch(checked, (val) => {\n input.value!.checked = val\n\n if (props.validateEvent) {\n formItem?.validate?.('change').catch((err) => debugWarn(err))\n }\n})\n\nconst handleChange = () => {\n const val = checked.value ? props.inactiveValue : props.activeValue\n emit(UPDATE_MODEL_EVENT, val)\n emit(CHANGE_EVENT, val)\n emit(INPUT_EVENT, val)\n nextTick(() => {\n input.value!.checked = checked.value\n })\n}\n\nconst switchValue = () => {\n if (switchDisabled.value) return\n\n const { beforeChange } = props\n if (!beforeChange) {\n handleChange()\n return\n }\n\n const shouldChange = beforeChange()\n\n const isPromiseOrBool = [\n isPromise(shouldChange),\n isBoolean(shouldChange),\n ].includes(true)\n if (!isPromiseOrBool) {\n throwError(\n COMPONENT_NAME,\n 'beforeChange must return type `Promise<boolean>` or `boolean`'\n )\n }\n\n if (isPromise(shouldChange)) {\n shouldChange\n .then((result) => {\n if (result) {\n handleChange()\n }\n })\n .catch((e) => {\n debugWarn(COMPONENT_NAME, `some error occurred: ${e}`)\n })\n } else if (shouldChange) {\n handleChange()\n }\n}\n\nconst focus = (): void => {\n input.value?.focus?.()\n}\n\nonMounted(() => {\n input.value!.checked = checked.value\n})\n\ndefineExpose({\n /**\n * @description manual focus to the switch component\n **/\n focus,\n /**\n * @description whether Switch is checked\n */\n checked,\n})\n</script>\n"],"names":["_openBlock","_createElementBlock","_normalizeClass","_unref","_withModifiers","_createElementVNode"],"mappings":";;;;;;;;;;;;;;;;;;;mCAoGc,CAAA;AAAA,EACZ,IAAM,EAAA,c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;;;;"}
|
1
|
+
{"version":3,"file":"switch2.mjs","sources":["../../../../../../packages/components/switch/src/switch.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n iconPropType,\n isBoolean,\n isNumber,\n isString,\n isValidComponentSize,\n} from '@element-plus/utils'\nimport {\n CHANGE_EVENT,\n INPUT_EVENT,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { useAriaProps } from '@element-plus/hooks'\nimport type { ComponentSize } from '@element-plus/constants'\nimport type Switch from './switch.vue'\nimport type { ExtractPropTypes, PropType } from 'vue'\n\nexport const switchProps = buildProps({\n /**\n * @description binding value, it should be equivalent to either `active-value` or `inactive-value`, by default it's `boolean` type\n */\n modelValue: {\n type: [Boolean, String, Number],\n default: false,\n },\n /**\n * @description whether Switch is disabled\n */\n disabled: Boolean,\n /**\n * @description whether Switch is in loading state\n */\n loading: Boolean,\n /**\n * @description size of Switch\n */\n size: {\n type: String as PropType<ComponentSize>,\n validator: isValidComponentSize,\n },\n /**\n * @description width of Switch\n */\n width: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description whether icon or text is displayed inside dot, only the first character will be rendered for text\n */\n inlinePrompt: Boolean,\n /**\n * @description component of the icon displayed in action when in `off` state\n */\n inactiveActionIcon: {\n type: iconPropType,\n },\n /**\n * @description component of the icon displayed in action when in `on` state\n */\n activeActionIcon: {\n type: iconPropType,\n },\n /**\n * @description component of the icon displayed when in `on` state, overrides `active-text`\n */\n activeIcon: {\n type: iconPropType,\n },\n /**\n * @description component of the icon displayed when in `off` state, overrides `inactive-text`\n */\n inactiveIcon: {\n type: iconPropType,\n },\n /**\n * @description text displayed when in `on` state\n */\n activeText: {\n type: String,\n default: '',\n },\n /**\n * @description text displayed when in `off` state\n */\n inactiveText: {\n type: String,\n default: '',\n },\n /**\n * @description switch value when in `on` state\n */\n activeValue: {\n type: [Boolean, String, Number],\n default: true,\n },\n /**\n * @description switch value when in `off` state\n */\n inactiveValue: {\n type: [Boolean, String, Number],\n default: false,\n },\n /**\n * @description input name of Switch\n */\n name: {\n type: String,\n default: '',\n },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n /**\n * @description before-change hook before the switch state changes. If `false` is returned or a `Promise` is returned and then is rejected, will stop switching\n */\n beforeChange: {\n type: definePropType<() => Promise<boolean> | boolean>(Function),\n },\n /**\n * @description id for input\n */\n id: String,\n /**\n * @description tabindex for input\n */\n tabindex: {\n type: [String, Number],\n },\n ...useAriaProps(['ariaLabel']),\n} as const)\n\nexport type SwitchProps = ExtractPropTypes<typeof switchProps>\n\nexport const switchEmits = {\n [UPDATE_MODEL_EVENT]: (val: boolean | string | number) =>\n isBoolean(val) || isString(val) || isNumber(val),\n [CHANGE_EVENT]: (val: boolean | string | number) =>\n isBoolean(val) || isString(val) || isNumber(val),\n [INPUT_EVENT]: (val: boolean | string | number) =>\n isBoolean(val) || isString(val) || isNumber(val),\n}\nexport type SwitchEmits = typeof switchEmits\n\nexport type SwitchInstance = InstanceType<typeof Switch>\n"],"names":[],"mappings":";;;;;;;;;;;AAeY,MAAC,WAAW,GAAG,UAAU,CAAC;AACtC,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC;AACnC,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,OAAO,EAAE,OAAO;AAClB,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,SAAS,EAAE,oBAAoB;AACnC,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,YAAY,EAAE,OAAO;AACvB,EAAE,kBAAkB,EAAE;AACtB,IAAI,IAAI,EAAE,YAAY;AACtB,GAAG;AACH,EAAE,gBAAgB,EAAE;AACpB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,CAAC;AACjF,EAAE,CAAC,YAAY,GAAG,CAAC,GAAG,KAAK,SAAS,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC;AAC3E,EAAE,CAAC,WAAW,GAAG,CAAC,GAAG,KAAK,SAAS,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC;AAC1E;;;;"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { defineComponent, useSlots, computed, provide, getCurrentInstance, openBlock, createElementBlock, normalizeClass, unref, createBlock, withCtx, normalizeStyle, createElementVNode, toDisplayString } from 'vue';
|
1
|
+
import { defineComponent, useSlots, computed, provide, getCurrentInstance, openBlock, createElementBlock, normalizeClass, unref, createBlock, withCtx, normalizeStyle, renderSlot, createElementVNode, toDisplayString } from 'vue';
|
2
2
|
import '../../../hooks/index.mjs';
|
3
3
|
import '../../form/index.mjs';
|
4
4
|
import '../../virtual-list/index.mjs';
|
@@ -87,7 +87,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
87
87
|
scrollTo
|
88
88
|
});
|
89
89
|
return (_ctx, _cache) => {
|
90
|
-
var _a;
|
91
90
|
return openBlock(), createElementBlock("div", {
|
92
91
|
class: normalizeClass([unref(ns).b(), { [unref(ns).m("highlight-current")]: _ctx.highlightCurrent }]),
|
93
92
|
role: "tree"
|
@@ -127,9 +126,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
127
126
|
key: 1,
|
128
127
|
class: normalizeClass(unref(ns).e("empty-block"))
|
129
128
|
}, [
|
130
|
-
|
131
|
-
|
132
|
-
|
129
|
+
renderSlot(_ctx.$slots, "empty", {}, () => {
|
130
|
+
var _a;
|
131
|
+
return [
|
132
|
+
createElementVNode("span", {
|
133
|
+
class: normalizeClass(unref(ns).e("empty-text"))
|
134
|
+
}, toDisplayString((_a = _ctx.emptyText) != null ? _a : unref(t)("el.tree.emptyText")), 3)
|
135
|
+
];
|
136
|
+
})
|
133
137
|
], 2))
|
134
138
|
], 2);
|
135
139
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"tree.mjs","sources":["../../../../../../packages/components/tree-v2/src/tree.vue"],"sourcesContent":["<template>\n <div\n :class=\"[ns.b(), { [ns.m('highlight-current')]: highlightCurrent }]\"\n role=\"tree\"\n >\n <fixed-size-list\n v-if=\"isNotEmpty\"\n ref=\"listRef\"\n :class-name=\"ns.b('virtual-list')\"\n :data=\"flattenTree\"\n :total=\"flattenTree.length\"\n :height=\"height\"\n :item-size=\"treeNodeSize\"\n :perf-mode=\"perfMode\"\n >\n <template #default=\"{ data, index, style }\">\n <el-tree-node\n :key=\"data[index].key\"\n :style=\"style\"\n :node=\"data[index]\"\n :expanded=\"isExpanded(data[index])\"\n :show-checkbox=\"showCheckbox\"\n :checked=\"isChecked(data[index])\"\n :indeterminate=\"isIndeterminate(data[index])\"\n :item-size=\"treeNodeSize\"\n :disabled=\"isDisabled(data[index])\"\n :current=\"isCurrent(data[index])\"\n :hidden-expand-icon=\"isForceHiddenExpandIcon(data[index])\"\n @click=\"handleNodeClick\"\n @toggle=\"toggleExpand\"\n @check=\"handleNodeCheck\"\n @drop=\"handleNodeDrop\"\n />\n </template>\n </fixed-size-list>\n <div v-else :class=\"ns.e('empty-block')\">\n <span :class=\"ns.e('empty-text')\"
|
1
|
+
{"version":3,"file":"tree.mjs","sources":["../../../../../../packages/components/tree-v2/src/tree.vue"],"sourcesContent":["<template>\n <div\n :class=\"[ns.b(), { [ns.m('highlight-current')]: highlightCurrent }]\"\n role=\"tree\"\n >\n <fixed-size-list\n v-if=\"isNotEmpty\"\n ref=\"listRef\"\n :class-name=\"ns.b('virtual-list')\"\n :data=\"flattenTree\"\n :total=\"flattenTree.length\"\n :height=\"height\"\n :item-size=\"treeNodeSize\"\n :perf-mode=\"perfMode\"\n >\n <template #default=\"{ data, index, style }\">\n <el-tree-node\n :key=\"data[index].key\"\n :style=\"style\"\n :node=\"data[index]\"\n :expanded=\"isExpanded(data[index])\"\n :show-checkbox=\"showCheckbox\"\n :checked=\"isChecked(data[index])\"\n :indeterminate=\"isIndeterminate(data[index])\"\n :item-size=\"treeNodeSize\"\n :disabled=\"isDisabled(data[index])\"\n :current=\"isCurrent(data[index])\"\n :hidden-expand-icon=\"isForceHiddenExpandIcon(data[index])\"\n @click=\"handleNodeClick\"\n @toggle=\"toggleExpand\"\n @check=\"handleNodeCheck\"\n @drop=\"handleNodeDrop\"\n />\n </template>\n </fixed-size-list>\n <div v-else :class=\"ns.e('empty-block')\">\n <slot name=\"empty\">\n <span :class=\"ns.e('empty-text')\">\n {{ emptyText ?? t('el.tree.emptyText') }}\n </span>\n </slot>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, getCurrentInstance, provide, useSlots } from 'vue'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { formItemContextKey } from '@element-plus/components/form'\nimport { FixedSizeList } from '@element-plus/components/virtual-list'\nimport { useTree } from './composables/useTree'\nimport ElTreeNode from './tree-node.vue'\nimport { ROOT_TREE_INJECTION_KEY, treeEmits, treeProps } from './virtual-tree'\n\ndefineOptions({\n name: 'ElTreeV2',\n})\n\nconst props = defineProps(treeProps)\nconst emit = defineEmits(treeEmits)\n\nconst slots = useSlots()\n\nconst treeNodeSize = computed(() => props.itemSize)\n\nprovide(ROOT_TREE_INJECTION_KEY, {\n ctx: {\n emit,\n slots,\n },\n props,\n instance: getCurrentInstance()!,\n})\nprovide(formItemContextKey, undefined)\nconst { t } = useLocale()\nconst ns = useNamespace('tree')\nconst {\n flattenTree,\n isNotEmpty,\n listRef,\n toggleExpand,\n isExpanded,\n isIndeterminate,\n isChecked,\n isDisabled,\n isCurrent,\n isForceHiddenExpandIcon,\n handleNodeClick,\n handleNodeDrop,\n handleNodeCheck,\n // expose\n toggleCheckbox,\n getCurrentNode,\n getCurrentKey,\n setCurrentKey,\n getCheckedKeys,\n getCheckedNodes,\n getHalfCheckedKeys,\n getHalfCheckedNodes,\n setChecked,\n setCheckedKeys,\n filter,\n setData,\n getNode,\n expandNode,\n collapseNode,\n setExpandedKeys,\n scrollToNode,\n scrollTo,\n} = useTree(props, emit)\n\ndefineExpose({\n toggleCheckbox,\n getCurrentNode,\n getCurrentKey,\n setCurrentKey,\n getCheckedKeys,\n getCheckedNodes,\n getHalfCheckedKeys,\n getHalfCheckedNodes,\n setChecked,\n setCheckedKeys,\n filter,\n setData,\n getNode,\n expandNode,\n collapseNode,\n setExpandedKeys,\n scrollToNode,\n scrollTo,\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;mCAsDc,CAAA;AAAA,EACZ,IAAM,EAAA,UAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AAEvB,IAAA,MAAM,YAAe,GAAA,QAAA,CAAS,MAAM,KAAA,CAAM,QAAQ,CAAA,CAAA;AAElD,IAAA,OAAA,CAAQ,uBAAyB,EAAA;AAAA,MAC/B,GAAK,EAAA;AAAA,QACH,IAAA;AAAA,QACA,KAAA;AAAA,OACF;AAAA,MACA,KAAA;AAAA,MACA,UAAU,kBAAmB,EAAA;AAAA,KAC9B,CAAA,CAAA;AACD,IAAA,OAAA,CAAQ,oBAAoB,KAAS,CAAA,CAAA,CAAA;AACrC,IAAM,MAAA,EAAE,CAAE,EAAA,GAAI,SAAU,EAAA,CAAA;AACxB,IAAM,MAAA,EAAA,GAAK,aAAa,MAAM,CAAA,CAAA;AAC9B,IAAM,MAAA;AAAA,MACJ,WAAA;AAAA,MACA,UAAA;AAAA,MACA,OAAA;AAAA,MACA,YAAA;AAAA,MACA,UAAA;AAAA,MACA,eAAA;AAAA,MACA,SAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,MACA,uBAAA;AAAA,MACA,eAAA;AAAA,MACA,cAAA;AAAA,MACA,eAAA;AAAA,MAAA,cAAA;AAAA,MAEA,cAAA;AAAA,MACA,aAAA;AAAA,MACA,aAAA;AAAA,MACA,cAAA;AAAA,MACA,eAAA;AAAA,MACA,kBAAA;AAAA,MACA,mBAAA;AAAA,MACA,UAAA;AAAA,MACA,cAAA;AAAA,MACA,MAAA;AAAA,MACA,OAAA;AAAA,MACA,OAAA;AAAA,MACA,UAAA;AAAA,MACA,YAAA;AAAA,MACA,eAAA;AAAA,MACA,YAAA;AAAA,MACA,QAAA;AAAA,KACA,GAAA,OAAA,CAAA,KAAA,EAAA,IAAA,CAAA,CAAA;AAAA,IACF,MAAY,CAAA;AAEZ,MAAa,cAAA;AAAA,MACX,cAAA;AAAA,MACA,aAAA;AAAA,MACA,aAAA;AAAA,MACA,cAAA;AAAA,MACA,eAAA;AAAA,MACA,kBAAA;AAAA,MACA,mBAAA;AAAA,MACA,UAAA;AAAA,MACA,cAAA;AAAA,MACA,MAAA;AAAA,MACA,OAAA;AAAA,MACA,OAAA;AAAA,MACA,UAAA;AAAA,MACA,YAAA;AAAA,MACA,eAAA;AAAA,MACA,YAAA;AAAA,MACA,QAAA;AAAA,KACA,CAAA,CAAA;AAAA,IACF,OAAC,CAAA,IAAA,EAAA,MAAA,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -1,4 +1,7 @@
|
|
1
|
-
declare
|
1
|
+
declare function __VLS_template(): {
|
2
|
+
empty?(_: {}): any;
|
3
|
+
};
|
4
|
+
declare const __VLS_component: import("vue").DefineComponent<{
|
2
5
|
readonly data: import("@element-plus/nightly/es/utils").EpPropFinalized<(new (...args: any[]) => import("./types").TreeData) | (() => import("./types").TreeData) | ((new (...args: any[]) => import("./types").TreeData) | (() => import("./types").TreeData))[], unknown, unknown, () => [], boolean>;
|
3
6
|
readonly emptyText: {
|
4
7
|
readonly type: import("vue").PropType<string>;
|
@@ -141,4 +144,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
141
144
|
readonly checkOnClickNode: import("@element-plus/nightly/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
142
145
|
readonly highlightCurrent: import("@element-plus/nightly/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
143
146
|
}>;
|
147
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
144
148
|
export default _default;
|
149
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
150
|
+
new (): {
|
151
|
+
$slots: S;
|
152
|
+
};
|
153
|
+
};
|
package/es/index.mjs
CHANGED
@@ -16,7 +16,7 @@ export { avatarEmits, avatarProps } from './components/avatar/src/avatar.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
|
-
export { badgeProps } from './components/badge/src/
|
19
|
+
export { badgeProps } from './components/badge/src/badge.mjs';
|
20
20
|
export { ElBadge } from './components/badge/index.mjs';
|
21
21
|
export { breadcrumbProps } from './components/breadcrumb/src/breadcrumb.mjs';
|
22
22
|
export { breadcrumbItemProps } from './components/breadcrumb/src/breadcrumb-item.mjs';
|
@@ -100,7 +100,7 @@ export { linkEmits, linkProps } from './components/link/src/link.mjs';
|
|
100
100
|
export { ElLink } from './components/link/index.mjs';
|
101
101
|
export { menuEmits, menuProps } from './components/menu/src/menu.mjs';
|
102
102
|
export { menuItemEmits, menuItemProps } from './components/menu/src/menu-item.mjs';
|
103
|
-
export { menuItemGroupProps } from './components/menu/src/menu-item-
|
103
|
+
export { menuItemGroupProps } from './components/menu/src/menu-item-group.mjs';
|
104
104
|
export { subMenuProps } from './components/menu/src/sub-menu.mjs';
|
105
105
|
export { ElMenu, ElMenuItem, ElMenuItemGroup, ElSubMenu } from './components/menu/index.mjs';
|
106
106
|
export { overlayEmits, overlayProps } from './components/overlay/src/overlay.mjs';
|
@@ -110,7 +110,7 @@ export { ElPageHeader } from './components/page-header/index.mjs';
|
|
110
110
|
export { paginationEmits, paginationProps } from './components/pagination/src/pagination.mjs';
|
111
111
|
export { elPaginationKey } from './components/pagination/src/constants.mjs';
|
112
112
|
export { ElPagination } from './components/pagination/index.mjs';
|
113
|
-
export { popconfirmEmits, popconfirmProps } from './components/popconfirm/src/
|
113
|
+
export { popconfirmEmits, popconfirmProps } from './components/popconfirm/src/popconfirm.mjs';
|
114
114
|
export { ElPopconfirm } from './components/popconfirm/index.mjs';
|
115
115
|
export { Effect, popperProps, roleTypes, usePopperProps } from './components/popper/src/popper.mjs';
|
116
116
|
export { popperTriggerProps, usePopperTriggerProps } from './components/popper/src/trigger.mjs';
|
@@ -154,12 +154,12 @@ export { spaceProps } from './components/space/src/space.mjs';
|
|
154
154
|
export { spaceItemProps } from './components/space/src/item.mjs';
|
155
155
|
export { useSpace } from './components/space/src/use-space.mjs';
|
156
156
|
export { ElSpace } from './components/space/index.mjs';
|
157
|
-
export { statisticProps } from './components/statistic/src/
|
157
|
+
export { statisticProps } from './components/statistic/src/statistic.mjs';
|
158
158
|
export { ElStatistic } from './components/statistic/index.mjs';
|
159
159
|
export { stepProps } from './components/steps/src/item.mjs';
|
160
160
|
export { stepsEmits, stepsProps } from './components/steps/src/steps.mjs';
|
161
161
|
export { ElStep, ElSteps } from './components/steps/index.mjs';
|
162
|
-
export { switchEmits, switchProps } from './components/switch/src/
|
162
|
+
export { switchEmits, switchProps } from './components/switch/src/switch2.mjs';
|
163
163
|
export { ElSwitch } from './components/switch/index.mjs';
|
164
164
|
export { ElTable, ElTableColumn } from './components/table/index.mjs';
|
165
165
|
export { Alignment as TableV2Alignment, FixedDir as TableV2FixedDir, SortOrder as TableV2SortOrder } from './components/table-v2/src/constants.mjs';
|
@@ -216,7 +216,7 @@ export { tourEmits, tourProps } from './components/tour/src/tour.mjs';
|
|
216
216
|
export { tourStepEmits, tourStepProps } from './components/tour/src/step.mjs';
|
217
217
|
export { tourContentEmits, tourContentProps, tourPlacements, tourStrategies } from './components/tour/src/content.mjs';
|
218
218
|
export { ElTour, ElTourStep } from './components/tour/index.mjs';
|
219
|
-
export { anchorEmits, anchorProps } from './components/anchor/src/
|
219
|
+
export { anchorEmits, anchorProps } from './components/anchor/src/anchor.mjs';
|
220
220
|
export { ElAnchor, ElAnchorLink } from './components/anchor/index.mjs';
|
221
221
|
export { segmentedEmits, segmentedProps } from './components/segmented/src/segmented.mjs';
|
222
222
|
export { ElSegmented } from './components/segmented/index.mjs';
|
package/es/version.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export declare const version = "0.0.
|
1
|
+
export declare const version = "0.0.20241121";
|
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.20241121'\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"}
|
@@ -3,9 +3,9 @@
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
5
|
require('../../utils/index.js');
|
6
|
-
var anchor$1 = require('./src/
|
6
|
+
var anchor$1 = require('./src/anchor2.js');
|
7
7
|
var anchorLink = require('./src/anchor-link2.js');
|
8
|
-
var anchor = require('./src/
|
8
|
+
var anchor = require('./src/anchor.js');
|
9
9
|
var install = require('../../utils/vue/install.js');
|
10
10
|
|
11
11
|
const ElAnchor = install.withInstall(anchor$1["default"], {
|