@element-plus/nightly 0.0.20240912 → 0.0.20240913
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/README.md +1 -1
- package/dist/index.full.js +42 -13
- package/dist/index.full.min.js +11 -11
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +11 -11
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +42 -13
- 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/autocomplete/src/autocomplete.mjs +1 -1
- package/es/components/breadcrumb/index.mjs +2 -2
- package/es/components/breadcrumb/src/breadcrumb-item.mjs +9 -57
- package/es/components/breadcrumb/src/breadcrumb-item.mjs.map +1 -1
- package/es/components/breadcrumb/src/breadcrumb-item2.mjs +57 -9
- package/es/components/breadcrumb/src/breadcrumb-item2.mjs.map +1 -1
- package/es/components/cascader/src/cascader.mjs +1 -1
- package/es/components/cascader/src/cascader2.mjs +7 -2
- package/es/components/cascader/src/cascader2.mjs.map +1 -1
- package/es/components/cascader-panel/src/index.mjs +7 -2
- package/es/components/cascader-panel/src/index.mjs.map +1 -1
- package/es/components/cascader-panel/src/menu.mjs +7 -3
- package/es/components/cascader-panel/src/menu.mjs.map +1 -1
- package/es/components/color-picker/src/color-picker.mjs +1 -1
- package/es/components/dropdown/src/dropdown.mjs +1 -1
- package/es/components/index.mjs +3 -3
- package/es/components/popconfirm/src/popconfirm.mjs +1 -1
- package/es/components/popover/src/popover.mjs +1 -1
- package/es/components/segmented/index.mjs +2 -2
- package/es/components/segmented/src/segmented.mjs +30 -158
- package/es/components/segmented/src/segmented.mjs.map +1 -1
- package/es/components/segmented/src/segmented2.mjs +158 -30
- package/es/components/segmented/src/segmented2.mjs.map +1 -1
- package/es/components/segmented/src/types.d.ts +1 -1
- package/es/components/select/src/select.mjs +1 -1
- package/es/components/select-v2/src/defaults.mjs +1 -1
- package/es/components/table/src/store/watcher.mjs +21 -5
- package/es/components/table/src/store/watcher.mjs.map +1 -1
- package/es/components/table/src/table/utils-helper.d.ts +1 -1
- package/es/components/table/src/table/utils-helper.mjs +2 -2
- package/es/components/table/src/table/utils-helper.mjs.map +1 -1
- package/es/components/table/src/table.vue.d.ts +1 -1
- package/es/components/tooltip/index.mjs +1 -1
- package/es/components/tooltip/src/content.mjs +29 -183
- package/es/components/tooltip/src/content.mjs.map +1 -1
- package/es/components/tooltip/src/content2.mjs +183 -29
- package/es/components/tooltip/src/content2.mjs.map +1 -1
- package/es/components/tooltip/src/tooltip.mjs +1 -1
- package/es/components/tooltip/src/tooltip2.mjs +1 -1
- package/es/index.mjs +3 -3
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/autocomplete/src/autocomplete.js +1 -1
- package/lib/components/breadcrumb/index.js +2 -2
- package/lib/components/breadcrumb/src/breadcrumb-item.js +9 -57
- package/lib/components/breadcrumb/src/breadcrumb-item.js.map +1 -1
- package/lib/components/breadcrumb/src/breadcrumb-item2.js +57 -9
- package/lib/components/breadcrumb/src/breadcrumb-item2.js.map +1 -1
- package/lib/components/cascader/src/cascader.js +1 -1
- package/lib/components/cascader/src/cascader2.js +6 -1
- package/lib/components/cascader/src/cascader2.js.map +1 -1
- package/lib/components/cascader-panel/src/index.js +6 -1
- package/lib/components/cascader-panel/src/index.js.map +1 -1
- package/lib/components/cascader-panel/src/menu.js +6 -2
- package/lib/components/cascader-panel/src/menu.js.map +1 -1
- package/lib/components/color-picker/src/color-picker.js +1 -1
- package/lib/components/dropdown/src/dropdown.js +1 -1
- package/lib/components/index.js +3 -3
- package/lib/components/popconfirm/src/popconfirm.js +1 -1
- package/lib/components/popover/src/popover.js +1 -1
- package/lib/components/segmented/index.js +2 -2
- package/lib/components/segmented/src/segmented.js +30 -157
- package/lib/components/segmented/src/segmented.js.map +1 -1
- package/lib/components/segmented/src/segmented2.js +157 -30
- package/lib/components/segmented/src/segmented2.js.map +1 -1
- package/lib/components/segmented/src/types.d.ts +1 -1
- package/lib/components/select/src/select.js +1 -1
- package/lib/components/select-v2/src/defaults.js +1 -1
- package/lib/components/table/src/store/watcher.js +21 -5
- package/lib/components/table/src/store/watcher.js.map +1 -1
- package/lib/components/table/src/table/utils-helper.d.ts +1 -1
- package/lib/components/table/src/table/utils-helper.js +2 -2
- package/lib/components/table/src/table/utils-helper.js.map +1 -1
- package/lib/components/table/src/table.vue.d.ts +1 -1
- package/lib/components/tooltip/index.js +1 -1
- package/lib/components/tooltip/src/content.js +29 -183
- package/lib/components/tooltip/src/content.js.map +1 -1
- package/lib/components/tooltip/src/content2.js +183 -29
- package/lib/components/tooltip/src/content2.js.map +1 -1
- package/lib/components/tooltip/src/tooltip.js +1 -1
- package/lib/components/tooltip/src/tooltip2.js +1 -1
- package/lib/index.js +3 -3
- 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,35 +1,189 @@
|
|
|
1
|
+
import { defineComponent, ref, inject, computed, onBeforeUnmount, unref, watch, openBlock, createBlock, withCtx, createVNode, Transition, withDirectives, mergeProps, renderSlot, vShow, createCommentVNode } from 'vue';
|
|
2
|
+
import { onClickOutside } from '@vueuse/core';
|
|
3
|
+
import '../../../hooks/index.mjs';
|
|
1
4
|
import '../../../utils/index.mjs';
|
|
2
5
|
import '../../popper/index.mjs';
|
|
3
|
-
import '
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
6
|
+
import { ElTeleport } from '../../teleport/index.mjs';
|
|
7
|
+
import { TOOLTIP_INJECTION_KEY } from './constants.mjs';
|
|
8
|
+
import { useTooltipContentProps } from './content.mjs';
|
|
9
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
10
|
+
import { usePopperContainerId } from '../../../hooks/use-popper-container/index.mjs';
|
|
11
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
12
|
+
import { composeEventHandlers } from '../../../utils/dom/event.mjs';
|
|
13
|
+
import ElPopperContent from '../../popper/src/content2.mjs';
|
|
8
14
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
15
|
+
const __default__ = defineComponent({
|
|
16
|
+
name: "ElTooltipContent",
|
|
17
|
+
inheritAttrs: false
|
|
18
|
+
});
|
|
19
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
20
|
+
...__default__,
|
|
21
|
+
props: useTooltipContentProps,
|
|
22
|
+
setup(__props, { expose }) {
|
|
23
|
+
const props = __props;
|
|
24
|
+
const { selector } = usePopperContainerId();
|
|
25
|
+
const ns = useNamespace("tooltip");
|
|
26
|
+
const contentRef = ref(null);
|
|
27
|
+
let stopHandle;
|
|
28
|
+
const {
|
|
29
|
+
controlled,
|
|
30
|
+
id,
|
|
31
|
+
open,
|
|
32
|
+
trigger,
|
|
33
|
+
onClose,
|
|
34
|
+
onOpen,
|
|
35
|
+
onShow,
|
|
36
|
+
onHide,
|
|
37
|
+
onBeforeShow,
|
|
38
|
+
onBeforeHide
|
|
39
|
+
} = inject(TOOLTIP_INJECTION_KEY, void 0);
|
|
40
|
+
const transitionClass = computed(() => {
|
|
41
|
+
return props.transition || `${ns.namespace.value}-fade-in-linear`;
|
|
42
|
+
});
|
|
43
|
+
const persistentRef = computed(() => {
|
|
44
|
+
if (process.env.NODE_ENV === "test") {
|
|
45
|
+
return true;
|
|
46
|
+
}
|
|
47
|
+
return props.persistent;
|
|
48
|
+
});
|
|
49
|
+
onBeforeUnmount(() => {
|
|
50
|
+
stopHandle == null ? void 0 : stopHandle();
|
|
51
|
+
});
|
|
52
|
+
const shouldRender = computed(() => {
|
|
53
|
+
return unref(persistentRef) ? true : unref(open);
|
|
54
|
+
});
|
|
55
|
+
const shouldShow = computed(() => {
|
|
56
|
+
return props.disabled ? false : unref(open);
|
|
57
|
+
});
|
|
58
|
+
const appendTo = computed(() => {
|
|
59
|
+
return props.appendTo || selector.value;
|
|
60
|
+
});
|
|
61
|
+
const contentStyle = computed(() => {
|
|
62
|
+
var _a;
|
|
63
|
+
return (_a = props.style) != null ? _a : {};
|
|
64
|
+
});
|
|
65
|
+
const ariaHidden = ref(true);
|
|
66
|
+
const onTransitionLeave = () => {
|
|
67
|
+
onHide();
|
|
68
|
+
ariaHidden.value = true;
|
|
69
|
+
};
|
|
70
|
+
const stopWhenControlled = () => {
|
|
71
|
+
if (unref(controlled))
|
|
72
|
+
return true;
|
|
73
|
+
};
|
|
74
|
+
const onContentEnter = composeEventHandlers(stopWhenControlled, () => {
|
|
75
|
+
if (props.enterable && unref(trigger) === "hover") {
|
|
76
|
+
onOpen();
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
const onContentLeave = composeEventHandlers(stopWhenControlled, () => {
|
|
80
|
+
if (unref(trigger) === "hover") {
|
|
81
|
+
onClose();
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
const onBeforeEnter = () => {
|
|
85
|
+
var _a, _b;
|
|
86
|
+
(_b = (_a = contentRef.value) == null ? void 0 : _a.updatePopper) == null ? void 0 : _b.call(_a);
|
|
87
|
+
onBeforeShow == null ? void 0 : onBeforeShow();
|
|
88
|
+
};
|
|
89
|
+
const onBeforeLeave = () => {
|
|
90
|
+
onBeforeHide == null ? void 0 : onBeforeHide();
|
|
91
|
+
};
|
|
92
|
+
const onAfterShow = () => {
|
|
93
|
+
onShow();
|
|
94
|
+
stopHandle = onClickOutside(computed(() => {
|
|
95
|
+
var _a;
|
|
96
|
+
return (_a = contentRef.value) == null ? void 0 : _a.popperContentRef;
|
|
97
|
+
}), () => {
|
|
98
|
+
if (unref(controlled))
|
|
99
|
+
return;
|
|
100
|
+
const $trigger = unref(trigger);
|
|
101
|
+
if ($trigger !== "hover") {
|
|
102
|
+
onClose();
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
};
|
|
106
|
+
const onBlur = () => {
|
|
107
|
+
if (!props.virtualTriggering) {
|
|
108
|
+
onClose();
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
watch(() => unref(open), (val) => {
|
|
112
|
+
if (!val) {
|
|
113
|
+
stopHandle == null ? void 0 : stopHandle();
|
|
114
|
+
} else {
|
|
115
|
+
ariaHidden.value = false;
|
|
116
|
+
}
|
|
117
|
+
}, {
|
|
118
|
+
flush: "post"
|
|
119
|
+
});
|
|
120
|
+
watch(() => props.content, () => {
|
|
121
|
+
var _a, _b;
|
|
122
|
+
(_b = (_a = contentRef.value) == null ? void 0 : _a.updatePopper) == null ? void 0 : _b.call(_a);
|
|
123
|
+
});
|
|
124
|
+
expose({
|
|
125
|
+
contentRef
|
|
126
|
+
});
|
|
127
|
+
return (_ctx, _cache) => {
|
|
128
|
+
return openBlock(), createBlock(unref(ElTeleport), {
|
|
129
|
+
disabled: !_ctx.teleported,
|
|
130
|
+
to: unref(appendTo)
|
|
131
|
+
}, {
|
|
132
|
+
default: withCtx(() => [
|
|
133
|
+
createVNode(Transition, {
|
|
134
|
+
name: unref(transitionClass),
|
|
135
|
+
onAfterLeave: onTransitionLeave,
|
|
136
|
+
onBeforeEnter,
|
|
137
|
+
onAfterEnter: onAfterShow,
|
|
138
|
+
onBeforeLeave
|
|
139
|
+
}, {
|
|
140
|
+
default: withCtx(() => [
|
|
141
|
+
unref(shouldRender) ? withDirectives((openBlock(), createBlock(unref(ElPopperContent), mergeProps({
|
|
142
|
+
key: 0,
|
|
143
|
+
id: unref(id),
|
|
144
|
+
ref_key: "contentRef",
|
|
145
|
+
ref: contentRef
|
|
146
|
+
}, _ctx.$attrs, {
|
|
147
|
+
"aria-label": _ctx.ariaLabel,
|
|
148
|
+
"aria-hidden": ariaHidden.value,
|
|
149
|
+
"boundaries-padding": _ctx.boundariesPadding,
|
|
150
|
+
"fallback-placements": _ctx.fallbackPlacements,
|
|
151
|
+
"gpu-acceleration": _ctx.gpuAcceleration,
|
|
152
|
+
offset: _ctx.offset,
|
|
153
|
+
placement: _ctx.placement,
|
|
154
|
+
"popper-options": _ctx.popperOptions,
|
|
155
|
+
strategy: _ctx.strategy,
|
|
156
|
+
effect: _ctx.effect,
|
|
157
|
+
enterable: _ctx.enterable,
|
|
158
|
+
pure: _ctx.pure,
|
|
159
|
+
"popper-class": _ctx.popperClass,
|
|
160
|
+
"popper-style": [_ctx.popperStyle, unref(contentStyle)],
|
|
161
|
+
"reference-el": _ctx.referenceEl,
|
|
162
|
+
"trigger-target-el": _ctx.triggerTargetEl,
|
|
163
|
+
visible: unref(shouldShow),
|
|
164
|
+
"z-index": _ctx.zIndex,
|
|
165
|
+
onMouseenter: unref(onContentEnter),
|
|
166
|
+
onMouseleave: unref(onContentLeave),
|
|
167
|
+
onBlur,
|
|
168
|
+
onClose: unref(onClose)
|
|
169
|
+
}), {
|
|
170
|
+
default: withCtx(() => [
|
|
171
|
+
renderSlot(_ctx.$slots, "default")
|
|
172
|
+
]),
|
|
173
|
+
_: 3
|
|
174
|
+
}, 16, ["id", "aria-label", "aria-hidden", "boundaries-padding", "fallback-placements", "gpu-acceleration", "offset", "placement", "popper-options", "strategy", "effect", "enterable", "pure", "popper-class", "popper-style", "reference-el", "trigger-target-el", "visible", "z-index", "onMouseenter", "onMouseleave", "onClose"])), [
|
|
175
|
+
[vShow, unref(shouldShow)]
|
|
176
|
+
]) : createCommentVNode("v-if", true)
|
|
177
|
+
]),
|
|
178
|
+
_: 3
|
|
179
|
+
}, 8, ["name"])
|
|
180
|
+
]),
|
|
181
|
+
_: 3
|
|
182
|
+
}, 8, ["disabled", "to"]);
|
|
183
|
+
};
|
|
184
|
+
}
|
|
32
185
|
});
|
|
186
|
+
var ElTooltipContent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "content.vue"]]);
|
|
33
187
|
|
|
34
|
-
export {
|
|
188
|
+
export { ElTooltipContent as default };
|
|
35
189
|
//# sourceMappingURL=content2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content2.mjs","sources":["../../../../../../packages/components/tooltip/src/content.
|
|
1
|
+
{"version":3,"file":"content2.mjs","sources":["../../../../../../packages/components/tooltip/src/content.vue"],"sourcesContent":["<template>\n <el-teleport :disabled=\"!teleported\" :to=\"appendTo\">\n <transition\n :name=\"transitionClass\"\n @after-leave=\"onTransitionLeave\"\n @before-enter=\"onBeforeEnter\"\n @after-enter=\"onAfterShow\"\n @before-leave=\"onBeforeLeave\"\n >\n <el-popper-content\n v-if=\"shouldRender\"\n v-show=\"shouldShow\"\n :id=\"id\"\n ref=\"contentRef\"\n v-bind=\"$attrs\"\n :aria-label=\"ariaLabel\"\n :aria-hidden=\"ariaHidden\"\n :boundaries-padding=\"boundariesPadding\"\n :fallback-placements=\"fallbackPlacements\"\n :gpu-acceleration=\"gpuAcceleration\"\n :offset=\"offset\"\n :placement=\"placement\"\n :popper-options=\"popperOptions\"\n :strategy=\"strategy\"\n :effect=\"effect\"\n :enterable=\"enterable\"\n :pure=\"pure\"\n :popper-class=\"popperClass\"\n :popper-style=\"[popperStyle, contentStyle]\"\n :reference-el=\"referenceEl\"\n :trigger-target-el=\"triggerTargetEl\"\n :visible=\"shouldShow\"\n :z-index=\"zIndex\"\n @mouseenter=\"onContentEnter\"\n @mouseleave=\"onContentLeave\"\n @blur=\"onBlur\"\n @close=\"onClose\"\n >\n <slot />\n </el-popper-content>\n </transition>\n </el-teleport>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, inject, onBeforeUnmount, ref, unref, watch } from 'vue'\nimport { onClickOutside } from '@vueuse/core'\nimport { useNamespace, usePopperContainerId } from '@element-plus/hooks'\nimport { composeEventHandlers } from '@element-plus/utils'\nimport { ElPopperContent } from '@element-plus/components/popper'\nimport ElTeleport from '@element-plus/components/teleport'\nimport { TOOLTIP_INJECTION_KEY } from './constants'\nimport { useTooltipContentProps } from './content'\n\ndefineOptions({\n name: 'ElTooltipContent',\n inheritAttrs: false,\n})\n\nconst props = defineProps(useTooltipContentProps)\n\nconst { selector } = usePopperContainerId()\nconst ns = useNamespace('tooltip')\n// TODO any is temporary, replace with `InstanceType<typeof ElPopperContent> | null` later\nconst contentRef = ref<any>(null)\nlet stopHandle: ReturnType<typeof onClickOutside>\nconst {\n controlled,\n id,\n open,\n trigger,\n onClose,\n onOpen,\n onShow,\n onHide,\n onBeforeShow,\n onBeforeHide,\n} = inject(TOOLTIP_INJECTION_KEY, undefined)!\nconst transitionClass = computed(() => {\n return props.transition || `${ns.namespace.value}-fade-in-linear`\n})\nconst persistentRef = computed(() => {\n // For testing, we would always want the content to be rendered\n // to the DOM, so we need to return true here.\n if (process.env.NODE_ENV === 'test') {\n return true\n }\n return props.persistent\n})\n\nonBeforeUnmount(() => {\n stopHandle?.()\n})\n\nconst shouldRender = computed(() => {\n return unref(persistentRef) ? true : unref(open)\n})\n\nconst shouldShow = computed(() => {\n return props.disabled ? false : unref(open)\n})\n\nconst appendTo = computed(() => {\n return props.appendTo || selector.value\n})\n\nconst contentStyle = computed(() => (props.style ?? {}) as any)\n\nconst ariaHidden = ref(true)\n\nconst onTransitionLeave = () => {\n onHide()\n ariaHidden.value = true\n}\n\nconst stopWhenControlled = () => {\n if (unref(controlled)) return true\n}\n\nconst onContentEnter = composeEventHandlers(stopWhenControlled, () => {\n if (props.enterable && unref(trigger) === 'hover') {\n onOpen()\n }\n})\n\nconst onContentLeave = composeEventHandlers(stopWhenControlled, () => {\n if (unref(trigger) === 'hover') {\n onClose()\n }\n})\n\nconst onBeforeEnter = () => {\n contentRef.value?.updatePopper?.()\n onBeforeShow?.()\n}\n\nconst onBeforeLeave = () => {\n onBeforeHide?.()\n}\n\nconst onAfterShow = () => {\n onShow()\n stopHandle = onClickOutside(\n computed(() => {\n return contentRef.value?.popperContentRef\n }),\n () => {\n if (unref(controlled)) return\n const $trigger = unref(trigger)\n if ($trigger !== 'hover') {\n onClose()\n }\n }\n )\n}\n\nconst onBlur = () => {\n if (!props.virtualTriggering) {\n onClose()\n }\n}\n\nwatch(\n () => unref(open),\n (val) => {\n if (!val) {\n stopHandle?.()\n } else {\n ariaHidden.value = false\n }\n },\n {\n flush: 'post',\n }\n)\n\nwatch(\n () => props.content,\n () => {\n contentRef.value?.updatePopper?.()\n }\n)\n\ndefineExpose({\n /**\n * @description el-popper-content component instance\n */\n contentRef,\n})\n</script>\n"],"names":[],"mappings":"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"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '../../../utils/index.mjs';
|
|
2
2
|
import '../../../hooks/index.mjs';
|
|
3
3
|
import '../../popper/index.mjs';
|
|
4
|
-
import { useTooltipContentProps } from './
|
|
4
|
+
import { useTooltipContentProps } from './content.mjs';
|
|
5
5
|
import { useTooltipTriggerProps } from './trigger.mjs';
|
|
6
6
|
import { createModelToggleComposable } from '../../../hooks/use-model-toggle/index.mjs';
|
|
7
7
|
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
|
@@ -5,7 +5,7 @@ import '../../../hooks/index.mjs';
|
|
|
5
5
|
import { TOOLTIP_INJECTION_KEY } from './constants.mjs';
|
|
6
6
|
import { useTooltipProps, tooltipEmits, useTooltipModelToggle } from './tooltip.mjs';
|
|
7
7
|
import ElTooltipTrigger from './trigger2.mjs';
|
|
8
|
-
import ElTooltipContent from './
|
|
8
|
+
import ElTooltipContent from './content2.mjs';
|
|
9
9
|
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
10
10
|
import { usePopperContainer } from '../../../hooks/use-popper-container/index.mjs';
|
|
11
11
|
import { useId } from '../../../hooks/use-id/index.mjs';
|
package/es/index.mjs
CHANGED
|
@@ -19,7 +19,7 @@ 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
21
|
export { breadcrumbProps } from './components/breadcrumb/src/breadcrumb.mjs';
|
|
22
|
-
export { breadcrumbItemProps } from './components/breadcrumb/src/breadcrumb-
|
|
22
|
+
export { breadcrumbItemProps } from './components/breadcrumb/src/breadcrumb-item.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';
|
|
@@ -191,7 +191,7 @@ export { timelineItemProps } from './components/timeline/src/timeline-item.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';
|
|
194
|
-
export { useTooltipContentProps } from './components/tooltip/src/
|
|
194
|
+
export { useTooltipContentProps } from './components/tooltip/src/content.mjs';
|
|
195
195
|
export { TOOLTIP_INJECTION_KEY } from './components/tooltip/src/constants.mjs';
|
|
196
196
|
export { ElTooltip } from './components/tooltip/index.mjs';
|
|
197
197
|
export { LEFT_CHECK_CHANGE_EVENT, RIGHT_CHECK_CHANGE_EVENT, transferCheckedChangeFn, transferEmits, transferProps } from './components/transfer/src/transfer.mjs';
|
|
@@ -218,7 +218,7 @@ export { tourContentEmits, tourContentProps, tourPlacements, tourStrategies } fr
|
|
|
218
218
|
export { ElTour, ElTourStep } from './components/tour/index.mjs';
|
|
219
219
|
export { anchorEmits, anchorProps } from './components/anchor/src/anchor.mjs';
|
|
220
220
|
export { ElAnchor, ElAnchorLink } from './components/anchor/index.mjs';
|
|
221
|
-
export { segmentedEmits, segmentedProps } from './components/segmented/src/
|
|
221
|
+
export { segmentedEmits, segmentedProps } from './components/segmented/src/segmented.mjs';
|
|
222
222
|
export { ElSegmented } from './components/segmented/index.mjs';
|
|
223
223
|
export { mentionEmits, mentionProps } from './components/mention/src/mention.mjs';
|
|
224
224
|
export { ElMention } from './components/mention/index.mjs';
|
package/es/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "0.0.
|
|
1
|
+
export declare const version = "0.0.20240913";
|
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.20240913'\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"}
|
|
@@ -8,7 +8,7 @@ require('../../../hooks/index.js');
|
|
|
8
8
|
require('../../../constants/index.js');
|
|
9
9
|
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
10
10
|
var shared = require('@vue/shared');
|
|
11
|
-
var content = require('../../tooltip/src/
|
|
11
|
+
var content = require('../../tooltip/src/content.js');
|
|
12
12
|
var index = require('../../../hooks/use-aria/index.js');
|
|
13
13
|
var event = require('../../../constants/event.js');
|
|
14
14
|
|
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
require('../../utils/index.js');
|
|
6
6
|
var breadcrumb$1 = require('./src/breadcrumb2.js');
|
|
7
|
-
var breadcrumbItem$1 = require('./src/breadcrumb-
|
|
7
|
+
var breadcrumbItem$1 = require('./src/breadcrumb-item2.js');
|
|
8
8
|
var breadcrumb = require('./src/breadcrumb.js');
|
|
9
|
-
var breadcrumbItem = require('./src/breadcrumb-
|
|
9
|
+
var breadcrumbItem = require('./src/breadcrumb-item.js');
|
|
10
10
|
var constants = require('./src/constants.js');
|
|
11
11
|
var install = require('../../utils/vue/install.js');
|
|
12
12
|
|
|
@@ -2,64 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
var
|
|
7
|
-
require('../../../hooks/index.js');
|
|
8
|
-
var constants = require('./constants.js');
|
|
9
|
-
var breadcrumbItem = require('./breadcrumb-item2.js');
|
|
10
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
11
|
-
var index = require('../../../hooks/use-namespace/index.js');
|
|
5
|
+
require('../../../utils/index.js');
|
|
6
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
12
7
|
|
|
13
|
-
const
|
|
14
|
-
|
|
8
|
+
const breadcrumbItemProps = runtime.buildProps({
|
|
9
|
+
to: {
|
|
10
|
+
type: runtime.definePropType([String, Object]),
|
|
11
|
+
default: ""
|
|
12
|
+
},
|
|
13
|
+
replace: Boolean
|
|
15
14
|
});
|
|
16
|
-
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
17
|
-
...__default__,
|
|
18
|
-
props: breadcrumbItem.breadcrumbItemProps,
|
|
19
|
-
setup(__props) {
|
|
20
|
-
const props = __props;
|
|
21
|
-
const instance = vue.getCurrentInstance();
|
|
22
|
-
const breadcrumbContext = vue.inject(constants.breadcrumbKey, void 0);
|
|
23
|
-
const ns = index.useNamespace("breadcrumb");
|
|
24
|
-
const router = instance.appContext.config.globalProperties.$router;
|
|
25
|
-
const link = vue.ref();
|
|
26
|
-
const onClick = () => {
|
|
27
|
-
if (!props.to || !router)
|
|
28
|
-
return;
|
|
29
|
-
props.replace ? router.replace(props.to) : router.push(props.to);
|
|
30
|
-
};
|
|
31
|
-
return (_ctx, _cache) => {
|
|
32
|
-
var _a, _b;
|
|
33
|
-
return vue.openBlock(), vue.createElementBlock("span", {
|
|
34
|
-
class: vue.normalizeClass(vue.unref(ns).e("item"))
|
|
35
|
-
}, [
|
|
36
|
-
vue.createElementVNode("span", {
|
|
37
|
-
ref_key: "link",
|
|
38
|
-
ref: link,
|
|
39
|
-
class: vue.normalizeClass([vue.unref(ns).e("inner"), vue.unref(ns).is("link", !!_ctx.to)]),
|
|
40
|
-
role: "link",
|
|
41
|
-
onClick
|
|
42
|
-
}, [
|
|
43
|
-
vue.renderSlot(_ctx.$slots, "default")
|
|
44
|
-
], 2),
|
|
45
|
-
((_a = vue.unref(breadcrumbContext)) == null ? void 0 : _a.separatorIcon) ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), {
|
|
46
|
-
key: 0,
|
|
47
|
-
class: vue.normalizeClass(vue.unref(ns).e("separator"))
|
|
48
|
-
}, {
|
|
49
|
-
default: vue.withCtx(() => [
|
|
50
|
-
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(breadcrumbContext).separatorIcon)))
|
|
51
|
-
]),
|
|
52
|
-
_: 1
|
|
53
|
-
}, 8, ["class"])) : (vue.openBlock(), vue.createElementBlock("span", {
|
|
54
|
-
key: 1,
|
|
55
|
-
class: vue.normalizeClass(vue.unref(ns).e("separator")),
|
|
56
|
-
role: "presentation"
|
|
57
|
-
}, vue.toDisplayString((_b = vue.unref(breadcrumbContext)) == null ? void 0 : _b.separator), 3))
|
|
58
|
-
], 2);
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
var BreadcrumbItem = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "breadcrumb-item.vue"]]);
|
|
63
15
|
|
|
64
|
-
exports
|
|
16
|
+
exports.breadcrumbItemProps = breadcrumbItemProps;
|
|
65
17
|
//# sourceMappingURL=breadcrumb-item.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumb-item.js","sources":["../../../../../../packages/components/breadcrumb/src/breadcrumb-item.
|
|
1
|
+
{"version":3,"file":"breadcrumb-item.js","sources":["../../../../../../packages/components/breadcrumb/src/breadcrumb-item.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type { RouteLocationRaw } from 'vue-router'\n\nexport const breadcrumbItemProps = buildProps({\n /**\n * @description target route of the link, same as `to` of `vue-router`\n */\n to: {\n type: definePropType<RouteLocationRaw>([String, Object]),\n default: '',\n },\n /**\n * @description if `true`, the navigation will not leave a history record\n */\n replace: Boolean,\n} as const)\nexport type BreadcrumbItemProps = ExtractPropTypes<typeof breadcrumbItemProps>\n"],"names":["buildProps","definePropType"],"mappings":";;;;;;;AACY,MAAC,mBAAmB,GAAGA,kBAAU,CAAC;AAC9C,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAEC,sBAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,OAAO,EAAE,OAAO;AAClB,CAAC;;;;"}
|
|
@@ -2,16 +2,64 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
require('
|
|
6
|
-
var
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
var index$1 = require('../../icon/index.js');
|
|
7
|
+
require('../../../hooks/index.js');
|
|
8
|
+
var constants = require('./constants.js');
|
|
9
|
+
var breadcrumbItem = require('./breadcrumb-item.js');
|
|
10
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
11
|
+
var index = require('../../../hooks/use-namespace/index.js');
|
|
7
12
|
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
type: runtime.definePropType([String, Object]),
|
|
11
|
-
default: ""
|
|
12
|
-
},
|
|
13
|
-
replace: Boolean
|
|
13
|
+
const __default__ = vue.defineComponent({
|
|
14
|
+
name: "ElBreadcrumbItem"
|
|
14
15
|
});
|
|
16
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
17
|
+
...__default__,
|
|
18
|
+
props: breadcrumbItem.breadcrumbItemProps,
|
|
19
|
+
setup(__props) {
|
|
20
|
+
const props = __props;
|
|
21
|
+
const instance = vue.getCurrentInstance();
|
|
22
|
+
const breadcrumbContext = vue.inject(constants.breadcrumbKey, void 0);
|
|
23
|
+
const ns = index.useNamespace("breadcrumb");
|
|
24
|
+
const router = instance.appContext.config.globalProperties.$router;
|
|
25
|
+
const link = vue.ref();
|
|
26
|
+
const onClick = () => {
|
|
27
|
+
if (!props.to || !router)
|
|
28
|
+
return;
|
|
29
|
+
props.replace ? router.replace(props.to) : router.push(props.to);
|
|
30
|
+
};
|
|
31
|
+
return (_ctx, _cache) => {
|
|
32
|
+
var _a, _b;
|
|
33
|
+
return vue.openBlock(), vue.createElementBlock("span", {
|
|
34
|
+
class: vue.normalizeClass(vue.unref(ns).e("item"))
|
|
35
|
+
}, [
|
|
36
|
+
vue.createElementVNode("span", {
|
|
37
|
+
ref_key: "link",
|
|
38
|
+
ref: link,
|
|
39
|
+
class: vue.normalizeClass([vue.unref(ns).e("inner"), vue.unref(ns).is("link", !!_ctx.to)]),
|
|
40
|
+
role: "link",
|
|
41
|
+
onClick
|
|
42
|
+
}, [
|
|
43
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
44
|
+
], 2),
|
|
45
|
+
((_a = vue.unref(breadcrumbContext)) == null ? void 0 : _a.separatorIcon) ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), {
|
|
46
|
+
key: 0,
|
|
47
|
+
class: vue.normalizeClass(vue.unref(ns).e("separator"))
|
|
48
|
+
}, {
|
|
49
|
+
default: vue.withCtx(() => [
|
|
50
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(breadcrumbContext).separatorIcon)))
|
|
51
|
+
]),
|
|
52
|
+
_: 1
|
|
53
|
+
}, 8, ["class"])) : (vue.openBlock(), vue.createElementBlock("span", {
|
|
54
|
+
key: 1,
|
|
55
|
+
class: vue.normalizeClass(vue.unref(ns).e("separator")),
|
|
56
|
+
role: "presentation"
|
|
57
|
+
}, vue.toDisplayString((_b = vue.unref(breadcrumbContext)) == null ? void 0 : _b.separator), 3))
|
|
58
|
+
], 2);
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
var BreadcrumbItem = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "breadcrumb-item.vue"]]);
|
|
15
63
|
|
|
16
|
-
exports
|
|
64
|
+
exports["default"] = BreadcrumbItem;
|
|
17
65
|
//# sourceMappingURL=breadcrumb-item2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumb-item2.js","sources":["../../../../../../packages/components/breadcrumb/src/breadcrumb-item.
|
|
1
|
+
{"version":3,"file":"breadcrumb-item2.js","sources":["../../../../../../packages/components/breadcrumb/src/breadcrumb-item.vue"],"sourcesContent":["<template>\n <span :class=\"ns.e('item')\">\n <span\n ref=\"link\"\n :class=\"[ns.e('inner'), ns.is('link', !!to)]\"\n role=\"link\"\n @click=\"onClick\"\n >\n <slot />\n </span>\n <el-icon v-if=\"breadcrumbContext?.separatorIcon\" :class=\"ns.e('separator')\">\n <component :is=\"breadcrumbContext.separatorIcon\" />\n </el-icon>\n <span v-else :class=\"ns.e('separator')\" role=\"presentation\">\n {{ breadcrumbContext?.separator }}\n </span>\n </span>\n</template>\n\n<script lang=\"ts\" setup>\nimport { getCurrentInstance, inject, ref } from 'vue'\nimport ElIcon from '@element-plus/components/icon'\nimport { useNamespace } from '@element-plus/hooks'\nimport { breadcrumbKey } from './constants'\nimport { breadcrumbItemProps } from './breadcrumb-item'\n\nimport type { Router } from 'vue-router'\n\ndefineOptions({\n name: 'ElBreadcrumbItem',\n})\n\nconst props = defineProps(breadcrumbItemProps)\n\nconst instance = getCurrentInstance()!\nconst breadcrumbContext = inject(breadcrumbKey, undefined)\nconst ns = useNamespace('breadcrumb')\n\nconst router = instance.appContext.config.globalProperties.$router as Router\n\nconst link = ref<HTMLSpanElement>()\n\nconst onClick = () => {\n if (!props.to || !router) return\n props.replace ? router.replace(props.to) : router.push(props.to)\n}\n</script>\n"],"names":["getCurrentInstance","inject","breadcrumbKey","useNamespace","ref"],"mappings":";;;;;;;;;;;;uCA4Bc,CAAA;AAAA,EACZ,IAAM,EAAA,kBAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAIA,IAAA,MAAM,WAAWA,sBAAmB,EAAA,CAAA;AACpC,IAAM,MAAA,iBAAA,GAAoBC,UAAO,CAAAC,uBAAA,EAAe,KAAS,CAAA,CAAA,CAAA;AACzD,IAAM,MAAA,EAAA,GAAKC,mBAAa,YAAY,CAAA,CAAA;AAEpC,IAAA,MAAM,MAAS,GAAA,QAAA,CAAS,UAAW,CAAA,MAAA,CAAO,gBAAiB,CAAA,OAAA,CAAA;AAE3D,IAAA,MAAM,OAAOC,OAAqB,EAAA,CAAA;AAElC,IAAA,MAAM,UAAU,MAAM;AACpB,MAAI,IAAA,CAAC,KAAM,CAAA,EAAA,IAAM,CAAC,MAAA;AAAQ,QAAA,OAAA;AAC1B,MAAM,KAAA,CAAA,OAAA,GAAU,OAAO,OAAQ,CAAA,KAAA,CAAM,EAAE,CAAI,GAAA,MAAA,CAAO,IAAK,CAAA,KAAA,CAAM,EAAE,CAAA,CAAA;AAAA,KACjE,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -12,7 +12,7 @@ require('../../../constants/index.js');
|
|
|
12
12
|
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
13
13
|
var config = require('../../cascader-panel/src/config.js');
|
|
14
14
|
var index = require('../../../hooks/use-size/index.js');
|
|
15
|
-
var content = require('../../tooltip/src/
|
|
15
|
+
var content = require('../../tooltip/src/content.js');
|
|
16
16
|
var tag = require('../../tag/src/tag.js');
|
|
17
17
|
var index$1 = require('../../../hooks/use-empty-values/index.js');
|
|
18
18
|
var event = require('../../../constants/event.js');
|
|
@@ -580,7 +580,12 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
580
580
|
"render-label": _ctx.$slots.default,
|
|
581
581
|
onExpandChange: handleExpandChange,
|
|
582
582
|
onClose: ($event) => _ctx.$nextTick(() => togglePopperVisible(false))
|
|
583
|
-
},
|
|
583
|
+
}, {
|
|
584
|
+
empty: vue.withCtx(() => [
|
|
585
|
+
vue.renderSlot(_ctx.$slots, "empty")
|
|
586
|
+
]),
|
|
587
|
+
_: 3
|
|
588
|
+
}, 8, ["modelValue", "onUpdate:modelValue", "options", "props", "render-label", "onClose"]), [
|
|
584
589
|
[vue.vShow, !filtering.value]
|
|
585
590
|
]),
|
|
586
591
|
_ctx.filterable ? vue.withDirectives((vue.openBlock(), vue.createBlock(vue.unref(index$a.ElScrollbar), {
|