@element-plus/nightly 0.0.20231027 → 0.0.20231029
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/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/dist/index.full.js +5787 -351
- package/dist/index.full.min.js +56 -30
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +64 -38
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +5787 -351
- 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.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/sw.js +174 -0
- package/dist/locale/sw.min.js +2 -0
- package/dist/locale/sw.min.js.map +1 -0
- package/dist/locale/sw.min.mjs +2 -0
- package/dist/locale/sw.min.mjs.map +1 -0
- package/dist/locale/sw.mjs +166 -0
- 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/cascader/src/cascader.mjs +1 -1
- package/es/components/dialog/src/use-dialog.mjs +6 -4
- package/es/components/dialog/src/use-dialog.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown.mjs +1 -1
- package/es/components/index.mjs +1 -1
- package/es/components/popconfirm/src/popconfirm.mjs +1 -1
- package/es/components/popover/src/popover.mjs +1 -1
- package/es/components/rate/src/rate2.mjs +14 -10
- package/es/components/rate/src/rate2.mjs.map +1 -1
- package/es/components/select/src/select.mjs +1 -1
- package/es/components/select-v2/src/defaults.mjs +1 -1
- package/es/components/select-v2/src/useSelect.mjs +1 -1
- package/es/components/select-v2/src/useSelect.mjs.map +1 -1
- package/es/components/tooltip/index.mjs +1 -1
- package/es/components/tooltip/src/content.mjs +177 -31
- package/es/components/tooltip/src/content.mjs.map +1 -1
- package/es/components/tooltip/src/content2.mjs +31 -177
- 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/components/watermark/index.d.ts +2 -0
- package/es/components/watermark/src/useClips.mjs +11 -3
- package/es/components/watermark/src/useClips.mjs.map +1 -1
- package/es/components/watermark/src/watermark.d.ts +2 -0
- package/es/components/watermark/src/watermark.mjs.map +1 -1
- package/es/components/watermark/src/watermark.vue.d.ts +2 -0
- package/es/components/watermark/src/watermark2.mjs +11 -1
- package/es/components/watermark/src/watermark2.mjs.map +1 -1
- package/es/index.mjs +1 -1
- package/es/locale/lang/sw.d.ts +163 -0
- package/es/locale/lang/sw.mjs +165 -0
- package/es/locale/lang/sw.mjs.map +1 -0
- 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/cascader/src/cascader.js +1 -1
- package/lib/components/dialog/src/use-dialog.js +6 -4
- package/lib/components/dialog/src/use-dialog.js.map +1 -1
- package/lib/components/dropdown/src/dropdown.js +1 -1
- package/lib/components/index.js +1 -1
- package/lib/components/popconfirm/src/popconfirm.js +1 -1
- package/lib/components/popover/src/popover.js +1 -1
- package/lib/components/rate/src/rate2.js +14 -10
- package/lib/components/rate/src/rate2.js.map +1 -1
- package/lib/components/select/src/select.js +1 -1
- package/lib/components/select-v2/src/defaults.js +1 -1
- package/lib/components/select-v2/src/useSelect.js +1 -1
- package/lib/components/select-v2/src/useSelect.js.map +1 -1
- package/lib/components/tooltip/index.js +1 -1
- package/lib/components/tooltip/src/content.js +177 -31
- package/lib/components/tooltip/src/content.js.map +1 -1
- package/lib/components/tooltip/src/content2.js +31 -177
- 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/components/watermark/index.d.ts +2 -0
- package/lib/components/watermark/src/useClips.js +11 -3
- package/lib/components/watermark/src/useClips.js.map +1 -1
- package/lib/components/watermark/src/watermark.d.ts +2 -0
- package/lib/components/watermark/src/watermark.js.map +1 -1
- package/lib/components/watermark/src/watermark.vue.d.ts +2 -0
- package/lib/components/watermark/src/watermark2.js +11 -1
- package/lib/components/watermark/src/watermark2.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/locale/lang/sw.d.ts +163 -0
- package/lib/locale/lang/sw.js +169 -0
- package/lib/locale/lang/sw.js.map +1 -0
- 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/theme-chalk/el-rate.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/rate.scss +7 -0
- package/web-types.json +1 -1
|
@@ -1,37 +1,183 @@
|
|
|
1
|
+
import { defineComponent, ref, inject, computed, onBeforeUnmount, unref, watch, openBlock, createBlock, Teleport, createVNode, Transition, withCtx, withDirectives, mergeProps, renderSlot, createCommentVNode, vShow } 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 {
|
|
6
|
+
import { TOOLTIP_INJECTION_KEY } from './constants.mjs';
|
|
7
|
+
import { useTooltipContentProps } from './content2.mjs';
|
|
8
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
9
|
+
import { usePopperContainerId } from '../../../hooks/use-popper-container/index.mjs';
|
|
10
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
11
|
+
import { composeEventHandlers } from '../../../utils/dom/event.mjs';
|
|
12
|
+
import ElPopperContent from '../../popper/src/content2.mjs';
|
|
7
13
|
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
14
|
+
const __default__ = defineComponent({
|
|
15
|
+
name: "ElTooltipContent",
|
|
16
|
+
inheritAttrs: false
|
|
17
|
+
});
|
|
18
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
19
|
+
...__default__,
|
|
20
|
+
props: useTooltipContentProps,
|
|
21
|
+
setup(__props, { expose }) {
|
|
22
|
+
const props = __props;
|
|
23
|
+
const { selector } = usePopperContainerId();
|
|
24
|
+
const ns = useNamespace("tooltip");
|
|
25
|
+
const contentRef = ref(null);
|
|
26
|
+
const destroyed = ref(false);
|
|
27
|
+
const {
|
|
28
|
+
controlled,
|
|
29
|
+
id,
|
|
30
|
+
open,
|
|
31
|
+
trigger,
|
|
32
|
+
onClose,
|
|
33
|
+
onOpen,
|
|
34
|
+
onShow,
|
|
35
|
+
onHide,
|
|
36
|
+
onBeforeShow,
|
|
37
|
+
onBeforeHide
|
|
38
|
+
} = inject(TOOLTIP_INJECTION_KEY, void 0);
|
|
39
|
+
const transitionClass = computed(() => {
|
|
40
|
+
return props.transition || `${ns.namespace.value}-fade-in-linear`;
|
|
41
|
+
});
|
|
42
|
+
const persistentRef = computed(() => {
|
|
43
|
+
if (process.env.NODE_ENV === "test") {
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
46
|
+
return props.persistent;
|
|
47
|
+
});
|
|
48
|
+
onBeforeUnmount(() => {
|
|
49
|
+
destroyed.value = true;
|
|
50
|
+
});
|
|
51
|
+
const shouldRender = computed(() => {
|
|
52
|
+
return unref(persistentRef) ? true : unref(open);
|
|
53
|
+
});
|
|
54
|
+
const shouldShow = computed(() => {
|
|
55
|
+
return props.disabled ? false : unref(open);
|
|
56
|
+
});
|
|
57
|
+
const appendTo = computed(() => {
|
|
58
|
+
return props.appendTo || selector.value;
|
|
59
|
+
});
|
|
60
|
+
const contentStyle = computed(() => {
|
|
61
|
+
var _a;
|
|
62
|
+
return (_a = props.style) != null ? _a : {};
|
|
63
|
+
});
|
|
64
|
+
const ariaHidden = computed(() => !unref(open));
|
|
65
|
+
const onTransitionLeave = () => {
|
|
66
|
+
onHide();
|
|
67
|
+
};
|
|
68
|
+
const stopWhenControlled = () => {
|
|
69
|
+
if (unref(controlled))
|
|
70
|
+
return true;
|
|
71
|
+
};
|
|
72
|
+
const onContentEnter = composeEventHandlers(stopWhenControlled, () => {
|
|
73
|
+
if (props.enterable && unref(trigger) === "hover") {
|
|
74
|
+
onOpen();
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
const onContentLeave = composeEventHandlers(stopWhenControlled, () => {
|
|
78
|
+
if (unref(trigger) === "hover") {
|
|
79
|
+
onClose();
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
const onBeforeEnter = () => {
|
|
83
|
+
var _a, _b;
|
|
84
|
+
(_b = (_a = contentRef.value) == null ? void 0 : _a.updatePopper) == null ? void 0 : _b.call(_a);
|
|
85
|
+
onBeforeShow == null ? void 0 : onBeforeShow();
|
|
86
|
+
};
|
|
87
|
+
const onBeforeLeave = () => {
|
|
88
|
+
onBeforeHide == null ? void 0 : onBeforeHide();
|
|
89
|
+
};
|
|
90
|
+
const onAfterShow = () => {
|
|
91
|
+
onShow();
|
|
92
|
+
stopHandle = onClickOutside(computed(() => {
|
|
93
|
+
var _a;
|
|
94
|
+
return (_a = contentRef.value) == null ? void 0 : _a.popperContentRef;
|
|
95
|
+
}), () => {
|
|
96
|
+
if (unref(controlled))
|
|
97
|
+
return;
|
|
98
|
+
const $trigger = unref(trigger);
|
|
99
|
+
if ($trigger !== "hover") {
|
|
100
|
+
onClose();
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
};
|
|
104
|
+
const onBlur = () => {
|
|
105
|
+
if (!props.virtualTriggering) {
|
|
106
|
+
onClose();
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
let stopHandle;
|
|
110
|
+
watch(() => unref(open), (val) => {
|
|
111
|
+
if (!val) {
|
|
112
|
+
stopHandle == null ? void 0 : stopHandle();
|
|
113
|
+
}
|
|
114
|
+
}, {
|
|
115
|
+
flush: "post"
|
|
116
|
+
});
|
|
117
|
+
watch(() => props.content, () => {
|
|
118
|
+
var _a, _b;
|
|
119
|
+
(_b = (_a = contentRef.value) == null ? void 0 : _a.updatePopper) == null ? void 0 : _b.call(_a);
|
|
120
|
+
});
|
|
121
|
+
expose({
|
|
122
|
+
contentRef
|
|
123
|
+
});
|
|
124
|
+
return (_ctx, _cache) => {
|
|
125
|
+
return openBlock(), createBlock(Teleport, {
|
|
126
|
+
disabled: !_ctx.teleported,
|
|
127
|
+
to: unref(appendTo)
|
|
128
|
+
}, [
|
|
129
|
+
createVNode(Transition, {
|
|
130
|
+
name: unref(transitionClass),
|
|
131
|
+
onAfterLeave: onTransitionLeave,
|
|
132
|
+
onBeforeEnter,
|
|
133
|
+
onAfterEnter: onAfterShow,
|
|
134
|
+
onBeforeLeave
|
|
135
|
+
}, {
|
|
136
|
+
default: withCtx(() => [
|
|
137
|
+
unref(shouldRender) ? withDirectives((openBlock(), createBlock(unref(ElPopperContent), mergeProps({
|
|
138
|
+
key: 0,
|
|
139
|
+
id: unref(id),
|
|
140
|
+
ref_key: "contentRef",
|
|
141
|
+
ref: contentRef
|
|
142
|
+
}, _ctx.$attrs, {
|
|
143
|
+
"aria-label": _ctx.ariaLabel,
|
|
144
|
+
"aria-hidden": unref(ariaHidden),
|
|
145
|
+
"boundaries-padding": _ctx.boundariesPadding,
|
|
146
|
+
"fallback-placements": _ctx.fallbackPlacements,
|
|
147
|
+
"gpu-acceleration": _ctx.gpuAcceleration,
|
|
148
|
+
offset: _ctx.offset,
|
|
149
|
+
placement: _ctx.placement,
|
|
150
|
+
"popper-options": _ctx.popperOptions,
|
|
151
|
+
strategy: _ctx.strategy,
|
|
152
|
+
effect: _ctx.effect,
|
|
153
|
+
enterable: _ctx.enterable,
|
|
154
|
+
pure: _ctx.pure,
|
|
155
|
+
"popper-class": _ctx.popperClass,
|
|
156
|
+
"popper-style": [_ctx.popperStyle, unref(contentStyle)],
|
|
157
|
+
"reference-el": _ctx.referenceEl,
|
|
158
|
+
"trigger-target-el": _ctx.triggerTargetEl,
|
|
159
|
+
visible: unref(shouldShow),
|
|
160
|
+
"z-index": _ctx.zIndex,
|
|
161
|
+
onMouseenter: unref(onContentEnter),
|
|
162
|
+
onMouseleave: unref(onContentLeave),
|
|
163
|
+
onBlur,
|
|
164
|
+
onClose: unref(onClose)
|
|
165
|
+
}), {
|
|
166
|
+
default: withCtx(() => [
|
|
167
|
+
!destroyed.value ? renderSlot(_ctx.$slots, "default", { key: 0 }) : createCommentVNode("v-if", true)
|
|
168
|
+
]),
|
|
169
|
+
_: 3
|
|
170
|
+
}, 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"])), [
|
|
171
|
+
[vShow, unref(shouldShow)]
|
|
172
|
+
]) : createCommentVNode("v-if", true)
|
|
173
|
+
]),
|
|
174
|
+
_: 3
|
|
175
|
+
}, 8, ["name"])
|
|
176
|
+
], 8, ["disabled", "to"]);
|
|
177
|
+
};
|
|
178
|
+
}
|
|
34
179
|
});
|
|
180
|
+
var ElTooltipContent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tooltip/src/content.vue"]]);
|
|
35
181
|
|
|
36
|
-
export {
|
|
182
|
+
export { ElTooltipContent as default };
|
|
37
183
|
//# sourceMappingURL=content.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.mjs","sources":["../../../../../../packages/components/tooltip/src/content.
|
|
1
|
+
{"version":3,"file":"content.mjs","sources":["../../../../../../packages/components/tooltip/src/content.vue"],"sourcesContent":["<template>\n <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 <template v-if=\"!destroyed\">\n <slot />\n </template>\n </el-popper-content>\n </transition>\n </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 { 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)\nconst destroyed = ref(false)\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 destroyed.value = true\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 = computed(() => !unref(open))\n\nconst onTransitionLeave = () => {\n onHide()\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\nlet stopHandle: ReturnType<typeof onClickOutside>\n\nwatch(\n () => unref(open),\n (val) => {\n if (!val) {\n stopHandle?.()\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":";;;;;;;;;;;;;mCAuDc,CAAA;AAAA,EACZ,IAAM,EAAA,kBAAA;AAAA,EACN,YAAc,EAAA,KAAA;AAChB,CAAA,CAAA,CAAA;;;;;;AAIA,IAAM,MAAA,EAAE,aAAa,oBAAqB,EAAA,CAAA;AAC1C,IAAM,MAAA,EAAA,GAAK,aAAa,SAAS,CAAA,CAAA;AAEjC,IAAM,MAAA,UAAA,GAAa,IAAS,IAAI,CAAA,CAAA;AAChC,IAAM,MAAA,SAAA,GAAY,IAAI,KAAK,CAAA,CAAA;AAC3B,IAA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MAAI;AAAmB,MAAA,UAAA,GAAA,cAAA,CAAA,QAAA,CAAA,MAAA;AACvB,QAAM,IAAA,EAAA,CAAA;AACN,QAAA,uBAA0B,CAAA,KAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,gBAAA,CAAA;AACxB,OAAQ,CAAA,EAAA,MAAA;AAAA,QACV,IAAA,KAAA,CAAA,UAAA,CAAA;AAAA,UAEJ,OAAA;AAAA,QACF,MAAA,QAAA,GAAA,KAAA,CAAA,OAAA,CAAA,CAAA;AAEA,QAAA,YAAqB,KAAA,OAAA,EAAA;AACnB,UAAI,OAAO,EAAmB,CAAA;AAC5B,SAAQ;AAAA,OACV,CAAA,CAAA;AAAA,KACF,CAAA;AAEA,IAAI,MAAA,MAAA,GAAA,MAAA;AAEJ,MAAA,IACE,CAAM,KAAA,CAAA,iBACG,EAAA;AACP,QAAA,OAAU,EAAA,CAAA;AACR,OAAa;AAAA,KACf,CAAA;AAAA,IACF,IACA,UAAA,CAAA;AAAA,IAAA,KACS,CAAA,MAAA,KAAA,CAAA,IAAA,CAAA,EAAA,CAAA,GAAA,KAAA;AAAA,MAEX,IAAA,CAAA,GAAA,EAAA;AAEA,QACE,UAAY,IAAA,IAAA,GAAA,KACN,CAAA,GAAA,UAAA,EAAA,CAAA;AACJ,OAAA;AAAiC,KAErC,EAAA;AAEA,MAAa,KAAA,EAAA,MAAA;AAAA,KAIX,CAAA,CAAA;AAAA,IACF,KAAC,CAAA,MAAA,KAAA,CAAA,OAAA,EAAA,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,183 +1,37 @@
|
|
|
1
|
-
import { defineComponent, ref, inject, computed, onBeforeUnmount, unref, watch, openBlock, createBlock, Teleport, createVNode, Transition, withCtx, withDirectives, mergeProps, renderSlot, createCommentVNode, vShow } from 'vue';
|
|
2
|
-
import { onClickOutside } from '@vueuse/core';
|
|
3
|
-
import '../../../hooks/index.mjs';
|
|
4
1
|
import '../../../utils/index.mjs';
|
|
5
2
|
import '../../popper/index.mjs';
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
11
|
-
import { composeEventHandlers } from '../../../utils/dom/event.mjs';
|
|
12
|
-
import ElPopperContent from '../../popper/src/content2.mjs';
|
|
3
|
+
import '../../../hooks/index.mjs';
|
|
4
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
5
|
+
import { useDelayedToggleProps } from '../../../hooks/use-delayed-toggle/index.mjs';
|
|
6
|
+
import { popperContentProps } from '../../popper/src/content.mjs';
|
|
13
7
|
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
return props.transition || `${ns.namespace.value}-fade-in-linear`;
|
|
41
|
-
});
|
|
42
|
-
const persistentRef = computed(() => {
|
|
43
|
-
if (process.env.NODE_ENV === "test") {
|
|
44
|
-
return true;
|
|
45
|
-
}
|
|
46
|
-
return props.persistent;
|
|
47
|
-
});
|
|
48
|
-
onBeforeUnmount(() => {
|
|
49
|
-
destroyed.value = true;
|
|
50
|
-
});
|
|
51
|
-
const shouldRender = computed(() => {
|
|
52
|
-
return unref(persistentRef) ? true : unref(open);
|
|
53
|
-
});
|
|
54
|
-
const shouldShow = computed(() => {
|
|
55
|
-
return props.disabled ? false : unref(open);
|
|
56
|
-
});
|
|
57
|
-
const appendTo = computed(() => {
|
|
58
|
-
return props.appendTo || selector.value;
|
|
59
|
-
});
|
|
60
|
-
const contentStyle = computed(() => {
|
|
61
|
-
var _a;
|
|
62
|
-
return (_a = props.style) != null ? _a : {};
|
|
63
|
-
});
|
|
64
|
-
const ariaHidden = computed(() => !unref(open));
|
|
65
|
-
const onTransitionLeave = () => {
|
|
66
|
-
onHide();
|
|
67
|
-
};
|
|
68
|
-
const stopWhenControlled = () => {
|
|
69
|
-
if (unref(controlled))
|
|
70
|
-
return true;
|
|
71
|
-
};
|
|
72
|
-
const onContentEnter = composeEventHandlers(stopWhenControlled, () => {
|
|
73
|
-
if (props.enterable && unref(trigger) === "hover") {
|
|
74
|
-
onOpen();
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
const onContentLeave = composeEventHandlers(stopWhenControlled, () => {
|
|
78
|
-
if (unref(trigger) === "hover") {
|
|
79
|
-
onClose();
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
const onBeforeEnter = () => {
|
|
83
|
-
var _a, _b;
|
|
84
|
-
(_b = (_a = contentRef.value) == null ? void 0 : _a.updatePopper) == null ? void 0 : _b.call(_a);
|
|
85
|
-
onBeforeShow == null ? void 0 : onBeforeShow();
|
|
86
|
-
};
|
|
87
|
-
const onBeforeLeave = () => {
|
|
88
|
-
onBeforeHide == null ? void 0 : onBeforeHide();
|
|
89
|
-
};
|
|
90
|
-
const onAfterShow = () => {
|
|
91
|
-
onShow();
|
|
92
|
-
stopHandle = onClickOutside(computed(() => {
|
|
93
|
-
var _a;
|
|
94
|
-
return (_a = contentRef.value) == null ? void 0 : _a.popperContentRef;
|
|
95
|
-
}), () => {
|
|
96
|
-
if (unref(controlled))
|
|
97
|
-
return;
|
|
98
|
-
const $trigger = unref(trigger);
|
|
99
|
-
if ($trigger !== "hover") {
|
|
100
|
-
onClose();
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
};
|
|
104
|
-
const onBlur = () => {
|
|
105
|
-
if (!props.virtualTriggering) {
|
|
106
|
-
onClose();
|
|
107
|
-
}
|
|
108
|
-
};
|
|
109
|
-
let stopHandle;
|
|
110
|
-
watch(() => unref(open), (val) => {
|
|
111
|
-
if (!val) {
|
|
112
|
-
stopHandle == null ? void 0 : stopHandle();
|
|
113
|
-
}
|
|
114
|
-
}, {
|
|
115
|
-
flush: "post"
|
|
116
|
-
});
|
|
117
|
-
watch(() => props.content, () => {
|
|
118
|
-
var _a, _b;
|
|
119
|
-
(_b = (_a = contentRef.value) == null ? void 0 : _a.updatePopper) == null ? void 0 : _b.call(_a);
|
|
120
|
-
});
|
|
121
|
-
expose({
|
|
122
|
-
contentRef
|
|
123
|
-
});
|
|
124
|
-
return (_ctx, _cache) => {
|
|
125
|
-
return openBlock(), createBlock(Teleport, {
|
|
126
|
-
disabled: !_ctx.teleported,
|
|
127
|
-
to: unref(appendTo)
|
|
128
|
-
}, [
|
|
129
|
-
createVNode(Transition, {
|
|
130
|
-
name: unref(transitionClass),
|
|
131
|
-
onAfterLeave: onTransitionLeave,
|
|
132
|
-
onBeforeEnter,
|
|
133
|
-
onAfterEnter: onAfterShow,
|
|
134
|
-
onBeforeLeave
|
|
135
|
-
}, {
|
|
136
|
-
default: withCtx(() => [
|
|
137
|
-
unref(shouldRender) ? withDirectives((openBlock(), createBlock(unref(ElPopperContent), mergeProps({
|
|
138
|
-
key: 0,
|
|
139
|
-
id: unref(id),
|
|
140
|
-
ref_key: "contentRef",
|
|
141
|
-
ref: contentRef
|
|
142
|
-
}, _ctx.$attrs, {
|
|
143
|
-
"aria-label": _ctx.ariaLabel,
|
|
144
|
-
"aria-hidden": unref(ariaHidden),
|
|
145
|
-
"boundaries-padding": _ctx.boundariesPadding,
|
|
146
|
-
"fallback-placements": _ctx.fallbackPlacements,
|
|
147
|
-
"gpu-acceleration": _ctx.gpuAcceleration,
|
|
148
|
-
offset: _ctx.offset,
|
|
149
|
-
placement: _ctx.placement,
|
|
150
|
-
"popper-options": _ctx.popperOptions,
|
|
151
|
-
strategy: _ctx.strategy,
|
|
152
|
-
effect: _ctx.effect,
|
|
153
|
-
enterable: _ctx.enterable,
|
|
154
|
-
pure: _ctx.pure,
|
|
155
|
-
"popper-class": _ctx.popperClass,
|
|
156
|
-
"popper-style": [_ctx.popperStyle, unref(contentStyle)],
|
|
157
|
-
"reference-el": _ctx.referenceEl,
|
|
158
|
-
"trigger-target-el": _ctx.triggerTargetEl,
|
|
159
|
-
visible: unref(shouldShow),
|
|
160
|
-
"z-index": _ctx.zIndex,
|
|
161
|
-
onMouseenter: unref(onContentEnter),
|
|
162
|
-
onMouseleave: unref(onContentLeave),
|
|
163
|
-
onBlur,
|
|
164
|
-
onClose: unref(onClose)
|
|
165
|
-
}), {
|
|
166
|
-
default: withCtx(() => [
|
|
167
|
-
!destroyed.value ? renderSlot(_ctx.$slots, "default", { key: 0 }) : createCommentVNode("v-if", true)
|
|
168
|
-
]),
|
|
169
|
-
_: 3
|
|
170
|
-
}, 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"])), [
|
|
171
|
-
[vShow, unref(shouldShow)]
|
|
172
|
-
]) : createCommentVNode("v-if", true)
|
|
173
|
-
]),
|
|
174
|
-
_: 3
|
|
175
|
-
}, 8, ["name"])
|
|
176
|
-
], 8, ["disabled", "to"]);
|
|
177
|
-
};
|
|
178
|
-
}
|
|
8
|
+
const useTooltipContentProps = buildProps({
|
|
9
|
+
...useDelayedToggleProps,
|
|
10
|
+
...popperContentProps,
|
|
11
|
+
appendTo: {
|
|
12
|
+
type: definePropType([String, Object])
|
|
13
|
+
},
|
|
14
|
+
content: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: ""
|
|
17
|
+
},
|
|
18
|
+
rawContent: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: false
|
|
21
|
+
},
|
|
22
|
+
persistent: Boolean,
|
|
23
|
+
ariaLabel: String,
|
|
24
|
+
visible: {
|
|
25
|
+
type: definePropType(Boolean),
|
|
26
|
+
default: null
|
|
27
|
+
},
|
|
28
|
+
transition: String,
|
|
29
|
+
teleported: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: true
|
|
32
|
+
},
|
|
33
|
+
disabled: Boolean
|
|
179
34
|
});
|
|
180
|
-
var ElTooltipContent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tooltip/src/content.vue"]]);
|
|
181
35
|
|
|
182
|
-
export {
|
|
36
|
+
export { useTooltipContentProps };
|
|
183
37
|
//# 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.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport { popperContentProps } from '@element-plus/components/popper'\nimport { useDelayedToggleProps } from '@element-plus/hooks'\n\nimport type TooltipContent from './content.vue'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const useTooltipContentProps = buildProps({\n ...useDelayedToggleProps,\n ...popperContentProps,\n /**\n * @description which element the tooltip CONTENT appends to\n */\n appendTo: {\n type: definePropType<string | HTMLElement>([String, Object]),\n },\n /**\n * @description display content, can be overridden by `slot#content`\n */\n content: {\n type: String,\n default: '',\n },\n /**\n * @description whether `content` is treated as HTML string\n */\n rawContent: {\n type: Boolean,\n default: false,\n },\n /**\n * @description when tooltip inactive and `persistent` is `false` , popconfirm will be destroyed\n */\n persistent: Boolean,\n /**\n * @description same as `aria-label`\n */\n ariaLabel: String,\n // because model toggle prop is generated dynamically\n // so the typing cannot be evaluated by typescript as type:\n // [name]: { type: Boolean, default: null }\n // so we need to declare that again for type checking.\n /**\n * @description visibility of Tooltip\n */\n visible: {\n type: definePropType<boolean | null>(Boolean),\n default: null,\n },\n /**\n * @description animation name\n */\n transition: String,\n /**\n * @description whether tooltip content is teleported, if `true` it will be teleported to where `append-to` sets\n */\n teleported: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether Tooltip is disabled\n */\n disabled: Boolean,\n} as const)\n\nexport type ElTooltipContentProps = ExtractPropTypes<\n typeof useTooltipContentProps\n>\n\nexport type TooltipContentInstance = InstanceType<typeof TooltipContent>\n"],"names":[],"mappings":";;;;;;;AAGY,MAAC,sBAAsB,GAAG,UAAU,CAAC;AACjD,EAAE,GAAG,qBAAqB;AAC1B,EAAE,GAAG,kBAAkB;AACvB,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,UAAU,EAAE,OAAO;AACrB,EAAE,SAAS,EAAE,MAAM;AACnB,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,cAAc,CAAC,OAAO,CAAC;AACjC,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,UAAU,EAAE,MAAM;AACpB,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,CAAC;;;;"}
|
|
@@ -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 './content2.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 './content.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';
|
|
@@ -48,6 +48,8 @@ export declare const ElWatermark: import("@element-plus/nightly/es/utils").SFCWi
|
|
|
48
48
|
fontWeight: import("vue").ComputedRef<number | "light" | "normal" | "weight">;
|
|
49
49
|
fontStyle: import("vue").ComputedRef<"none" | "normal" | "italic" | "oblique">;
|
|
50
50
|
fontFamily: import("vue").ComputedRef<string>;
|
|
51
|
+
textAlign: import("vue").ComputedRef<"center" | "right" | "left" | "end" | "start">;
|
|
52
|
+
textBaseline: import("vue").ComputedRef<"top" | "bottom" | "middle" | "alphabetic" | "hanging" | "ideographic">;
|
|
51
53
|
gapX: import("vue").ComputedRef<number>;
|
|
52
54
|
gapY: import("vue").ComputedRef<number>;
|
|
53
55
|
gapXCenter: import("vue").ComputedRef<number>;
|
|
@@ -15,12 +15,20 @@ function useClips() {
|
|
|
15
15
|
if (content instanceof HTMLImageElement) {
|
|
16
16
|
ctx.drawImage(content, 0, 0, contentWidth, contentHeight);
|
|
17
17
|
} else {
|
|
18
|
-
const {
|
|
18
|
+
const {
|
|
19
|
+
color,
|
|
20
|
+
fontSize,
|
|
21
|
+
fontStyle,
|
|
22
|
+
fontWeight,
|
|
23
|
+
fontFamily,
|
|
24
|
+
textAlign,
|
|
25
|
+
textBaseline
|
|
26
|
+
} = font;
|
|
19
27
|
const mergedFontSize = Number(fontSize) * ratio;
|
|
20
28
|
ctx.font = `${fontStyle} normal ${fontWeight} ${mergedFontSize}px/${height}px ${fontFamily}`;
|
|
21
29
|
ctx.fillStyle = color;
|
|
22
|
-
ctx.textAlign =
|
|
23
|
-
ctx.textBaseline =
|
|
30
|
+
ctx.textAlign = textAlign;
|
|
31
|
+
ctx.textBaseline = textBaseline;
|
|
24
32
|
const contents = Array.isArray(content) ? content : [content];
|
|
25
33
|
contents == null ? void 0 : contents.forEach((item, index) => {
|
|
26
34
|
ctx.fillText(item != null ? item : "", contentWidth / 2, index * (mergedFontSize + FontGap * ratio));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useClips.mjs","sources":["../../../../../../packages/components/watermark/src/useClips.ts"],"sourcesContent":["import type { WatermarkProps } from './watermark'\n\nexport const FontGap = 3\n\nfunction prepareCanvas(\n width: number,\n height: number,\n ratio = 1\n): [\n ctx: CanvasRenderingContext2D,\n canvas: HTMLCanvasElement,\n realWidth: number,\n realHeight: number\n] {\n const canvas = document.createElement('canvas')\n const ctx = canvas.getContext('2d')!\n const realWidth = width * ratio\n const realHeight = height * ratio\n canvas.setAttribute('width', `${realWidth}px`)\n canvas.setAttribute('height', `${realHeight}px`)\n ctx.save()\n\n return [ctx, canvas, realWidth, realHeight]\n}\n\n/**\n * Get the clips of text content.\n * This is a lazy hook function since SSR no need this\n */\nexport default function useClips() {\n // Get single clips\n function getClips(\n content: NonNullable<WatermarkProps['content']> | HTMLImageElement,\n rotate: number,\n ratio: number,\n width: number,\n height: number,\n font: Required<NonNullable<WatermarkProps['font']>>,\n gapX: number,\n gapY: number\n ): [dataURL: string, finalWidth: number, finalHeight: number] {\n // ================= Text / Image =================\n const [ctx, canvas, contentWidth, contentHeight] = prepareCanvas(\n width,\n height,\n ratio\n )\n\n if (content instanceof HTMLImageElement) {\n // Image\n ctx.drawImage(content, 0, 0, contentWidth, contentHeight)\n } else {\n // Text\n const {
|
|
1
|
+
{"version":3,"file":"useClips.mjs","sources":["../../../../../../packages/components/watermark/src/useClips.ts"],"sourcesContent":["import type { WatermarkProps } from './watermark'\n\nexport const FontGap = 3\n\nfunction prepareCanvas(\n width: number,\n height: number,\n ratio = 1\n): [\n ctx: CanvasRenderingContext2D,\n canvas: HTMLCanvasElement,\n realWidth: number,\n realHeight: number\n] {\n const canvas = document.createElement('canvas')\n const ctx = canvas.getContext('2d')!\n const realWidth = width * ratio\n const realHeight = height * ratio\n canvas.setAttribute('width', `${realWidth}px`)\n canvas.setAttribute('height', `${realHeight}px`)\n ctx.save()\n\n return [ctx, canvas, realWidth, realHeight]\n}\n\n/**\n * Get the clips of text content.\n * This is a lazy hook function since SSR no need this\n */\nexport default function useClips() {\n // Get single clips\n function getClips(\n content: NonNullable<WatermarkProps['content']> | HTMLImageElement,\n rotate: number,\n ratio: number,\n width: number,\n height: number,\n font: Required<NonNullable<WatermarkProps['font']>>,\n gapX: number,\n gapY: number\n ): [dataURL: string, finalWidth: number, finalHeight: number] {\n // ================= Text / Image =================\n const [ctx, canvas, contentWidth, contentHeight] = prepareCanvas(\n width,\n height,\n ratio\n )\n\n if (content instanceof HTMLImageElement) {\n // Image\n ctx.drawImage(content, 0, 0, contentWidth, contentHeight)\n } else {\n // Text\n const {\n color,\n fontSize,\n fontStyle,\n fontWeight,\n fontFamily,\n textAlign,\n textBaseline,\n } = font\n const mergedFontSize = Number(fontSize) * ratio\n\n ctx.font = `${fontStyle} normal ${fontWeight} ${mergedFontSize}px/${height}px ${fontFamily}`\n ctx.fillStyle = color\n ctx.textAlign = textAlign\n ctx.textBaseline = textBaseline\n const contents = Array.isArray(content) ? content : [content]\n contents?.forEach((item, index) => {\n ctx.fillText(\n item ?? '',\n contentWidth / 2,\n index * (mergedFontSize + FontGap * ratio)\n )\n })\n }\n\n // ==================== Rotate ====================\n const angle = (Math.PI / 180) * Number(rotate)\n const maxSize = Math.max(width, height)\n const [rCtx, rCanvas, realMaxSize] = prepareCanvas(maxSize, maxSize, ratio)\n\n // Copy from `ctx` and rotate\n rCtx.translate(realMaxSize / 2, realMaxSize / 2)\n rCtx.rotate(angle)\n if (contentWidth > 0 && contentHeight > 0) {\n rCtx.drawImage(canvas, -contentWidth / 2, -contentHeight / 2)\n }\n\n // Get boundary of rotated text\n function getRotatePos(x: number, y: number) {\n const targetX = x * Math.cos(angle) - y * Math.sin(angle)\n const targetY = x * Math.sin(angle) + y * Math.cos(angle)\n return [targetX, targetY]\n }\n\n let left = 0\n let right = 0\n let top = 0\n let bottom = 0\n\n const halfWidth = contentWidth / 2\n const halfHeight = contentHeight / 2\n const points = [\n [0 - halfWidth, 0 - halfHeight],\n [0 + halfWidth, 0 - halfHeight],\n [0 + halfWidth, 0 + halfHeight],\n [0 - halfWidth, 0 + halfHeight],\n ]\n points.forEach(([x, y]) => {\n const [targetX, targetY] = getRotatePos(x, y)\n left = Math.min(left, targetX)\n right = Math.max(right, targetX)\n top = Math.min(top, targetY)\n bottom = Math.max(bottom, targetY)\n })\n\n const cutLeft = left + realMaxSize / 2\n const cutTop = top + realMaxSize / 2\n const cutWidth = right - left\n const cutHeight = bottom - top\n\n // ================ Fill Alternate ================\n const realGapX = gapX * ratio\n const realGapY = gapY * ratio\n const filledWidth = (cutWidth + realGapX) * 2\n const filledHeight = cutHeight + realGapY\n\n const [fCtx, fCanvas] = prepareCanvas(filledWidth, filledHeight)\n\n function drawImg(targetX = 0, targetY = 0) {\n fCtx.drawImage(\n rCanvas,\n cutLeft,\n cutTop,\n cutWidth,\n cutHeight,\n targetX,\n targetY,\n cutWidth,\n cutHeight\n )\n }\n drawImg()\n drawImg(cutWidth + realGapX, -cutHeight / 2 - realGapY / 2)\n drawImg(cutWidth + realGapX, +cutHeight / 2 + realGapY / 2)\n\n return [fCanvas.toDataURL(), filledWidth / ratio, filledHeight / ratio]\n }\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E,OAAO,GAAG,CAAC,EAAE;AAC/C,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;AAC3G,KAAK;AACL,IAAI,OAAO,EAAE,CAAC;AACd,IAAI,OAAO,CAAC,QAAQ,GAAG,QAAQ,EAAE,CAAC,SAAS,GAAG,CAAC,GAAG,QAAQ,GAAG,CAAC,CAAC,CAAC;AAChE,IAAI,OAAO,CAAC,QAAQ,GAAG,QAAQ,EAAE,CAAC,SAAS,GAAG,CAAC,GAAG,QAAQ,GAAG,CAAC,CAAC,CAAC;AAChE,IAAI,OAAO,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,WAAW,GAAG,KAAK,EAAE,YAAY,GAAG,KAAK,CAAC,CAAC;AAC5E,GAAG;AACH,EAAE,OAAO,QAAQ,CAAC;AAClB;;;;"}
|
|
@@ -6,6 +6,8 @@ export interface WatermarkFontType {
|
|
|
6
6
|
fontWeight?: 'normal' | 'light' | 'weight' | number;
|
|
7
7
|
fontStyle?: 'none' | 'normal' | 'italic' | 'oblique';
|
|
8
8
|
fontFamily?: string;
|
|
9
|
+
textAlign?: 'start' | 'end' | 'left' | 'right' | 'center';
|
|
10
|
+
textBaseline?: 'top' | 'hanging' | 'middle' | 'alphabetic' | 'ideographic' | 'bottom';
|
|
9
11
|
}
|
|
10
12
|
export declare const watermarkProps: {
|
|
11
13
|
readonly zIndex: import("@element-plus/nightly/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 9, boolean>;
|