@wfrog/vc-ui 1.1.0 → 1.2.0
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 +3 -3
- package/dist/es/chunk/{OEa4tYPF.mjs → -ga82G_B.mjs} +1 -1
- package/dist/es/chunk/B1BnPYNG.mjs +163 -0
- package/dist/es/chunk/{DFOLES4O.mjs → BA2yoAwy.mjs} +403 -502
- package/dist/es/chunk/{BpqBBo4z.mjs → BDyXj_90.mjs} +2 -2
- package/dist/es/chunk/{BI0vrXwX.mjs → BI-fNJhk.mjs} +6 -3
- package/dist/es/chunk/{BsGCX4td.mjs → BK4T_2ha.mjs} +1 -1
- package/dist/es/chunk/{73YgKz3H.mjs → BLLKi_0v.mjs} +1 -1
- package/dist/es/chunk/{DTLPXrjb.mjs → BTsEMnf_.mjs} +1 -1
- package/dist/es/chunk/{B5UQmWXg.mjs → BUf50Y7Y.mjs} +41 -21
- package/dist/es/chunk/{BzedaLtg.mjs → BYVaz5Or.mjs} +2 -2
- package/dist/es/chunk/BaJ7k5Lg.mjs +209 -0
- package/dist/es/chunk/{Bp9jXKX0.mjs → BambM7zX.mjs} +2 -2
- package/dist/es/chunk/{CizMbf5K.mjs → Bl0WQiki.mjs} +1 -1
- package/dist/es/chunk/{CLbj8G-F.mjs → Bnot0Gwc.mjs} +12 -4
- package/dist/es/chunk/{4eyJqDa9.mjs → BoGGHTrJ.mjs} +4 -2
- package/dist/es/chunk/C7Dgjpd1.mjs +242 -0
- package/dist/es/chunk/{D0LB3gF-.mjs → CKbkzlkO.mjs} +104 -72
- package/dist/es/chunk/{DrgvuOYH.mjs → CL5WTCB3.mjs} +4 -2
- package/dist/es/chunk/{XwSiBVsA.mjs → CM_I1FoA.mjs} +2 -2
- package/dist/es/chunk/{DouIsSPi.mjs → CNILa-hz.mjs} +1 -1
- package/dist/es/chunk/{DRoyW749.mjs → CcKUdl3e.mjs} +12 -6
- package/dist/es/chunk/CidLkmft.mjs +188 -0
- package/dist/es/chunk/{HAog8AWU.mjs → CitH0taR.mjs} +816 -539
- package/dist/es/chunk/{Cu6erWl4.mjs → CzqeSQn4.mjs} +73 -38
- package/dist/es/chunk/{CLCfXfvv.mjs → D7JQbDFE.mjs} +154 -118
- package/dist/es/chunk/{DaCDeO95.mjs → D9iEroQw.mjs} +1 -207
- package/dist/es/chunk/{cPBw23yt.mjs → DEPZhJ0Z.mjs} +21 -16
- package/dist/es/chunk/{CPERtDRX.mjs → DHpbQMGk.mjs} +32 -22
- package/dist/es/chunk/{BHsNc7jl.mjs → DKpRXDRE.mjs} +82 -55
- package/dist/es/chunk/{CLMc8GzD.mjs → DMYHOxhk.mjs} +462 -311
- package/dist/es/chunk/{CBSopeeE.mjs → DQHGjqG5.mjs} +9 -4
- package/dist/es/chunk/DTEM_vYZ.mjs +23 -0
- package/dist/es/chunk/{NQBKROII.mjs → DWcIzeMM.mjs} +1 -1
- package/dist/es/chunk/{FHvLvzEB.mjs → DX38FfmL.mjs} +1088 -697
- package/dist/es/chunk/{DZD-YnCt.mjs → Dcm-lOj8.mjs} +4 -4
- package/dist/es/chunk/{09Ec85_u.mjs → DdmNdV7I.mjs} +398 -278
- package/dist/es/chunk/{f0-vIQGp.mjs → DfHTA5LW.mjs} +3 -3
- package/dist/es/chunk/DgFT6snA.mjs +835 -0
- package/dist/es/chunk/{DwKWIlzw.mjs → DgSzI6Fw.mjs} +106 -71
- package/dist/es/chunk/{BcTuAX8r.mjs → Dsye5ZEp.mjs} +5 -3
- package/dist/es/chunk/{BsLJxiSC.mjs → Dw-yyl2m.mjs} +1 -1
- package/dist/es/chunk/{DXPWe_a5.mjs → U13Qpiki.mjs} +19 -13
- package/dist/es/chunk/{axpwSky6.mjs → _8u_XVHh.mjs} +168 -120
- package/dist/es/chunk/egk9EEzo.mjs +66 -0
- package/dist/es/chunk/{BUEEWLrd.mjs → ezK_XQQd.mjs} +15 -6
- package/dist/es/chunk/{Bl2KlMdP.mjs → oW98L-44.mjs} +8 -3
- package/dist/es/chunk/{Dk6Bx0KT.mjs → plK2vnjp.mjs} +8 -5
- package/dist/es/components/awesome-icon/awesome-icon.mjs +2 -1
- package/dist/es/components/backbottom/backbottom.mjs +2 -2
- package/dist/es/components/button/button.mjs +105 -76
- package/dist/es/components/choice/choice.mjs +2 -2
- package/dist/es/components/config-provider/config-provider.d.ts +1 -0
- package/dist/es/components/config-provider/config-provider.mjs +13 -5
- package/dist/es/components/cropper/cropper.mjs +44 -33
- package/dist/es/components/currency/currency.mjs +5 -5
- package/dist/es/components/daterange-picker/daterange-picker.mjs +2267 -1522
- package/dist/es/components/dialog/dialog.mjs +213 -172
- package/dist/es/components/dialog/index.css +1 -1
- package/dist/es/components/dialog-camera-upload/dialog-camera-upload.mjs +11 -11
- package/dist/es/components/dialog-map-point/dialog-map-point.mjs +5 -4
- package/dist/es/components/dialog-upload-images/dialog-upload-images.mjs +495 -314
- package/dist/es/components/dialog-upload-images/index.css +1 -1
- package/dist/es/components/drag-verify/drag-verify.mjs +3 -3
- package/dist/es/components/drawer/drawer.mjs +136 -94
- package/dist/es/components/drawer/index.css +1 -1
- package/dist/es/components/easy-pagination/easy-pagination.mjs +2 -2
- package/dist/es/components/el-icon/el-icon.mjs +1 -1
- package/dist/es/components/el-icon/index.css +3 -2
- package/dist/es/components/flag/flag.mjs +2 -1
- package/dist/es/components/icon/icon.mjs +10 -31
- package/dist/es/components/icon/icon.vue.d.ts +1 -1
- package/dist/es/components/icon/icon2.mjs +1 -1
- package/dist/es/components/icon/index.mjs +2 -2
- package/dist/es/components/icon-picker/components/collections.vue.d.ts +625 -0
- package/dist/es/components/icon-picker/components/panel.vue.d.ts +9 -0
- package/dist/es/components/icon-picker/icon-picker.d.ts +40 -0
- package/dist/es/components/icon-picker/icon-picker.mjs +1375 -0
- package/dist/es/components/icon-picker/icon-picker.vue.d.ts +9 -0
- package/dist/es/components/icon-picker/index.css +121 -0
- package/dist/es/components/icon-picker/index.d.ts +4 -0
- package/dist/es/components/icon-picker/index.mjs +6 -0
- package/dist/es/components/iconify-icon/iconify-icon.d.ts +5 -0
- package/dist/es/components/iconify-icon/iconify-icon.mjs +1860 -0
- package/dist/es/components/iconify-icon/iconify-icon.vue.d.ts +6 -0
- package/dist/es/components/iconify-icon/index.css +11 -0
- package/dist/es/components/iconify-icon/index.d.ts +4 -0
- package/dist/es/components/iconify-icon/index.mjs +6 -0
- package/dist/es/components/image/image.mjs +5 -5
- package/dist/es/components/input/input.mjs +4 -4
- package/dist/es/components/input/input.vue.d.ts +63 -54
- package/dist/es/components/input-number/input-number.mjs +5 -5
- package/dist/es/components/pca-picker/components/c.vue.d.ts +4 -4
- package/dist/es/components/pca-picker/index.css +1 -1
- package/dist/es/components/pca-picker/pca-picker.mjs +154 -160
- package/dist/es/components/pca-picker/pca-picker.vue.d.ts +12 -11
- package/dist/es/components/qr-code/qr-code.mjs +2 -1
- package/dist/es/components/screenfull/screenfull.mjs +6 -5
- package/dist/es/components/scrollbar/index.css +18 -0
- package/dist/es/components/scrollbar/index.d.ts +4 -0
- package/dist/es/components/scrollbar/index.mjs +6 -0
- package/dist/es/components/scrollbar/scrollbar.d.ts +4 -0
- package/dist/es/components/scrollbar/scrollbar.mjs +65 -0
- package/dist/es/components/scrollbar/scrollbar.vue.d.ts +588 -0
- package/dist/es/components/select/select.mjs +7 -7
- package/dist/es/components/single-player/index.css +1 -1
- package/dist/es/components/single-player/single-player.mjs +265 -166
- package/dist/es/components/svg-icon/index.css +3 -2
- package/dist/es/components/svg-icon/svg-icon.mjs +3 -3
- package/dist/es/components/switch/switch.mjs +2 -2
- package/dist/es/components/sync-scroll-container/sync-scroll-container.mjs +2 -2
- package/dist/es/components/tags/tags.mjs +9 -9
- package/dist/es/components/text-ellipsis/text-ellipsis.mjs +4 -4
- package/dist/es/components/thousand-input/thousand-input.mjs +5 -4
- package/dist/es/components/thousand-input/thousand-input.vue.d.ts +126 -108
- package/dist/es/components/tinymce/index.css +1 -1
- package/dist/es/components/tinymce/tinymce.mjs +9 -8
- package/dist/es/components/tree-picker/components/popover-cascader.vue.d.ts +179 -141
- package/dist/es/components/tree-picker/popover-cascader.css +1 -1
- package/dist/es/components/tree-picker/tree-picker.mjs +10 -10
- package/dist/es/components/tree-picker/tree-picker.vue.d.ts +12 -11
- package/dist/es/components/upload-file/upload-file.mjs +3 -3
- package/dist/es/index.d.ts +3 -0
- package/dist/es/index.mjs +41 -31
- package/dist/global.d.ts +3 -0
- package/dist/index.css +166 -22
- package/package.json +8 -2
- package/dist/es/chunk/BtTIs3tG.mjs +0 -138
- package/dist/es/chunk/C7wQNvSS.mjs +0 -728
- package/dist/es/chunk/Cbhe4I9Z.mjs +0 -16
- package/dist/es/chunk/DihosKp1.mjs +0 -140
- package/dist/es/components/icon/index.css +0 -9
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, provide,
|
|
2
|
-
import { c as buildProps,
|
|
3
|
-
import { _ as _export_sfc, w as withInstall } from './
|
|
1
|
+
import { defineComponent, renderSlot, createBlock, openBlock, Teleport as Teleport$1, ref, computed, provide, inject, onBeforeUnmount, createElementBlock, normalizeStyle, normalizeClass, unref, withDirectives, cloneVNode, Comment, Fragment, Text, createVNode, onMounted, watch, createCommentVNode, mergeProps, withCtx, nextTick, shallowRef, getCurrentInstance, toRef, onBeforeMount, Transition, vShow, readonly, onDeactivated, toDisplayString } from 'vue';
|
|
2
|
+
import { c as buildProps, d as definePropType, u as useNamespace, N as NOOP, e as debugWarn, p as isObject, n as isElement, k as isNil, h as isString, m as fromPairs, f as isNumber, r as buildProp, j as isFunction, q as isBoolean, i as isArray, s as useGetDerivedNamespace } from './CcKUdl3e.mjs';
|
|
3
|
+
import { _ as _export_sfc, w as withInstall } from './BTsEMnf_.mjs';
|
|
4
4
|
import { unrefElement, isClient, tryOnScopeDispose, computedEager, onClickOutside } from '@vueuse/core';
|
|
5
|
-
import { u as useAriaProps } from './
|
|
5
|
+
import { u as useAriaProps } from './BDyXj_90.mjs';
|
|
6
6
|
import { g as getEventCode, E as EVENT_CODE, c as composeEventHandlers } from './BTpNRPQW.mjs';
|
|
7
7
|
import { a as isFocusable, f as focusElement } from './CsLIbnzG.mjs';
|
|
8
|
-
import { f as formItemContextKey, a as useIdInjection, u as useId } from './
|
|
9
|
-
import { u as useZIndex } from './
|
|
8
|
+
import { f as formItemContextKey, a as useIdInjection, u as useId } from './DQHGjqG5.mjs';
|
|
9
|
+
import { u as useZIndex } from './BI-fNJhk.mjs';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Checks if `value` is `undefined`.
|
|
@@ -29,6 +29,32 @@ function isUndefined(value) {
|
|
|
29
29
|
return value === undefined;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
const teleportProps = buildProps({
|
|
33
|
+
to: {
|
|
34
|
+
type: definePropType([String, Object]),
|
|
35
|
+
required: true
|
|
36
|
+
},
|
|
37
|
+
disabled: Boolean
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
const _sfc_main$8 = defineComponent({
|
|
41
|
+
__name: "teleport",
|
|
42
|
+
props: teleportProps,
|
|
43
|
+
setup(__props) {
|
|
44
|
+
return (_ctx, _cache) => {
|
|
45
|
+
return _ctx.disabled ? renderSlot(_ctx.$slots, "default", { key: 0 }) : (openBlock(), createBlock(Teleport$1, {
|
|
46
|
+
key: 1,
|
|
47
|
+
to: _ctx.to
|
|
48
|
+
}, [
|
|
49
|
+
renderSlot(_ctx.$slots, "default")
|
|
50
|
+
], 8, ["to"]));
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
var Teleport = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/teleport/src/teleport.vue"]]);
|
|
55
|
+
|
|
56
|
+
const ElTeleport = withInstall(Teleport);
|
|
57
|
+
|
|
32
58
|
const POPPER_INJECTION_KEY = Symbol("popper");
|
|
33
59
|
const POPPER_CONTENT_INJECTION_KEY = Symbol("popperContent");
|
|
34
60
|
|
|
@@ -50,14 +76,14 @@ const popperProps = buildProps({
|
|
|
50
76
|
}
|
|
51
77
|
});
|
|
52
78
|
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
79
|
+
const _sfc_main$7 = defineComponent({
|
|
80
|
+
...{
|
|
81
|
+
name: "ElPopper",
|
|
82
|
+
inheritAttrs: false
|
|
83
|
+
},
|
|
84
|
+
__name: "popper",
|
|
59
85
|
props: popperProps,
|
|
60
|
-
setup(__props, { expose }) {
|
|
86
|
+
setup(__props, { expose: __expose }) {
|
|
61
87
|
const props = __props;
|
|
62
88
|
const triggerRef = ref();
|
|
63
89
|
const popperInstanceRef = ref();
|
|
@@ -71,42 +97,50 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
71
97
|
referenceRef,
|
|
72
98
|
role
|
|
73
99
|
};
|
|
74
|
-
|
|
100
|
+
__expose(popperProvides);
|
|
75
101
|
provide(POPPER_INJECTION_KEY, popperProvides);
|
|
76
102
|
return (_ctx, _cache) => {
|
|
77
103
|
return renderSlot(_ctx.$slots, "default");
|
|
78
104
|
};
|
|
79
105
|
}
|
|
80
106
|
});
|
|
81
|
-
var Popper = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
107
|
+
var Popper = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/popper/src/popper.vue"]]);
|
|
82
108
|
|
|
83
|
-
const
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
setup(__props, { expose }) {
|
|
109
|
+
const _sfc_main$6 = defineComponent({
|
|
110
|
+
...{
|
|
111
|
+
name: "ElPopperArrow",
|
|
112
|
+
inheritAttrs: false
|
|
113
|
+
},
|
|
114
|
+
__name: "arrow",
|
|
115
|
+
setup(__props, { expose: __expose }) {
|
|
90
116
|
const ns = useNamespace("popper");
|
|
91
|
-
const { arrowRef, arrowStyle } = inject(
|
|
117
|
+
const { arrowRef, arrowStyle } = inject(
|
|
118
|
+
POPPER_CONTENT_INJECTION_KEY,
|
|
119
|
+
void 0
|
|
120
|
+
);
|
|
92
121
|
onBeforeUnmount(() => {
|
|
93
122
|
arrowRef.value = void 0;
|
|
94
123
|
});
|
|
95
|
-
|
|
124
|
+
__expose({
|
|
96
125
|
arrowRef
|
|
97
126
|
});
|
|
98
127
|
return (_ctx, _cache) => {
|
|
99
|
-
return openBlock(), createElementBlock(
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
128
|
+
return openBlock(), createElementBlock(
|
|
129
|
+
"span",
|
|
130
|
+
{
|
|
131
|
+
ref_key: "arrowRef",
|
|
132
|
+
ref: arrowRef,
|
|
133
|
+
class: normalizeClass(unref(ns).e("arrow")),
|
|
134
|
+
style: normalizeStyle(unref(arrowStyle)),
|
|
135
|
+
"data-popper-arrow": ""
|
|
136
|
+
},
|
|
137
|
+
null,
|
|
138
|
+
6
|
|
139
|
+
);
|
|
106
140
|
};
|
|
107
141
|
}
|
|
108
142
|
});
|
|
109
|
-
var ElPopperArrow = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
143
|
+
var ElPopperArrow = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/popper/src/arrow.vue"]]);
|
|
110
144
|
|
|
111
145
|
const popperTriggerProps = buildProps({
|
|
112
146
|
virtualRef: {
|
|
@@ -218,14 +252,14 @@ function wrapTextContent(s) {
|
|
|
218
252
|
}, [s]);
|
|
219
253
|
}
|
|
220
254
|
|
|
221
|
-
const
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
255
|
+
const _sfc_main$5 = defineComponent({
|
|
256
|
+
...{
|
|
257
|
+
name: "ElPopperTrigger",
|
|
258
|
+
inheritAttrs: false
|
|
259
|
+
},
|
|
260
|
+
__name: "trigger",
|
|
227
261
|
props: popperTriggerProps,
|
|
228
|
-
setup(__props, { expose }) {
|
|
262
|
+
setup(__props, { expose: __expose }) {
|
|
229
263
|
const props = __props;
|
|
230
264
|
const { role, triggerRef } = inject(POPPER_INJECTION_KEY, void 0);
|
|
231
265
|
useForwardRef(triggerRef);
|
|
@@ -258,55 +292,75 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
258
292
|
"onContextmenu"
|
|
259
293
|
];
|
|
260
294
|
onMounted(() => {
|
|
261
|
-
watch(
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
virtualTriggerAriaStopWatch = void 0;
|
|
271
|
-
if (isElement(prevEl)) {
|
|
272
|
-
TRIGGER_ELE_EVENTS.forEach((eventName) => {
|
|
273
|
-
const handler = props[eventName];
|
|
274
|
-
if (handler) {
|
|
275
|
-
prevEl.removeEventListener(eventName.slice(2).toLowerCase(), handler, ["onFocus", "onBlur"].includes(eventName));
|
|
276
|
-
}
|
|
277
|
-
});
|
|
295
|
+
watch(
|
|
296
|
+
() => props.virtualRef,
|
|
297
|
+
(virtualEl) => {
|
|
298
|
+
if (virtualEl) {
|
|
299
|
+
triggerRef.value = unrefElement(virtualEl);
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
immediate: true
|
|
278
304
|
}
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
305
|
+
);
|
|
306
|
+
watch(
|
|
307
|
+
triggerRef,
|
|
308
|
+
(el, prevEl) => {
|
|
309
|
+
virtualTriggerAriaStopWatch == null ? void 0 : virtualTriggerAriaStopWatch();
|
|
310
|
+
virtualTriggerAriaStopWatch = void 0;
|
|
311
|
+
if (isElement(prevEl)) {
|
|
312
|
+
TRIGGER_ELE_EVENTS.forEach((eventName) => {
|
|
313
|
+
const handler = props[eventName];
|
|
314
|
+
if (handler) {
|
|
315
|
+
prevEl.removeEventListener(
|
|
316
|
+
eventName.slice(2).toLowerCase(),
|
|
317
|
+
handler,
|
|
318
|
+
["onFocus", "onBlur"].includes(eventName)
|
|
319
|
+
);
|
|
320
|
+
}
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
if (isElement(el)) {
|
|
324
|
+
TRIGGER_ELE_EVENTS.forEach((eventName) => {
|
|
325
|
+
const handler = props[eventName];
|
|
326
|
+
if (handler) {
|
|
327
|
+
el.addEventListener(
|
|
328
|
+
eventName.slice(2).toLowerCase(),
|
|
329
|
+
handler,
|
|
330
|
+
["onFocus", "onBlur"].includes(eventName)
|
|
331
|
+
);
|
|
332
|
+
}
|
|
333
|
+
});
|
|
334
|
+
if (isFocusable(el)) {
|
|
335
|
+
virtualTriggerAriaStopWatch = watch(
|
|
336
|
+
[ariaControls, ariaDescribedby, ariaHaspopup, ariaExpanded],
|
|
337
|
+
(watches) => {
|
|
338
|
+
[
|
|
339
|
+
"aria-controls",
|
|
340
|
+
"aria-describedby",
|
|
341
|
+
"aria-haspopup",
|
|
342
|
+
"aria-expanded"
|
|
343
|
+
].forEach((key, idx) => {
|
|
344
|
+
isNil(watches[idx]) ? el.removeAttribute(key) : el.setAttribute(key, watches[idx]);
|
|
345
|
+
});
|
|
346
|
+
},
|
|
347
|
+
{ immediate: true }
|
|
348
|
+
);
|
|
284
349
|
}
|
|
285
|
-
});
|
|
286
|
-
if (isFocusable(el)) {
|
|
287
|
-
virtualTriggerAriaStopWatch = watch([ariaControls, ariaDescribedby, ariaHaspopup, ariaExpanded], (watches) => {
|
|
288
|
-
[
|
|
289
|
-
"aria-controls",
|
|
290
|
-
"aria-describedby",
|
|
291
|
-
"aria-haspopup",
|
|
292
|
-
"aria-expanded"
|
|
293
|
-
].forEach((key, idx) => {
|
|
294
|
-
isNil(watches[idx]) ? el.removeAttribute(key) : el.setAttribute(key, watches[idx]);
|
|
295
|
-
});
|
|
296
|
-
}, { immediate: true });
|
|
297
350
|
}
|
|
351
|
+
if (isElement(prevEl) && isFocusable(prevEl)) {
|
|
352
|
+
[
|
|
353
|
+
"aria-controls",
|
|
354
|
+
"aria-describedby",
|
|
355
|
+
"aria-haspopup",
|
|
356
|
+
"aria-expanded"
|
|
357
|
+
].forEach((key) => prevEl.removeAttribute(key));
|
|
358
|
+
}
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
immediate: true
|
|
298
362
|
}
|
|
299
|
-
|
|
300
|
-
[
|
|
301
|
-
"aria-controls",
|
|
302
|
-
"aria-describedby",
|
|
303
|
-
"aria-haspopup",
|
|
304
|
-
"aria-expanded"
|
|
305
|
-
].forEach((key) => prevEl.removeAttribute(key));
|
|
306
|
-
}
|
|
307
|
-
}, {
|
|
308
|
-
immediate: true
|
|
309
|
-
});
|
|
363
|
+
);
|
|
310
364
|
});
|
|
311
365
|
onBeforeUnmount(() => {
|
|
312
366
|
virtualTriggerAriaStopWatch == null ? void 0 : virtualTriggerAriaStopWatch();
|
|
@@ -316,21 +370,25 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
316
370
|
TRIGGER_ELE_EVENTS.forEach((eventName) => {
|
|
317
371
|
const handler = props[eventName];
|
|
318
372
|
if (handler) {
|
|
319
|
-
el.removeEventListener(
|
|
373
|
+
el.removeEventListener(
|
|
374
|
+
eventName.slice(2).toLowerCase(),
|
|
375
|
+
handler,
|
|
376
|
+
["onFocus", "onBlur"].includes(eventName)
|
|
377
|
+
);
|
|
320
378
|
}
|
|
321
379
|
});
|
|
322
380
|
triggerRef.value = void 0;
|
|
323
381
|
}
|
|
324
382
|
});
|
|
325
|
-
|
|
383
|
+
__expose({
|
|
326
384
|
triggerRef
|
|
327
385
|
});
|
|
328
386
|
return (_ctx, _cache) => {
|
|
329
387
|
return !_ctx.virtualTriggering ? (openBlock(), createBlock(unref(OnlyChild), mergeProps({ key: 0 }, _ctx.$attrs, {
|
|
330
|
-
"aria-controls":
|
|
331
|
-
"aria-describedby":
|
|
332
|
-
"aria-expanded":
|
|
333
|
-
"aria-haspopup":
|
|
388
|
+
"aria-controls": ariaControls.value,
|
|
389
|
+
"aria-describedby": ariaDescribedby.value,
|
|
390
|
+
"aria-expanded": ariaExpanded.value,
|
|
391
|
+
"aria-haspopup": ariaHaspopup.value
|
|
334
392
|
}), {
|
|
335
393
|
default: withCtx(() => [
|
|
336
394
|
renderSlot(_ctx.$slots, "default")
|
|
@@ -340,7 +398,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
340
398
|
};
|
|
341
399
|
}
|
|
342
400
|
});
|
|
343
|
-
var ElPopperTrigger = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
401
|
+
var ElPopperTrigger = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/popper/src/trigger.vue"]]);
|
|
344
402
|
|
|
345
403
|
const FOCUS_AFTER_TRAPPED = "focus-trap.focus-after-trapped";
|
|
346
404
|
const FOCUS_AFTER_RELEASED = "focus-trap.focus-after-released";
|
|
@@ -382,7 +440,7 @@ const getVisibleElement = (elements, container) => {
|
|
|
382
440
|
}
|
|
383
441
|
};
|
|
384
442
|
const isHidden = (element, container) => {
|
|
385
|
-
if (
|
|
443
|
+
if (process.env.NODE_ENV === "test")
|
|
386
444
|
return false;
|
|
387
445
|
if (getComputedStyle(element).visibility === "hidden")
|
|
388
446
|
return true;
|
|
@@ -496,7 +554,9 @@ let registeredEscapeHandlers = [];
|
|
|
496
554
|
const cachedHandler = (event) => {
|
|
497
555
|
const code = getEventCode(event);
|
|
498
556
|
if (code === EVENT_CODE.esc) {
|
|
499
|
-
registeredEscapeHandlers.forEach(
|
|
557
|
+
registeredEscapeHandlers.forEach(
|
|
558
|
+
(registeredHandler) => registeredHandler(event)
|
|
559
|
+
);
|
|
500
560
|
}
|
|
501
561
|
};
|
|
502
562
|
const useEscapeKeydown = (handler) => {
|
|
@@ -508,7 +568,9 @@ const useEscapeKeydown = (handler) => {
|
|
|
508
568
|
registeredEscapeHandlers.push(handler);
|
|
509
569
|
});
|
|
510
570
|
onBeforeUnmount(() => {
|
|
511
|
-
registeredEscapeHandlers = registeredEscapeHandlers.filter(
|
|
571
|
+
registeredEscapeHandlers = registeredEscapeHandlers.filter(
|
|
572
|
+
(registeredHandler) => registeredHandler !== handler
|
|
573
|
+
);
|
|
512
574
|
if (registeredEscapeHandlers.length === 0) {
|
|
513
575
|
if (isClient)
|
|
514
576
|
document.removeEventListener("keydown", cachedHandler);
|
|
@@ -516,7 +578,7 @@ const useEscapeKeydown = (handler) => {
|
|
|
516
578
|
});
|
|
517
579
|
};
|
|
518
580
|
|
|
519
|
-
const _sfc_main$
|
|
581
|
+
const _sfc_main$4 = defineComponent({
|
|
520
582
|
name: "ElFocusTrap",
|
|
521
583
|
inheritAttrs: false,
|
|
522
584
|
props: {
|
|
@@ -608,11 +670,15 @@ const _sfc_main$5 = defineComponent({
|
|
|
608
670
|
focusTrapRef: forwardRef,
|
|
609
671
|
onKeydown
|
|
610
672
|
});
|
|
611
|
-
watch(
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
673
|
+
watch(
|
|
674
|
+
() => props.focusTrapEl,
|
|
675
|
+
(focusTrapEl) => {
|
|
676
|
+
if (focusTrapEl) {
|
|
677
|
+
forwardRef.value = focusTrapEl;
|
|
678
|
+
}
|
|
679
|
+
},
|
|
680
|
+
{ immediate: true }
|
|
681
|
+
);
|
|
616
682
|
watch([forwardRef], ([forwardRef2], [oldForwardRef]) => {
|
|
617
683
|
if (forwardRef2) {
|
|
618
684
|
forwardRef2.addEventListener("keydown", onKeydown);
|
|
@@ -685,11 +751,16 @@ const _sfc_main$5 = defineComponent({
|
|
|
685
751
|
const trapContainer = unref(forwardRef);
|
|
686
752
|
if (trapContainer) {
|
|
687
753
|
focusableStack.push(focusLayer);
|
|
688
|
-
const prevFocusedElement = trapContainer.contains(
|
|
754
|
+
const prevFocusedElement = trapContainer.contains(
|
|
755
|
+
document.activeElement
|
|
756
|
+
) ? lastFocusBeforeTrapped : document.activeElement;
|
|
689
757
|
lastFocusBeforeTrapped = prevFocusedElement;
|
|
690
758
|
const isPrevFocusContained = trapContainer.contains(prevFocusedElement);
|
|
691
759
|
if (!isPrevFocusContained) {
|
|
692
|
-
const focusEvent = new Event(
|
|
760
|
+
const focusEvent = new Event(
|
|
761
|
+
FOCUS_AFTER_TRAPPED,
|
|
762
|
+
FOCUS_AFTER_TRAPPED_OPTS
|
|
763
|
+
);
|
|
693
764
|
trapContainer.addEventListener(FOCUS_AFTER_TRAPPED, trapOnFocus);
|
|
694
765
|
trapContainer.dispatchEvent(focusEvent);
|
|
695
766
|
if (!focusEvent.defaultPrevented) {
|
|
@@ -702,7 +773,10 @@ const _sfc_main$5 = defineComponent({
|
|
|
702
773
|
}
|
|
703
774
|
}
|
|
704
775
|
if (focusStartEl === "first") {
|
|
705
|
-
focusFirstDescendant(
|
|
776
|
+
focusFirstDescendant(
|
|
777
|
+
obtainAllFocusableElements(trapContainer),
|
|
778
|
+
true
|
|
779
|
+
);
|
|
706
780
|
}
|
|
707
781
|
if (document.activeElement === prevFocusedElement || focusStartEl === "container") {
|
|
708
782
|
tryFocus(trapContainer);
|
|
@@ -737,13 +811,16 @@ const _sfc_main$5 = defineComponent({
|
|
|
737
811
|
if (props.trapped) {
|
|
738
812
|
startTrap();
|
|
739
813
|
}
|
|
740
|
-
watch(
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
814
|
+
watch(
|
|
815
|
+
() => props.trapped,
|
|
816
|
+
(trapped) => {
|
|
817
|
+
if (trapped) {
|
|
818
|
+
startTrap();
|
|
819
|
+
} else {
|
|
820
|
+
stopTrap();
|
|
821
|
+
}
|
|
745
822
|
}
|
|
746
|
-
|
|
823
|
+
);
|
|
747
824
|
});
|
|
748
825
|
onBeforeUnmount(() => {
|
|
749
826
|
if (props.trapped) {
|
|
@@ -766,7 +843,7 @@ const _sfc_main$5 = defineComponent({
|
|
|
766
843
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
767
844
|
return renderSlot(_ctx.$slots, "default", { handleKeydown: _ctx.onKeydown });
|
|
768
845
|
}
|
|
769
|
-
var ElFocusTrap = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
846
|
+
var ElFocusTrap = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/focus-trap/src/focus-trap.vue"]]);
|
|
770
847
|
|
|
771
848
|
var E="top",R="bottom",W="right",P="left",me="auto",G=[E,R,W,P],U="start",J="end",Xe="clippingParents",je="viewport",K="popper",Ye="reference",De=G.reduce(function(t,e){return t.concat([e+"-"+U,e+"-"+J])},[]),Ee=[].concat(G,[me]).reduce(function(t,e){return t.concat([e,e+"-"+U,e+"-"+J])},[]),Ge="beforeRead",Je="read",Ke="afterRead",Qe="beforeMain",Ze="main",et="afterMain",tt="beforeWrite",nt="write",rt="afterWrite",ot=[Ge,Je,Ke,Qe,Ze,et,tt,nt,rt];function C(t){return t?(t.nodeName||"").toLowerCase():null}function H(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Q(t){var e=H(t).Element;return t instanceof e||t instanceof Element}function B(t){var e=H(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function Pe(t){if(typeof ShadowRoot=="undefined")return false;var e=H(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function Mt(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},o=e.attributes[n]||{},i=e.elements[n];!B(i)||!C(i)||(Object.assign(i.style,r),Object.keys(o).forEach(function(a){var s=o[a];s===false?i.removeAttribute(a):i.setAttribute(a,s===true?"":s);}));});}function Rt(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(r){var o=e.elements[r],i=e.attributes[r]||{},a=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),s=a.reduce(function(f,c){return f[c]="",f},{});!B(o)||!C(o)||(Object.assign(o.style,s),Object.keys(i).forEach(function(f){o.removeAttribute(f);}));});}}var Ae={name:"applyStyles",enabled:true,phase:"write",fn:Mt,effect:Rt,requires:["computeStyles"]};function q(t){return t.split("-")[0]}var X=Math.max,ve=Math.min,Z=Math.round;function ee(t,e){e===void 0&&(e=false);var n=t.getBoundingClientRect(),r=1,o=1;if(B(t)&&e){var i=t.offsetHeight,a=t.offsetWidth;a>0&&(r=Z(n.width)/a||1),i>0&&(o=Z(n.height)/i||1);}return {width:n.width/r,height:n.height/o,top:n.top/o,right:n.right/r,bottom:n.bottom/o,left:n.left/r,x:n.left/r,y:n.top/o}}function ke(t){var e=ee(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function it(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return true;if(n&&Pe(n)){var r=e;do{if(r&&t.isSameNode(r))return true;r=r.parentNode||r.host;}while(r)}return false}function N(t){return H(t).getComputedStyle(t)}function Wt(t){return ["table","td","th"].indexOf(C(t))>=0}function I(t){return ((Q(t)?t.ownerDocument:t.document)||window.document).documentElement}function ge(t){return C(t)==="html"?t:t.assignedSlot||t.parentNode||(Pe(t)?t.host:null)||I(t)}function at(t){return !B(t)||N(t).position==="fixed"?null:t.offsetParent}function Bt(t){var e=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,n=navigator.userAgent.indexOf("Trident")!==-1;if(n&&B(t)){var r=N(t);if(r.position==="fixed")return null}var o=ge(t);for(Pe(o)&&(o=o.host);B(o)&&["html","body"].indexOf(C(o))<0;){var i=N(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||e&&i.willChange==="filter"||e&&i.filter&&i.filter!=="none")return o;o=o.parentNode;}return null}function se(t){for(var e=H(t),n=at(t);n&&Wt(n)&&N(n).position==="static";)n=at(n);return n&&(C(n)==="html"||C(n)==="body"&&N(n).position==="static")?e:n||Bt(t)||e}function Le(t){return ["top","bottom"].indexOf(t)>=0?"x":"y"}function fe(t,e,n){return X(t,ve(e,n))}function St(t,e,n){var r=fe(t,e,n);return r>n?n:r}function st(){return {top:0,right:0,bottom:0,left:0}}function ft(t){return Object.assign({},st(),t)}function ct(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var Tt=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,ft(typeof t!="number"?t:ct(t,G))};function Ht(t){var e,n=t.state,r=t.name,o=t.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=q(n.placement),f=Le(s),c=[P,W].indexOf(s)>=0,u=c?"height":"width";if(!(!i||!a)){var m=Tt(o.padding,n),v=ke(i),l=f==="y"?E:P,h=f==="y"?R:W,p=n.rects.reference[u]+n.rects.reference[f]-a[f]-n.rects.popper[u],g=a[f]-n.rects.reference[f],x=se(i),y=x?f==="y"?x.clientHeight||0:x.clientWidth||0:0,$=p/2-g/2,d=m[l],b=y-v[u]-m[h],w=y/2-v[u]/2+$,O=fe(d,w,b),j=f;n.modifiersData[r]=(e={},e[j]=O,e.centerOffset=O-w,e);}}function Ct(t){var e=t.state,n=t.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=e.elements.popper.querySelector(o),!o)||!it(e.elements.popper,o)||(e.elements.arrow=o));}var pt={name:"arrow",enabled:true,phase:"main",fn:Ht,effect:Ct,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function te(t){return t.split("-")[1]}var qt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Vt(t){var e=t.x,n=t.y,r=window,o=r.devicePixelRatio||1;return {x:Z(e*o)/o||0,y:Z(n*o)/o||0}}function ut(t){var e,n=t.popper,r=t.popperRect,o=t.placement,i=t.variation,a=t.offsets,s=t.position,f=t.gpuAcceleration,c=t.adaptive,u=t.roundOffsets,m=t.isFixed,v=a.x,l=v===void 0?0:v,h=a.y,p=h===void 0?0:h,g=typeof u=="function"?u({x:l,y:p}):{x:l,y:p};l=g.x,p=g.y;var x=a.hasOwnProperty("x"),y=a.hasOwnProperty("y"),$=P,d=E,b=window;if(c){var w=se(n),O="clientHeight",j="clientWidth";if(w===H(n)&&(w=I(n),N(w).position!=="static"&&s==="absolute"&&(O="scrollHeight",j="scrollWidth")),w=w,o===E||(o===P||o===W)&&i===J){d=R;var A=m&&w===b&&b.visualViewport?b.visualViewport.height:w[O];p-=A-r.height,p*=f?1:-1;}if(o===P||(o===E||o===R)&&i===J){$=W;var k=m&&w===b&&b.visualViewport?b.visualViewport.width:w[j];l-=k-r.width,l*=f?1:-1;}}var D=Object.assign({position:s},c&&qt),S=u===true?Vt({x:l,y:p}):{x:l,y:p};if(l=S.x,p=S.y,f){var L;return Object.assign({},D,(L={},L[d]=y?"0":"",L[$]=x?"0":"",L.transform=(b.devicePixelRatio||1)<=1?"translate("+l+"px, "+p+"px)":"translate3d("+l+"px, "+p+"px, 0)",L))}return Object.assign({},D,(e={},e[d]=y?p+"px":"",e[$]=x?l+"px":"",e.transform="",e))}function Nt(t){var e=t.state,n=t.options,r=n.gpuAcceleration,o=r===void 0?true:r,i=n.adaptive,a=i===void 0?true:i,s=n.roundOffsets,f=s===void 0?true:s,c={placement:q(e.placement),variation:te(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:o,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,ut(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:f})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,ut(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:false,roundOffsets:f})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement});}var Me={name:"computeStyles",enabled:true,phase:"beforeWrite",fn:Nt,data:{}},ye={passive:true};function It(t){var e=t.state,n=t.instance,r=t.options,o=r.scroll,i=o===void 0?true:o,a=r.resize,s=a===void 0?true:a,f=H(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return i&&c.forEach(function(u){u.addEventListener("scroll",n.update,ye);}),s&&f.addEventListener("resize",n.update,ye),function(){i&&c.forEach(function(u){u.removeEventListener("scroll",n.update,ye);}),s&&f.removeEventListener("resize",n.update,ye);}}var Re={name:"eventListeners",enabled:true,phase:"write",fn:function(){},effect:It,data:{}},_t={left:"right",right:"left",bottom:"top",top:"bottom"};function be(t){return t.replace(/left|right|bottom|top/g,function(e){return _t[e]})}var zt={start:"end",end:"start"};function lt(t){return t.replace(/start|end/g,function(e){return zt[e]})}function We(t){var e=H(t),n=e.pageXOffset,r=e.pageYOffset;return {scrollLeft:n,scrollTop:r}}function Be(t){return ee(I(t)).left+We(t).scrollLeft}function Ft(t){var e=H(t),n=I(t),r=e.visualViewport,o=n.clientWidth,i=n.clientHeight,a=0,s=0;return r&&(o=r.width,i=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=r.offsetLeft,s=r.offsetTop)),{width:o,height:i,x:a+Be(t),y:s}}function Ut(t){var e,n=I(t),r=We(t),o=(e=t.ownerDocument)==null?void 0:e.body,i=X(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=X(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+Be(t),f=-r.scrollTop;return N(o||n).direction==="rtl"&&(s+=X(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:f}}function Se(t){var e=N(t),n=e.overflow,r=e.overflowX,o=e.overflowY;return /auto|scroll|overlay|hidden/.test(n+o+r)}function dt(t){return ["html","body","#document"].indexOf(C(t))>=0?t.ownerDocument.body:B(t)&&Se(t)?t:dt(ge(t))}function ce(t,e){var n;e===void 0&&(e=[]);var r=dt(t),o=r===((n=t.ownerDocument)==null?void 0:n.body),i=H(r),a=o?[i].concat(i.visualViewport||[],Se(r)?r:[]):r,s=e.concat(a);return o?s:s.concat(ce(ge(a)))}function Te(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Xt(t){var e=ee(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}function ht(t,e){return e===je?Te(Ft(t)):Q(e)?Xt(e):Te(Ut(I(t)))}function Yt(t){var e=ce(ge(t)),n=["absolute","fixed"].indexOf(N(t).position)>=0,r=n&&B(t)?se(t):t;return Q(r)?e.filter(function(o){return Q(o)&&it(o,r)&&C(o)!=="body"}):[]}function Gt(t,e,n){var r=e==="clippingParents"?Yt(t):[].concat(e),o=[].concat(r,[n]),i=o[0],a=o.reduce(function(s,f){var c=ht(t,f);return s.top=X(c.top,s.top),s.right=ve(c.right,s.right),s.bottom=ve(c.bottom,s.bottom),s.left=X(c.left,s.left),s},ht(t,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function mt(t){var e=t.reference,n=t.element,r=t.placement,o=r?q(r):null,i=r?te(r):null,a=e.x+e.width/2-n.width/2,s=e.y+e.height/2-n.height/2,f;switch(o){case E:f={x:a,y:e.y-n.height};break;case R:f={x:a,y:e.y+e.height};break;case W:f={x:e.x+e.width,y:s};break;case P:f={x:e.x-n.width,y:s};break;default:f={x:e.x,y:e.y};}var c=o?Le(o):null;if(c!=null){var u=c==="y"?"height":"width";switch(i){case U:f[c]=f[c]-(e[u]/2-n[u]/2);break;case J:f[c]=f[c]+(e[u]/2-n[u]/2);break}}return f}function ne(t,e){e===void 0&&(e={});var n=e,r=n.placement,o=r===void 0?t.placement:r,i=n.boundary,a=i===void 0?Xe:i,s=n.rootBoundary,f=s===void 0?je:s,c=n.elementContext,u=c===void 0?K:c,m=n.altBoundary,v=m===void 0?false:m,l=n.padding,h=l===void 0?0:l,p=ft(typeof h!="number"?h:ct(h,G)),g=u===K?Ye:K,x=t.rects.popper,y=t.elements[v?g:u],$=Gt(Q(y)?y:y.contextElement||I(t.elements.popper),a,f),d=ee(t.elements.reference),b=mt({reference:d,element:x,placement:o}),w=Te(Object.assign({},x,b)),O=u===K?w:d,j={top:$.top-O.top+p.top,bottom:O.bottom-$.bottom+p.bottom,left:$.left-O.left+p.left,right:O.right-$.right+p.right},A=t.modifiersData.offset;if(u===K&&A){var k=A[o];Object.keys(j).forEach(function(D){var S=[W,R].indexOf(D)>=0?1:-1,L=[E,R].indexOf(D)>=0?"y":"x";j[D]+=k[L]*S;});}return j}function Jt(t,e){e===void 0&&(e={});var n=e,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,f=n.allowedAutoPlacements,c=f===void 0?Ee:f,u=te(r),m=u?s?De:De.filter(function(h){return te(h)===u}):G,v=m.filter(function(h){return c.indexOf(h)>=0});v.length===0&&(v=m);var l=v.reduce(function(h,p){return h[p]=ne(t,{placement:p,boundary:o,rootBoundary:i,padding:a})[q(p)],h},{});return Object.keys(l).sort(function(h,p){return l[h]-l[p]})}function Kt(t){if(q(t)===me)return [];var e=be(t);return [lt(t),e,lt(e)]}function Qt(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var o=n.mainAxis,i=o===void 0?true:o,a=n.altAxis,s=a===void 0?true:a,f=n.fallbackPlacements,c=n.padding,u=n.boundary,m=n.rootBoundary,v=n.altBoundary,l=n.flipVariations,h=l===void 0?true:l,p=n.allowedAutoPlacements,g=e.options.placement,x=q(g),y=x===g,$=f||(y||!h?[be(g)]:Kt(g)),d=[g].concat($).reduce(function(z,V){return z.concat(q(V)===me?Jt(e,{placement:V,boundary:u,rootBoundary:m,padding:c,flipVariations:h,allowedAutoPlacements:p}):V)},[]),b=e.rects.reference,w=e.rects.popper,O=new Map,j=true,A=d[0],k=0;k<d.length;k++){var D=d[k],S=q(D),L=te(D)===U,re=[E,R].indexOf(S)>=0,oe=re?"width":"height",M=ne(e,{placement:D,boundary:u,rootBoundary:m,altBoundary:v,padding:c}),T=re?L?W:P:L?R:E;b[oe]>w[oe]&&(T=be(T));var pe=be(T),_=[];if(i&&_.push(M[S]<=0),s&&_.push(M[T]<=0,M[pe]<=0),_.every(function(z){return z})){A=D,j=false;break}O.set(D,_);}if(j)for(var ue=h?3:1,xe=function(z){var V=d.find(function(de){var ae=O.get(de);if(ae)return ae.slice(0,z).every(function(Y){return Y})});if(V)return A=V,"break"},ie=ue;ie>0;ie--){var le=xe(ie);if(le==="break")break}e.placement!==A&&(e.modifiersData[r]._skip=true,e.placement=A,e.reset=true);}}var vt={name:"flip",enabled:true,phase:"main",fn:Qt,requiresIfExists:["offset"],data:{_skip:false}};function gt(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function yt(t){return [E,W,R,P].some(function(e){return t[e]>=0})}function Zt(t){var e=t.state,n=t.name,r=e.rects.reference,o=e.rects.popper,i=e.modifiersData.preventOverflow,a=ne(e,{elementContext:"reference"}),s=ne(e,{altBoundary:true}),f=gt(a,r),c=gt(s,o,i),u=yt(f),m=yt(c);e.modifiersData[n]={referenceClippingOffsets:f,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:m},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":m});}var bt={name:"hide",enabled:true,phase:"main",requiresIfExists:["preventOverflow"],fn:Zt};function en(t,e,n){var r=q(t),o=[P,E].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[P,W].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function tn(t){var e=t.state,n=t.options,r=t.name,o=n.offset,i=o===void 0?[0,0]:o,a=Ee.reduce(function(u,m){return u[m]=en(m,e.rects,i),u},{}),s=a[e.placement],f=s.x,c=s.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=f,e.modifiersData.popperOffsets.y+=c),e.modifiersData[r]=a;}var wt={name:"offset",enabled:true,phase:"main",requires:["popperOffsets"],fn:tn};function nn(t){var e=t.state,n=t.name;e.modifiersData[n]=mt({reference:e.rects.reference,element:e.rects.popper,placement:e.placement});}var He={name:"popperOffsets",enabled:true,phase:"read",fn:nn,data:{}};function rn(t){return t==="x"?"y":"x"}function on(t){var e=t.state,n=t.options,r=t.name,o=n.mainAxis,i=o===void 0?true:o,a=n.altAxis,s=a===void 0?false:a,f=n.boundary,c=n.rootBoundary,u=n.altBoundary,m=n.padding,v=n.tether,l=v===void 0?true:v,h=n.tetherOffset,p=h===void 0?0:h,g=ne(e,{boundary:f,rootBoundary:c,padding:m,altBoundary:u}),x=q(e.placement),y=te(e.placement),$=!y,d=Le(x),b=rn(d),w=e.modifiersData.popperOffsets,O=e.rects.reference,j=e.rects.popper,A=typeof p=="function"?p(Object.assign({},e.rects,{placement:e.placement})):p,k=typeof A=="number"?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),D=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,S={x:0,y:0};if(w){if(i){var L,re=d==="y"?E:P,oe=d==="y"?R:W,M=d==="y"?"height":"width",T=w[d],pe=T+g[re],_=T-g[oe],ue=l?-j[M]/2:0,xe=y===U?O[M]:j[M],ie=y===U?-j[M]:-O[M],le=e.elements.arrow,z=l&&le?ke(le):{width:0,height:0},V=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:st(),de=V[re],ae=V[oe],Y=fe(0,O[M],z[M]),jt=$?O[M]/2-ue-Y-de-k.mainAxis:xe-Y-de-k.mainAxis,Dt=$?-O[M]/2+ue+Y+ae+k.mainAxis:ie+Y+ae+k.mainAxis,Oe=e.elements.arrow&&se(e.elements.arrow),Et=Oe?d==="y"?Oe.clientTop||0:Oe.clientLeft||0:0,Ce=(L=D==null?void 0:D[d])!=null?L:0,Pt=T+jt-Ce-Et,At=T+Dt-Ce,qe=fe(l?ve(pe,Pt):pe,T,l?X(_,At):_);w[d]=qe,S[d]=qe-T;}if(s){var Ve,kt=d==="x"?E:P,Lt=d==="x"?R:W,F=w[b],he=b==="y"?"height":"width",Ne=F+g[kt],Ie=F-g[Lt],$e=[E,P].indexOf(x)!==-1,_e=(Ve=D==null?void 0:D[b])!=null?Ve:0,ze=$e?Ne:F-O[he]-j[he]-_e+k.altAxis,Fe=$e?F+O[he]+j[he]-_e-k.altAxis:Ie,Ue=l&&$e?St(ze,F,Fe):fe(l?ze:Ne,F,l?Fe:Ie);w[b]=Ue,S[b]=Ue-F;}e.modifiersData[r]=S;}}var xt={name:"preventOverflow",enabled:true,phase:"main",fn:on,requiresIfExists:["offset"]};function an(t){return {scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function sn(t){return t===H(t)||!B(t)?We(t):an(t)}function fn(t){var e=t.getBoundingClientRect(),n=Z(e.width)/t.offsetWidth||1,r=Z(e.height)/t.offsetHeight||1;return n!==1||r!==1}function cn(t,e,n){n===void 0&&(n=false);var r=B(e),o=B(e)&&fn(e),i=I(e),a=ee(t,o),s={scrollLeft:0,scrollTop:0},f={x:0,y:0};return (r||!r&&!n)&&((C(e)!=="body"||Se(i))&&(s=sn(e)),B(e)?(f=ee(e,true),f.x+=e.clientLeft,f.y+=e.clientTop):i&&(f.x=Be(i))),{x:a.left+s.scrollLeft-f.x,y:a.top+s.scrollTop-f.y,width:a.width,height:a.height}}function pn(t){var e=new Map,n=new Set,r=[];t.forEach(function(i){e.set(i.name,i);});function o(i){n.add(i.name);var a=[].concat(i.requires||[],i.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var f=e.get(s);f&&o(f);}}),r.push(i);}return t.forEach(function(i){n.has(i.name)||o(i);}),r}function un(t){var e=pn(t);return ot.reduce(function(n,r){return n.concat(e.filter(function(o){return o.phase===r}))},[])}function ln(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t());});})),e}}function dn(t){var e=t.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(e).map(function(n){return e[n]})}var Ot={placement:"bottom",modifiers:[],strategy:"absolute"};function $t(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return !e.some(function(r){return !(r&&typeof r.getBoundingClientRect=="function")})}function we(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,r=n===void 0?[]:n,o=e.defaultOptions,i=o===void 0?Ot:o;return function(a,s,f){f===void 0&&(f=i);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},Ot,i),modifiersData:{},elements:{reference:a,popper:s},attributes:{},styles:{}},u=[],m=false,v={state:c,setOptions:function(p){var g=typeof p=="function"?p(c.options):p;h(),c.options=Object.assign({},i,c.options,g),c.scrollParents={reference:Q(a)?ce(a):a.contextElement?ce(a.contextElement):[],popper:ce(s)};var x=un(dn([].concat(r,c.options.modifiers)));return c.orderedModifiers=x.filter(function(y){return y.enabled}),l(),v.update()},forceUpdate:function(){if(!m){var p=c.elements,g=p.reference,x=p.popper;if($t(g,x)){c.rects={reference:cn(g,se(x),c.options.strategy==="fixed"),popper:ke(x)},c.reset=false,c.placement=c.options.placement,c.orderedModifiers.forEach(function(j){return c.modifiersData[j.name]=Object.assign({},j.data)});for(var y=0;y<c.orderedModifiers.length;y++){if(c.reset===true){c.reset=false,y=-1;continue}var $=c.orderedModifiers[y],d=$.fn,b=$.options,w=b===void 0?{}:b,O=$.name;typeof d=="function"&&(c=d({state:c,options:w,name:O,instance:v})||c);}}}},update:ln(function(){return new Promise(function(p){v.forceUpdate(),p(c);})}),destroy:function(){h(),m=true;}};if(!$t(a,s))return v;v.setOptions(f).then(function(p){!m&&f.onFirstUpdate&&f.onFirstUpdate(p);});function l(){c.orderedModifiers.forEach(function(p){var g=p.name,x=p.options,y=x===void 0?{}:x,$=p.effect;if(typeof $=="function"){var d=$({state:c,name:g,instance:v,options:y}),b=function(){};u.push(d||b);}});}function h(){u.forEach(function(p){return p()}),u=[];}return v}}we();var mn=[Re,He,Me,Ae];we({defaultModifiers:mn});var gn=[Re,He,Me,Ae,wt,vt,xt,pt,bt],yn=we({defaultModifiers:gn});
|
|
772
849
|
|
|
@@ -1009,20 +1086,31 @@ const usePopper = (referenceElementRef, popperElementRef, opts = {}) => {
|
|
|
1009
1086
|
instanceRef.value.destroy();
|
|
1010
1087
|
instanceRef.value = void 0;
|
|
1011
1088
|
};
|
|
1012
|
-
watch(
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
instance
|
|
1089
|
+
watch(
|
|
1090
|
+
options,
|
|
1091
|
+
(newOptions) => {
|
|
1092
|
+
const instance = unref(instanceRef);
|
|
1093
|
+
if (instance) {
|
|
1094
|
+
instance.setOptions(newOptions);
|
|
1095
|
+
}
|
|
1096
|
+
},
|
|
1097
|
+
{
|
|
1098
|
+
deep: true
|
|
1016
1099
|
}
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1100
|
+
);
|
|
1101
|
+
watch(
|
|
1102
|
+
[referenceElementRef, popperElementRef],
|
|
1103
|
+
([referenceElement, popperElement]) => {
|
|
1104
|
+
destroy();
|
|
1105
|
+
if (!referenceElement || !popperElement)
|
|
1106
|
+
return;
|
|
1107
|
+
instanceRef.value = yn(
|
|
1108
|
+
referenceElement,
|
|
1109
|
+
popperElement,
|
|
1110
|
+
unref(options)
|
|
1111
|
+
);
|
|
1112
|
+
}
|
|
1113
|
+
);
|
|
1026
1114
|
onBeforeUnmount(() => {
|
|
1027
1115
|
destroy();
|
|
1028
1116
|
});
|
|
@@ -1046,8 +1134,16 @@ const usePopper = (referenceElementRef, popperElementRef, opts = {}) => {
|
|
|
1046
1134
|
};
|
|
1047
1135
|
function deriveState(state) {
|
|
1048
1136
|
const elements = Object.keys(state.elements);
|
|
1049
|
-
const styles = fromPairs(
|
|
1050
|
-
|
|
1137
|
+
const styles = fromPairs(
|
|
1138
|
+
elements.map(
|
|
1139
|
+
(element) => [element, state.styles[element] || {}]
|
|
1140
|
+
)
|
|
1141
|
+
);
|
|
1142
|
+
const attributes = fromPairs(
|
|
1143
|
+
elements.map(
|
|
1144
|
+
(element) => [element, state.attributes[element]]
|
|
1145
|
+
)
|
|
1146
|
+
);
|
|
1051
1147
|
return {
|
|
1052
1148
|
styles,
|
|
1053
1149
|
attributes
|
|
@@ -1056,7 +1152,10 @@ function deriveState(state) {
|
|
|
1056
1152
|
|
|
1057
1153
|
const DEFAULT_ARROW_OFFSET = 0;
|
|
1058
1154
|
const usePopperContent = (props) => {
|
|
1059
|
-
const { popperInstanceRef, contentRef, triggerRef, role } = inject(
|
|
1155
|
+
const { popperInstanceRef, contentRef, triggerRef, role } = inject(
|
|
1156
|
+
POPPER_INJECTION_KEY,
|
|
1157
|
+
void 0
|
|
1158
|
+
);
|
|
1060
1159
|
const arrowRef = ref();
|
|
1061
1160
|
const arrowOffset = computed(() => props.arrowOffset);
|
|
1062
1161
|
const eventListenerModifier = computed(() => {
|
|
@@ -1089,18 +1188,23 @@ const usePopperContent = (props) => {
|
|
|
1089
1188
|
])
|
|
1090
1189
|
};
|
|
1091
1190
|
});
|
|
1092
|
-
const computedReference = computed(
|
|
1191
|
+
const computedReference = computed(
|
|
1192
|
+
() => unwrapMeasurableEl(props.referenceEl) || unref(triggerRef)
|
|
1193
|
+
);
|
|
1093
1194
|
const { attributes, state, styles, update, forceUpdate, instanceRef } = usePopper(computedReference, contentRef, options);
|
|
1094
1195
|
watch(instanceRef, (instance) => popperInstanceRef.value = instance, {
|
|
1095
1196
|
flush: "sync"
|
|
1096
1197
|
});
|
|
1097
1198
|
onMounted(() => {
|
|
1098
|
-
watch(
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1199
|
+
watch(
|
|
1200
|
+
() => {
|
|
1201
|
+
var _a, _b;
|
|
1202
|
+
return (_b = (_a = unref(computedReference)) == null ? void 0 : _a.getBoundingClientRect) == null ? void 0 : _b.call(_a);
|
|
1203
|
+
},
|
|
1204
|
+
() => {
|
|
1205
|
+
update();
|
|
1206
|
+
}
|
|
1207
|
+
);
|
|
1104
1208
|
});
|
|
1105
1209
|
onBeforeUnmount(() => {
|
|
1106
1210
|
popperInstanceRef.value = void 0;
|
|
@@ -1126,7 +1230,9 @@ const usePopperContentDOM = (props, {
|
|
|
1126
1230
|
const { nextZIndex } = useZIndex();
|
|
1127
1231
|
const ns = useNamespace("popper");
|
|
1128
1232
|
const contentAttrs = computed(() => unref(attributes).popper);
|
|
1129
|
-
const contentZIndex = ref(
|
|
1233
|
+
const contentZIndex = ref(
|
|
1234
|
+
isNumber(props.zIndex) ? props.zIndex : nextZIndex()
|
|
1235
|
+
);
|
|
1130
1236
|
const contentClass = computed(() => [
|
|
1131
1237
|
ns.b(),
|
|
1132
1238
|
ns.is("pure", props.pure),
|
|
@@ -1140,8 +1246,12 @@ const usePopperContentDOM = (props, {
|
|
|
1140
1246
|
props.popperStyle || {}
|
|
1141
1247
|
];
|
|
1142
1248
|
});
|
|
1143
|
-
const ariaModal = computed(
|
|
1144
|
-
|
|
1249
|
+
const ariaModal = computed(
|
|
1250
|
+
() => role.value === "dialog" ? "false" : void 0
|
|
1251
|
+
);
|
|
1252
|
+
const arrowStyle = computed(
|
|
1253
|
+
() => unref(styles).arrow || {}
|
|
1254
|
+
);
|
|
1145
1255
|
const updateZIndex = () => {
|
|
1146
1256
|
contentZIndex.value = isNumber(props.zIndex) ? props.zIndex : nextZIndex();
|
|
1147
1257
|
};
|
|
@@ -1156,14 +1266,15 @@ const usePopperContentDOM = (props, {
|
|
|
1156
1266
|
};
|
|
1157
1267
|
};
|
|
1158
1268
|
|
|
1159
|
-
const
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1269
|
+
const _sfc_main$3 = defineComponent({
|
|
1270
|
+
...{
|
|
1271
|
+
name: "ElPopperContent"
|
|
1272
|
+
},
|
|
1273
|
+
__name: "content",
|
|
1164
1274
|
props: popperContentProps,
|
|
1165
1275
|
emits: popperContentEmits,
|
|
1166
|
-
setup(__props, { expose, emit }) {
|
|
1276
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
1277
|
+
const emit = __emit;
|
|
1167
1278
|
const props = __props;
|
|
1168
1279
|
const {
|
|
1169
1280
|
focusStartRef,
|
|
@@ -1213,24 +1324,32 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
1213
1324
|
}
|
|
1214
1325
|
};
|
|
1215
1326
|
onMounted(() => {
|
|
1216
|
-
watch(
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1327
|
+
watch(
|
|
1328
|
+
() => props.triggerTargetEl,
|
|
1329
|
+
(triggerTargetEl, prevTriggerTargetEl) => {
|
|
1330
|
+
triggerTargetAriaStopWatch == null ? void 0 : triggerTargetAriaStopWatch();
|
|
1331
|
+
triggerTargetAriaStopWatch = void 0;
|
|
1332
|
+
const el = unref(triggerTargetEl || contentRef.value);
|
|
1333
|
+
const prevEl = unref(prevTriggerTargetEl || contentRef.value);
|
|
1334
|
+
if (isElement(el)) {
|
|
1335
|
+
triggerTargetAriaStopWatch = watch(
|
|
1336
|
+
[role, () => props.ariaLabel, ariaModal, () => props.id],
|
|
1337
|
+
(watches) => {
|
|
1338
|
+
["role", "aria-label", "aria-modal", "id"].forEach((key, idx) => {
|
|
1339
|
+
isNil(watches[idx]) ? el.removeAttribute(key) : el.setAttribute(key, watches[idx]);
|
|
1340
|
+
});
|
|
1341
|
+
},
|
|
1342
|
+
{ immediate: true }
|
|
1343
|
+
);
|
|
1344
|
+
}
|
|
1345
|
+
if (prevEl !== el && isElement(prevEl)) {
|
|
1346
|
+
["role", "aria-label", "aria-modal", "id"].forEach((key) => {
|
|
1347
|
+
prevEl.removeAttribute(key);
|
|
1225
1348
|
});
|
|
1226
|
-
}
|
|
1227
|
-
}
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
prevEl.removeAttribute(key);
|
|
1231
|
-
});
|
|
1232
|
-
}
|
|
1233
|
-
}, { immediate: true });
|
|
1349
|
+
}
|
|
1350
|
+
},
|
|
1351
|
+
{ immediate: true }
|
|
1352
|
+
);
|
|
1234
1353
|
watch(() => props.visible, togglePopperAlive, { immediate: true });
|
|
1235
1354
|
});
|
|
1236
1355
|
onBeforeUnmount(() => {
|
|
@@ -1238,45 +1357,50 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
1238
1357
|
triggerTargetAriaStopWatch = void 0;
|
|
1239
1358
|
contentRef.value = void 0;
|
|
1240
1359
|
});
|
|
1241
|
-
|
|
1360
|
+
__expose({
|
|
1242
1361
|
popperContentRef: contentRef,
|
|
1243
1362
|
popperInstanceRef: instanceRef,
|
|
1244
1363
|
updatePopper,
|
|
1245
1364
|
contentStyle
|
|
1246
1365
|
});
|
|
1247
1366
|
return (_ctx, _cache) => {
|
|
1248
|
-
return openBlock(), createElementBlock(
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1367
|
+
return openBlock(), createElementBlock(
|
|
1368
|
+
"div",
|
|
1369
|
+
mergeProps({
|
|
1370
|
+
ref_key: "contentRef",
|
|
1371
|
+
ref: contentRef
|
|
1372
|
+
}, unref(contentAttrs), {
|
|
1373
|
+
style: unref(contentStyle),
|
|
1374
|
+
class: unref(contentClass),
|
|
1375
|
+
tabindex: "-1",
|
|
1376
|
+
onMouseenter: _cache[0] || (_cache[0] = (e) => _ctx.$emit("mouseenter", e)),
|
|
1377
|
+
onMouseleave: _cache[1] || (_cache[1] = (e) => _ctx.$emit("mouseleave", e))
|
|
1378
|
+
}),
|
|
1379
|
+
[
|
|
1380
|
+
createVNode(unref(ElFocusTrap), {
|
|
1381
|
+
loop: _ctx.loop,
|
|
1382
|
+
trapped: unref(trapped),
|
|
1383
|
+
"trap-on-focus-in": true,
|
|
1384
|
+
"focus-trap-el": unref(contentRef),
|
|
1385
|
+
"focus-start-el": unref(focusStartRef),
|
|
1386
|
+
onFocusAfterTrapped: unref(onFocusAfterTrapped),
|
|
1387
|
+
onFocusAfterReleased: unref(onFocusAfterReleased),
|
|
1388
|
+
onFocusin: unref(onFocusInTrap),
|
|
1389
|
+
onFocusoutPrevented: unref(onFocusoutPrevented),
|
|
1390
|
+
onReleaseRequested: unref(onReleaseRequested)
|
|
1391
|
+
}, {
|
|
1392
|
+
default: withCtx(() => [
|
|
1393
|
+
renderSlot(_ctx.$slots, "default")
|
|
1394
|
+
]),
|
|
1395
|
+
_: 3
|
|
1396
|
+
}, 8, ["loop", "trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"])
|
|
1397
|
+
],
|
|
1398
|
+
16
|
|
1399
|
+
);
|
|
1276
1400
|
};
|
|
1277
1401
|
}
|
|
1278
1402
|
});
|
|
1279
|
-
var ElPopperContent = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1403
|
+
var ElPopperContent = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/popper/src/content.vue"]]);
|
|
1280
1404
|
|
|
1281
1405
|
const ElPopper = withInstall(Popper);
|
|
1282
1406
|
|
|
@@ -1345,14 +1469,6 @@ const useDelayedToggle = ({
|
|
|
1345
1469
|
};
|
|
1346
1470
|
};
|
|
1347
1471
|
|
|
1348
|
-
const teleportProps = buildProps({
|
|
1349
|
-
to: {
|
|
1350
|
-
type: definePropType([String, Object]),
|
|
1351
|
-
required: true
|
|
1352
|
-
},
|
|
1353
|
-
disabled: Boolean
|
|
1354
|
-
});
|
|
1355
|
-
|
|
1356
1472
|
const useTooltipContentProps = buildProps({
|
|
1357
1473
|
...useDelayedToggleProps,
|
|
1358
1474
|
...popperContentProps,
|
|
@@ -1418,7 +1534,9 @@ const createModelToggleComposable = (name) => {
|
|
|
1418
1534
|
const instance = getCurrentInstance();
|
|
1419
1535
|
const { emit } = instance;
|
|
1420
1536
|
const props = instance.props;
|
|
1421
|
-
const hasUpdateHandler = computed(
|
|
1537
|
+
const hasUpdateHandler = computed(
|
|
1538
|
+
() => isFunction(props[updateEventKeyRaw])
|
|
1539
|
+
);
|
|
1422
1540
|
const isModelBindingAbsent = computed(() => props[name] === null);
|
|
1423
1541
|
const doShow = (event) => {
|
|
1424
1542
|
if (indicator.value === true) {
|
|
@@ -1490,13 +1608,16 @@ const createModelToggleComposable = (name) => {
|
|
|
1490
1608
|
};
|
|
1491
1609
|
watch(() => props[name], onChange);
|
|
1492
1610
|
if (shouldHideWhenRouteChanges && instance.appContext.config.globalProperties.$route !== void 0) {
|
|
1493
|
-
watch(
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1611
|
+
watch(
|
|
1612
|
+
() => ({
|
|
1613
|
+
...instance.proxy.$route
|
|
1614
|
+
}),
|
|
1615
|
+
() => {
|
|
1616
|
+
if (shouldHideWhenRouteChanges.value && indicator.value) {
|
|
1617
|
+
hide();
|
|
1618
|
+
}
|
|
1498
1619
|
}
|
|
1499
|
-
|
|
1620
|
+
);
|
|
1500
1621
|
}
|
|
1501
1622
|
onMounted(() => {
|
|
1502
1623
|
onChange(props[name]);
|
|
@@ -1553,16 +1674,19 @@ const whenTrigger = (trigger, type, handler) => {
|
|
|
1553
1674
|
};
|
|
1554
1675
|
};
|
|
1555
1676
|
|
|
1556
|
-
const
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1677
|
+
const _sfc_main$2 = defineComponent({
|
|
1678
|
+
...{
|
|
1679
|
+
name: "ElTooltipTrigger"
|
|
1680
|
+
},
|
|
1681
|
+
__name: "trigger",
|
|
1561
1682
|
props: useTooltipTriggerProps,
|
|
1562
|
-
setup(__props, { expose }) {
|
|
1683
|
+
setup(__props, { expose: __expose }) {
|
|
1563
1684
|
const props = __props;
|
|
1564
1685
|
const ns = useNamespace("tooltip");
|
|
1565
|
-
const { controlled, id, open, onOpen, onClose, onToggle } = inject(
|
|
1686
|
+
const { controlled, id, open, onOpen, onClose, onToggle } = inject(
|
|
1687
|
+
TOOLTIP_INJECTION_KEY,
|
|
1688
|
+
void 0
|
|
1689
|
+
);
|
|
1566
1690
|
const triggerRef = ref(null);
|
|
1567
1691
|
const stopWhenControlledOrDisabled = () => {
|
|
1568
1692
|
if (unref(controlled) || props.disabled) {
|
|
@@ -1570,34 +1694,55 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
1570
1694
|
}
|
|
1571
1695
|
};
|
|
1572
1696
|
const trigger = toRef(props, "trigger");
|
|
1573
|
-
const onMouseenter = composeEventHandlers(
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
const
|
|
1589
|
-
|
|
1590
|
-
e
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1697
|
+
const onMouseenter = composeEventHandlers(
|
|
1698
|
+
stopWhenControlledOrDisabled,
|
|
1699
|
+
whenTrigger(trigger, "hover", (e) => {
|
|
1700
|
+
onOpen(e);
|
|
1701
|
+
if (props.focusOnTarget && e.target) {
|
|
1702
|
+
nextTick(() => {
|
|
1703
|
+
focusElement(e.target, { preventScroll: true });
|
|
1704
|
+
});
|
|
1705
|
+
}
|
|
1706
|
+
})
|
|
1707
|
+
);
|
|
1708
|
+
const onMouseleave = composeEventHandlers(
|
|
1709
|
+
stopWhenControlledOrDisabled,
|
|
1710
|
+
whenTrigger(trigger, "hover", onClose)
|
|
1711
|
+
);
|
|
1712
|
+
const onClick = composeEventHandlers(
|
|
1713
|
+
stopWhenControlledOrDisabled,
|
|
1714
|
+
whenTrigger(trigger, "click", (e) => {
|
|
1715
|
+
if (e.button === 0) {
|
|
1716
|
+
onToggle(e);
|
|
1717
|
+
}
|
|
1718
|
+
})
|
|
1719
|
+
);
|
|
1720
|
+
const onFocus = composeEventHandlers(
|
|
1721
|
+
stopWhenControlledOrDisabled,
|
|
1722
|
+
whenTrigger(trigger, "focus", onOpen)
|
|
1723
|
+
);
|
|
1724
|
+
const onBlur = composeEventHandlers(
|
|
1725
|
+
stopWhenControlledOrDisabled,
|
|
1726
|
+
whenTrigger(trigger, "focus", onClose)
|
|
1727
|
+
);
|
|
1728
|
+
const onContextMenu = composeEventHandlers(
|
|
1729
|
+
stopWhenControlledOrDisabled,
|
|
1730
|
+
whenTrigger(trigger, "contextmenu", (e) => {
|
|
1596
1731
|
e.preventDefault();
|
|
1597
1732
|
onToggle(e);
|
|
1733
|
+
})
|
|
1734
|
+
);
|
|
1735
|
+
const onKeydown = composeEventHandlers(
|
|
1736
|
+
stopWhenControlledOrDisabled,
|
|
1737
|
+
(e) => {
|
|
1738
|
+
const code = getEventCode(e);
|
|
1739
|
+
if (props.triggerKeys.includes(code)) {
|
|
1740
|
+
e.preventDefault();
|
|
1741
|
+
onToggle(e);
|
|
1742
|
+
}
|
|
1598
1743
|
}
|
|
1599
|
-
|
|
1600
|
-
|
|
1744
|
+
);
|
|
1745
|
+
__expose({
|
|
1601
1746
|
triggerRef
|
|
1602
1747
|
});
|
|
1603
1748
|
return (_ctx, _cache) => {
|
|
@@ -1623,25 +1768,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
1623
1768
|
};
|
|
1624
1769
|
}
|
|
1625
1770
|
});
|
|
1626
|
-
var ElTooltipTrigger = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1627
|
-
|
|
1628
|
-
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
1629
|
-
__name: "teleport",
|
|
1630
|
-
props: teleportProps,
|
|
1631
|
-
setup(__props) {
|
|
1632
|
-
return (_ctx, _cache) => {
|
|
1633
|
-
return _ctx.disabled ? renderSlot(_ctx.$slots, "default", { key: 0 }) : (openBlock(), createBlock(Teleport$1, {
|
|
1634
|
-
key: 1,
|
|
1635
|
-
to: _ctx.to
|
|
1636
|
-
}, [
|
|
1637
|
-
renderSlot(_ctx.$slots, "default")
|
|
1638
|
-
], 8, ["to"]));
|
|
1639
|
-
};
|
|
1640
|
-
}
|
|
1641
|
-
});
|
|
1642
|
-
var Teleport = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__file", "teleport.vue"]]);
|
|
1643
|
-
|
|
1644
|
-
const ElTeleport = withInstall(Teleport);
|
|
1771
|
+
var ElTooltipTrigger = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tooltip/src/trigger.vue"]]);
|
|
1645
1772
|
|
|
1646
1773
|
const usePopperContainerId = () => {
|
|
1647
1774
|
const namespace = useGetDerivedNamespace();
|
|
@@ -1666,7 +1793,7 @@ const usePopperContainer = () => {
|
|
|
1666
1793
|
onBeforeMount(() => {
|
|
1667
1794
|
if (!isClient)
|
|
1668
1795
|
return;
|
|
1669
|
-
if (
|
|
1796
|
+
if (process.env.NODE_ENV === "test" || !document.body.querySelector(selector.value)) {
|
|
1670
1797
|
createContainer(id.value);
|
|
1671
1798
|
}
|
|
1672
1799
|
});
|
|
@@ -1686,14 +1813,14 @@ const castArray = (arr) => {
|
|
|
1686
1813
|
return isArray(arr) ? arr : [arr];
|
|
1687
1814
|
};
|
|
1688
1815
|
|
|
1689
|
-
const
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1816
|
+
const _sfc_main$1 = defineComponent({
|
|
1817
|
+
...{
|
|
1818
|
+
name: "ElTooltipContent",
|
|
1819
|
+
inheritAttrs: false
|
|
1820
|
+
},
|
|
1821
|
+
__name: "content",
|
|
1695
1822
|
props: useTooltipContentProps,
|
|
1696
|
-
setup(__props, { expose }) {
|
|
1823
|
+
setup(__props, { expose: __expose }) {
|
|
1697
1824
|
const props = __props;
|
|
1698
1825
|
const { selector } = usePopperContainerId();
|
|
1699
1826
|
const ns = useNamespace("tooltip");
|
|
@@ -1719,8 +1846,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1719
1846
|
return props.transition || `${ns.namespace.value}-fade-in-linear`;
|
|
1720
1847
|
});
|
|
1721
1848
|
const persistentRef = computed(() => {
|
|
1722
|
-
if (
|
|
1723
|
-
if (
|
|
1849
|
+
if (process.env.NODE_ENV === "test") {
|
|
1850
|
+
if (!process.env.RUN_TEST_WITH_PERSISTENT) {
|
|
1724
1851
|
return true;
|
|
1725
1852
|
}
|
|
1726
1853
|
}
|
|
@@ -1784,43 +1911,54 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1784
1911
|
const activeElement = (event == null ? void 0 : event.relatedTarget) || document.activeElement;
|
|
1785
1912
|
return popperContent == null ? void 0 : popperContent.contains(activeElement);
|
|
1786
1913
|
};
|
|
1787
|
-
watch(
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1914
|
+
watch(
|
|
1915
|
+
() => unref(open),
|
|
1916
|
+
(val) => {
|
|
1917
|
+
if (!val) {
|
|
1918
|
+
stopHandle == null ? void 0 : stopHandle();
|
|
1919
|
+
} else {
|
|
1920
|
+
ariaHidden.value = false;
|
|
1921
|
+
stopHandle = onClickOutside(
|
|
1922
|
+
popperContentRef,
|
|
1923
|
+
() => {
|
|
1924
|
+
if (unref(controlled))
|
|
1925
|
+
return;
|
|
1926
|
+
const needClose = castArray(unref(trigger)).every((item) => {
|
|
1927
|
+
return item !== "hover" && item !== "focus";
|
|
1928
|
+
});
|
|
1929
|
+
if (needClose) {
|
|
1930
|
+
onClose();
|
|
1931
|
+
}
|
|
1932
|
+
},
|
|
1933
|
+
{ detectIframe: true }
|
|
1934
|
+
);
|
|
1935
|
+
}
|
|
1936
|
+
},
|
|
1937
|
+
{
|
|
1938
|
+
flush: "post"
|
|
1802
1939
|
}
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1940
|
+
);
|
|
1941
|
+
watch(
|
|
1942
|
+
() => props.content,
|
|
1943
|
+
() => {
|
|
1944
|
+
var _a, _b;
|
|
1945
|
+
(_b = (_a = contentRef.value) == null ? void 0 : _a.updatePopper) == null ? void 0 : _b.call(_a);
|
|
1946
|
+
}
|
|
1947
|
+
);
|
|
1948
|
+
__expose({
|
|
1811
1949
|
contentRef,
|
|
1812
1950
|
isFocusInsideContent
|
|
1813
1951
|
});
|
|
1814
1952
|
return (_ctx, _cache) => {
|
|
1815
1953
|
return openBlock(), createBlock(unref(ElTeleport), {
|
|
1816
1954
|
disabled: !_ctx.teleported,
|
|
1817
|
-
to:
|
|
1955
|
+
to: appendTo.value
|
|
1818
1956
|
}, {
|
|
1819
1957
|
default: withCtx(() => [
|
|
1820
|
-
|
|
1958
|
+
shouldRender.value || !ariaHidden.value ? (openBlock(), createBlock(Transition, {
|
|
1821
1959
|
key: 0,
|
|
1822
|
-
name:
|
|
1823
|
-
appear: !
|
|
1960
|
+
name: transitionClass.value,
|
|
1961
|
+
appear: !persistentRef.value,
|
|
1824
1962
|
onAfterLeave: onTransitionLeave,
|
|
1825
1963
|
onBeforeEnter,
|
|
1826
1964
|
onAfterEnter: onAfterShow,
|
|
@@ -1847,10 +1985,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1847
1985
|
enterable: _ctx.enterable,
|
|
1848
1986
|
pure: _ctx.pure,
|
|
1849
1987
|
"popper-class": _ctx.popperClass,
|
|
1850
|
-
"popper-style": [_ctx.popperStyle,
|
|
1988
|
+
"popper-style": [_ctx.popperStyle, contentStyle.value],
|
|
1851
1989
|
"reference-el": _ctx.referenceEl,
|
|
1852
1990
|
"trigger-target-el": _ctx.triggerTargetEl,
|
|
1853
|
-
visible:
|
|
1991
|
+
visible: shouldShow.value,
|
|
1854
1992
|
"z-index": _ctx.zIndex,
|
|
1855
1993
|
loop: _ctx.loop,
|
|
1856
1994
|
onMouseenter: unref(onContentEnter),
|
|
@@ -1863,7 +2001,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1863
2001
|
]),
|
|
1864
2002
|
_: 3
|
|
1865
2003
|
}, 16, ["id", "aria-label", "aria-hidden", "boundaries-padding", "fallback-placements", "gpu-acceleration", "offset", "placement", "popper-options", "arrow-offset", "strategy", "effect", "enterable", "pure", "popper-class", "popper-style", "reference-el", "trigger-target-el", "visible", "z-index", "loop", "onMouseenter", "onMouseleave", "onClose"]), [
|
|
1866
|
-
[vShow,
|
|
2004
|
+
[vShow, shouldShow.value]
|
|
1867
2005
|
])
|
|
1868
2006
|
]),
|
|
1869
2007
|
_: 3
|
|
@@ -1874,17 +2012,20 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1874
2012
|
};
|
|
1875
2013
|
}
|
|
1876
2014
|
});
|
|
1877
|
-
var ElTooltipContent = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "content.vue"]]);
|
|
2015
|
+
var ElTooltipContent = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tooltip/src/content.vue"]]);
|
|
1878
2016
|
|
|
1879
|
-
const
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
2017
|
+
const _hoisted_1 = ["innerHTML"];
|
|
2018
|
+
const _hoisted_2 = { key: 1 };
|
|
2019
|
+
const _sfc_main = defineComponent({
|
|
2020
|
+
...{
|
|
2021
|
+
name: "ElTooltip"
|
|
2022
|
+
},
|
|
2023
|
+
__name: "tooltip",
|
|
1884
2024
|
props: useTooltipProps,
|
|
1885
2025
|
emits: tooltipEmits,
|
|
1886
|
-
setup(__props, { expose, emit }) {
|
|
2026
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
1887
2027
|
const props = __props;
|
|
2028
|
+
const emit = __emit;
|
|
1888
2029
|
usePopperContainer();
|
|
1889
2030
|
const ns = useNamespace("tooltip");
|
|
1890
2031
|
const id = useId();
|
|
@@ -1910,7 +2051,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1910
2051
|
open: show,
|
|
1911
2052
|
close: hide
|
|
1912
2053
|
});
|
|
1913
|
-
const controlled = computed(
|
|
2054
|
+
const controlled = computed(
|
|
2055
|
+
() => isBoolean(props.visible) && !hasUpdateHandler.value
|
|
2056
|
+
);
|
|
1914
2057
|
const kls = computed(() => {
|
|
1915
2058
|
return [ns.b(), props.popperClass];
|
|
1916
2059
|
});
|
|
@@ -1942,11 +2085,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1942
2085
|
},
|
|
1943
2086
|
updatePopper
|
|
1944
2087
|
});
|
|
1945
|
-
watch(
|
|
1946
|
-
|
|
1947
|
-
|
|
2088
|
+
watch(
|
|
2089
|
+
() => props.disabled,
|
|
2090
|
+
(disabled) => {
|
|
2091
|
+
if (disabled && open.value) {
|
|
2092
|
+
open.value = false;
|
|
2093
|
+
}
|
|
1948
2094
|
}
|
|
1949
|
-
|
|
2095
|
+
);
|
|
1950
2096
|
const isFocusInsideContent = (event) => {
|
|
1951
2097
|
var _a;
|
|
1952
2098
|
return (_a = contentRef.value) == null ? void 0 : _a.isFocusInsideContent(event);
|
|
@@ -1955,7 +2101,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1955
2101
|
onBeforeUnmount(() => {
|
|
1956
2102
|
toggleReason.value = void 0;
|
|
1957
2103
|
});
|
|
1958
|
-
|
|
2104
|
+
__expose({
|
|
1959
2105
|
popperRef,
|
|
1960
2106
|
contentRef,
|
|
1961
2107
|
isFocusInsideContent,
|
|
@@ -1998,7 +2144,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1998
2144
|
"gpu-acceleration": _ctx.gpuAcceleration,
|
|
1999
2145
|
offset: _ctx.offset,
|
|
2000
2146
|
persistent: _ctx.persistent,
|
|
2001
|
-
"popper-class":
|
|
2147
|
+
"popper-class": kls.value,
|
|
2002
2148
|
"popper-style": _ctx.popperStyle,
|
|
2003
2149
|
placement: _ctx.placement,
|
|
2004
2150
|
"popper-options": _ctx.popperOptions,
|
|
@@ -2021,7 +2167,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2021
2167
|
_ctx.rawContent ? (openBlock(), createElementBlock("span", {
|
|
2022
2168
|
key: 0,
|
|
2023
2169
|
innerHTML: _ctx.content
|
|
2024
|
-
}, null, 8,
|
|
2170
|
+
}, null, 8, _hoisted_1)) : (openBlock(), createElementBlock(
|
|
2171
|
+
"span",
|
|
2172
|
+
_hoisted_2,
|
|
2173
|
+
toDisplayString(_ctx.content),
|
|
2174
|
+
1
|
|
2175
|
+
))
|
|
2025
2176
|
]),
|
|
2026
2177
|
_ctx.showArrow ? (openBlock(), createBlock(unref(ElPopperArrow), { key: 0 })) : createCommentVNode("v-if", true)
|
|
2027
2178
|
]),
|
|
@@ -2033,7 +2184,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2033
2184
|
};
|
|
2034
2185
|
}
|
|
2035
2186
|
});
|
|
2036
|
-
var Tooltip = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "tooltip.vue"]]);
|
|
2187
|
+
var Tooltip = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tooltip/src/tooltip.vue"]]);
|
|
2037
2188
|
|
|
2038
2189
|
const ElTooltip = withInstall(Tooltip);
|
|
2039
2190
|
|