@element-plus/nightly 0.0.20240205 → 0.0.20240207
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.full.js +2 -2
- package/dist/index.full.min.js +2 -2
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +2 -2
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +2 -2
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar-eg.js +1 -1
- package/dist/locale/ar-eg.min.js +1 -1
- package/dist/locale/ar-eg.min.mjs +1 -1
- package/dist/locale/ar-eg.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/sw.js +1 -1
- package/dist/locale/sw.min.js +1 -1
- package/dist/locale/sw.min.mjs +1 -1
- package/dist/locale/sw.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/affix/index.mjs +2 -2
- package/es/components/affix/src/affix.mjs +26 -117
- package/es/components/affix/src/affix.mjs.map +1 -1
- package/es/components/affix/src/affix2.mjs +117 -26
- package/es/components/affix/src/affix2.mjs.map +1 -1
- package/es/components/carousel/index.mjs +2 -2
- package/es/components/carousel/src/carousel.mjs +177 -56
- package/es/components/carousel/src/carousel.mjs.map +1 -1
- package/es/components/carousel/src/carousel2.mjs +56 -177
- package/es/components/carousel/src/carousel2.mjs.map +1 -1
- package/es/components/drawer/index.mjs +2 -2
- package/es/components/drawer/src/drawer.mjs +180 -27
- package/es/components/drawer/src/drawer.mjs.map +1 -1
- package/es/components/drawer/src/drawer2.mjs +27 -180
- package/es/components/drawer/src/drawer2.mjs.map +1 -1
- package/es/components/index.mjs +4 -4
- package/es/components/tabs/index.mjs +2 -2
- package/es/components/tabs/src/tab-pane.mjs +72 -13
- package/es/components/tabs/src/tab-pane.mjs.map +1 -1
- package/es/components/tabs/src/tab-pane2.mjs +13 -72
- package/es/components/tabs/src/tab-pane2.mjs.map +1 -1
- package/es/components/transfer/src/composables/use-check.mjs +1 -1
- package/es/components/transfer/src/transfer-panel.mjs +19 -128
- package/es/components/transfer/src/transfer-panel.mjs.map +1 -1
- package/es/components/transfer/src/transfer-panel2.mjs +128 -19
- package/es/components/transfer/src/transfer-panel2.mjs.map +1 -1
- package/es/components/transfer/src/transfer2.mjs +1 -1
- package/es/index.mjs +4 -4
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/affix/index.js +2 -2
- package/lib/components/affix/src/affix.js +27 -117
- package/lib/components/affix/src/affix.js.map +1 -1
- package/lib/components/affix/src/affix2.js +117 -27
- package/lib/components/affix/src/affix2.js.map +1 -1
- package/lib/components/carousel/index.js +2 -2
- package/lib/components/carousel/src/carousel.js +177 -57
- package/lib/components/carousel/src/carousel.js.map +1 -1
- package/lib/components/carousel/src/carousel2.js +57 -177
- package/lib/components/carousel/src/carousel2.js.map +1 -1
- package/lib/components/drawer/index.js +2 -2
- package/lib/components/drawer/src/drawer.js +180 -28
- package/lib/components/drawer/src/drawer.js.map +1 -1
- package/lib/components/drawer/src/drawer2.js +28 -180
- package/lib/components/drawer/src/drawer2.js.map +1 -1
- package/lib/components/index.js +4 -4
- package/lib/components/tabs/index.js +2 -2
- package/lib/components/tabs/src/tab-pane.js +72 -13
- package/lib/components/tabs/src/tab-pane.js.map +1 -1
- package/lib/components/tabs/src/tab-pane2.js +13 -72
- package/lib/components/tabs/src/tab-pane2.js.map +1 -1
- package/lib/components/transfer/src/composables/use-check.js +1 -1
- package/lib/components/transfer/src/transfer-panel.js +21 -128
- package/lib/components/transfer/src/transfer-panel.js.map +1 -1
- package/lib/components/transfer/src/transfer-panel2.js +128 -21
- package/lib/components/transfer/src/transfer-panel2.js.map +1 -1
- package/lib/components/transfer/src/transfer2.js +1 -1
- package/lib/index.js +4 -4
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +1 -1
- package/web-types.json +1 -1
|
@@ -1,186 +1,33 @@
|
|
|
1
|
-
import { defineComponent, useSlots, computed, ref, openBlock, createBlock, Teleport, createVNode, Transition, unref, withCtx, withDirectives, createElementVNode, mergeProps, withModifiers, normalizeClass, createElementBlock, renderSlot, toDisplayString, createCommentVNode, vShow } from 'vue';
|
|
2
|
-
import { Close } from '@element-plus/icons-vue';
|
|
3
|
-
import { ElOverlay } from '../../overlay/index.mjs';
|
|
4
|
-
import '../../focus-trap/index.mjs';
|
|
5
|
-
import '../../dialog/index.mjs';
|
|
6
1
|
import '../../../utils/index.mjs';
|
|
7
|
-
import
|
|
8
|
-
import '../../../
|
|
9
|
-
import {
|
|
10
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
11
|
-
import { useDeprecated } from '../../../hooks/use-deprecated/index.mjs';
|
|
12
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
13
|
-
import { useLocale } from '../../../hooks/use-locale/index.mjs';
|
|
14
|
-
import { useDialog } from '../../dialog/src/use-dialog.mjs';
|
|
15
|
-
import { addUnit } from '../../../utils/dom/style.mjs';
|
|
16
|
-
import ElFocusTrap from '../../focus-trap/src/focus-trap.mjs';
|
|
2
|
+
import '../../dialog/index.mjs';
|
|
3
|
+
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
|
4
|
+
import { dialogProps, dialogEmits } from '../../dialog/src/dialog.mjs';
|
|
17
5
|
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
const drawerRef = ref();
|
|
41
|
-
const focusStartRef = ref();
|
|
42
|
-
const ns = useNamespace("drawer");
|
|
43
|
-
const { t } = useLocale();
|
|
44
|
-
const {
|
|
45
|
-
afterEnter,
|
|
46
|
-
afterLeave,
|
|
47
|
-
beforeLeave,
|
|
48
|
-
visible,
|
|
49
|
-
rendered,
|
|
50
|
-
titleId,
|
|
51
|
-
bodyId,
|
|
52
|
-
onModalClick,
|
|
53
|
-
onOpenAutoFocus,
|
|
54
|
-
onCloseAutoFocus,
|
|
55
|
-
onFocusoutPrevented,
|
|
56
|
-
onCloseRequested,
|
|
57
|
-
handleClose
|
|
58
|
-
} = useDialog(props, drawerRef);
|
|
59
|
-
const isHorizontal = computed(() => props.direction === "rtl" || props.direction === "ltr");
|
|
60
|
-
const drawerSize = computed(() => addUnit(props.size));
|
|
61
|
-
expose({
|
|
62
|
-
handleClose,
|
|
63
|
-
afterEnter,
|
|
64
|
-
afterLeave
|
|
65
|
-
});
|
|
66
|
-
return (_ctx, _cache) => {
|
|
67
|
-
return openBlock(), createBlock(Teleport, {
|
|
68
|
-
to: "body",
|
|
69
|
-
disabled: !_ctx.appendToBody
|
|
70
|
-
}, [
|
|
71
|
-
createVNode(Transition, {
|
|
72
|
-
name: unref(ns).b("fade"),
|
|
73
|
-
onAfterEnter: unref(afterEnter),
|
|
74
|
-
onAfterLeave: unref(afterLeave),
|
|
75
|
-
onBeforeLeave: unref(beforeLeave),
|
|
76
|
-
persisted: ""
|
|
77
|
-
}, {
|
|
78
|
-
default: withCtx(() => [
|
|
79
|
-
withDirectives(createVNode(unref(ElOverlay), {
|
|
80
|
-
mask: _ctx.modal,
|
|
81
|
-
"overlay-class": _ctx.modalClass,
|
|
82
|
-
"z-index": _ctx.zIndex,
|
|
83
|
-
onClick: unref(onModalClick)
|
|
84
|
-
}, {
|
|
85
|
-
default: withCtx(() => [
|
|
86
|
-
createVNode(unref(ElFocusTrap), {
|
|
87
|
-
loop: "",
|
|
88
|
-
trapped: unref(visible),
|
|
89
|
-
"focus-trap-el": drawerRef.value,
|
|
90
|
-
"focus-start-el": focusStartRef.value,
|
|
91
|
-
onFocusAfterTrapped: unref(onOpenAutoFocus),
|
|
92
|
-
onFocusAfterReleased: unref(onCloseAutoFocus),
|
|
93
|
-
onFocusoutPrevented: unref(onFocusoutPrevented),
|
|
94
|
-
onReleaseRequested: unref(onCloseRequested)
|
|
95
|
-
}, {
|
|
96
|
-
default: withCtx(() => [
|
|
97
|
-
createElementVNode("div", mergeProps({
|
|
98
|
-
ref_key: "drawerRef",
|
|
99
|
-
ref: drawerRef,
|
|
100
|
-
"aria-modal": "true",
|
|
101
|
-
"aria-label": _ctx.title || void 0,
|
|
102
|
-
"aria-labelledby": !_ctx.title ? unref(titleId) : void 0,
|
|
103
|
-
"aria-describedby": unref(bodyId)
|
|
104
|
-
}, _ctx.$attrs, {
|
|
105
|
-
class: [unref(ns).b(), _ctx.direction, unref(visible) && "open"],
|
|
106
|
-
style: unref(isHorizontal) ? "width: " + unref(drawerSize) : "height: " + unref(drawerSize),
|
|
107
|
-
role: "dialog",
|
|
108
|
-
onClick: _cache[1] || (_cache[1] = withModifiers(() => {
|
|
109
|
-
}, ["stop"]))
|
|
110
|
-
}), [
|
|
111
|
-
createElementVNode("span", {
|
|
112
|
-
ref_key: "focusStartRef",
|
|
113
|
-
ref: focusStartRef,
|
|
114
|
-
class: normalizeClass(unref(ns).e("sr-focus")),
|
|
115
|
-
tabindex: "-1"
|
|
116
|
-
}, null, 2),
|
|
117
|
-
_ctx.withHeader ? (openBlock(), createElementBlock("header", {
|
|
118
|
-
key: 0,
|
|
119
|
-
class: normalizeClass(unref(ns).e("header"))
|
|
120
|
-
}, [
|
|
121
|
-
!_ctx.$slots.title ? renderSlot(_ctx.$slots, "header", {
|
|
122
|
-
key: 0,
|
|
123
|
-
close: unref(handleClose),
|
|
124
|
-
titleId: unref(titleId),
|
|
125
|
-
titleClass: unref(ns).e("title")
|
|
126
|
-
}, () => [
|
|
127
|
-
!_ctx.$slots.title ? (openBlock(), createElementBlock("span", {
|
|
128
|
-
key: 0,
|
|
129
|
-
id: unref(titleId),
|
|
130
|
-
role: "heading",
|
|
131
|
-
"aria-level": _ctx.headerAriaLevel,
|
|
132
|
-
class: normalizeClass(unref(ns).e("title"))
|
|
133
|
-
}, toDisplayString(_ctx.title), 11, _hoisted_2)) : createCommentVNode("v-if", true)
|
|
134
|
-
]) : renderSlot(_ctx.$slots, "title", { key: 1 }, () => [
|
|
135
|
-
createCommentVNode(" DEPRECATED SLOT ")
|
|
136
|
-
]),
|
|
137
|
-
_ctx.showClose ? (openBlock(), createElementBlock("button", {
|
|
138
|
-
key: 2,
|
|
139
|
-
"aria-label": unref(t)("el.drawer.close"),
|
|
140
|
-
class: normalizeClass(unref(ns).e("close-btn")),
|
|
141
|
-
type: "button",
|
|
142
|
-
onClick: _cache[0] || (_cache[0] = (...args) => unref(handleClose) && unref(handleClose)(...args))
|
|
143
|
-
}, [
|
|
144
|
-
createVNode(unref(ElIcon), {
|
|
145
|
-
class: normalizeClass(unref(ns).e("close"))
|
|
146
|
-
}, {
|
|
147
|
-
default: withCtx(() => [
|
|
148
|
-
createVNode(unref(Close))
|
|
149
|
-
]),
|
|
150
|
-
_: 1
|
|
151
|
-
}, 8, ["class"])
|
|
152
|
-
], 10, _hoisted_3)) : createCommentVNode("v-if", true)
|
|
153
|
-
], 2)) : createCommentVNode("v-if", true),
|
|
154
|
-
unref(rendered) ? (openBlock(), createElementBlock("div", {
|
|
155
|
-
key: 1,
|
|
156
|
-
id: unref(bodyId),
|
|
157
|
-
class: normalizeClass(unref(ns).e("body"))
|
|
158
|
-
}, [
|
|
159
|
-
renderSlot(_ctx.$slots, "default")
|
|
160
|
-
], 10, _hoisted_4)) : createCommentVNode("v-if", true),
|
|
161
|
-
_ctx.$slots.footer ? (openBlock(), createElementBlock("div", {
|
|
162
|
-
key: 2,
|
|
163
|
-
class: normalizeClass(unref(ns).e("footer"))
|
|
164
|
-
}, [
|
|
165
|
-
renderSlot(_ctx.$slots, "footer")
|
|
166
|
-
], 2)) : createCommentVNode("v-if", true)
|
|
167
|
-
], 16, _hoisted_1)
|
|
168
|
-
]),
|
|
169
|
-
_: 3
|
|
170
|
-
}, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusoutPrevented", "onReleaseRequested"])
|
|
171
|
-
]),
|
|
172
|
-
_: 3
|
|
173
|
-
}, 8, ["mask", "overlay-class", "z-index", "onClick"]), [
|
|
174
|
-
[vShow, unref(visible)]
|
|
175
|
-
])
|
|
176
|
-
]),
|
|
177
|
-
_: 3
|
|
178
|
-
}, 8, ["name", "onAfterEnter", "onAfterLeave", "onBeforeLeave"])
|
|
179
|
-
], 8, ["disabled"]);
|
|
180
|
-
};
|
|
6
|
+
const drawerProps = buildProps({
|
|
7
|
+
...dialogProps,
|
|
8
|
+
direction: {
|
|
9
|
+
type: String,
|
|
10
|
+
default: "rtl",
|
|
11
|
+
values: ["ltr", "rtl", "ttb", "btt"]
|
|
12
|
+
},
|
|
13
|
+
size: {
|
|
14
|
+
type: [String, Number],
|
|
15
|
+
default: "30%"
|
|
16
|
+
},
|
|
17
|
+
withHeader: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: true
|
|
20
|
+
},
|
|
21
|
+
modalFade: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: true
|
|
24
|
+
},
|
|
25
|
+
headerAriaLevel: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: "2"
|
|
181
28
|
}
|
|
182
29
|
});
|
|
183
|
-
|
|
30
|
+
const drawerEmits = dialogEmits;
|
|
184
31
|
|
|
185
|
-
export {
|
|
32
|
+
export { drawerEmits, drawerProps };
|
|
186
33
|
//# sourceMappingURL=drawer2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer2.mjs","sources":["../../../../../../packages/components/drawer/src/drawer.
|
|
1
|
+
{"version":3,"file":"drawer2.mjs","sources":["../../../../../../packages/components/drawer/src/drawer.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport { dialogEmits, dialogProps } from '@element-plus/components/dialog'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const drawerProps = buildProps({\n ...dialogProps,\n direction: {\n type: String,\n default: 'rtl',\n values: ['ltr', 'rtl', 'ttb', 'btt'],\n },\n size: {\n type: [String, Number],\n default: '30%',\n },\n withHeader: {\n type: Boolean,\n default: true,\n },\n modalFade: {\n type: Boolean,\n default: true,\n },\n headerAriaLevel: {\n type: String,\n default: '2',\n },\n} as const)\n\nexport type DrawerProps = ExtractPropTypes<typeof drawerProps>\n\nexport const drawerEmits = dialogEmits\n"],"names":[],"mappings":";;;;;AAEY,MAAC,WAAW,GAAG,UAAU,CAAC;AACtC,EAAE,GAAG,WAAW;AAChB,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK;AAClB,IAAI,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;AACxC,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,eAAe,EAAE;AACnB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,WAAW,GAAG;;;;"}
|
package/es/components/index.mjs
CHANGED
|
@@ -77,7 +77,7 @@ export { ElMessage } from './message/index.mjs';
|
|
|
77
77
|
export { ElMessageBox } from './message-box/index.mjs';
|
|
78
78
|
export { ElNotification } from './notification/index.mjs';
|
|
79
79
|
export { ElPopover, ElPopoverDirective } from './popover/index.mjs';
|
|
80
|
-
export { affixEmits, affixProps } from './affix/src/
|
|
80
|
+
export { affixEmits, affixProps } from './affix/src/affix.mjs';
|
|
81
81
|
export { alertEffects, alertEmits, alertProps } from './alert/src/alert.mjs';
|
|
82
82
|
export { autocompleteEmits, autocompleteProps } from './autocomplete/src/autocomplete.mjs';
|
|
83
83
|
export { avatarEmits, avatarProps } from './avatar/src/avatar.mjs';
|
|
@@ -90,7 +90,7 @@ export { buttonEmits, buttonNativeTypes, buttonProps, buttonTypes } from './butt
|
|
|
90
90
|
export { buttonGroupContextKey } from './button/src/constants.mjs';
|
|
91
91
|
export { calendarEmits, calendarProps } from './calendar/src/calendar.mjs';
|
|
92
92
|
export { cardProps } from './card/src/card.mjs';
|
|
93
|
-
export { carouselEmits, carouselProps } from './carousel/src/
|
|
93
|
+
export { carouselEmits, carouselProps } from './carousel/src/carousel2.mjs';
|
|
94
94
|
export { carouselItemProps } from './carousel/src/carousel-item.mjs';
|
|
95
95
|
export { carouselContextKey } from './carousel/src/constants.mjs';
|
|
96
96
|
export { cascaderEmits, cascaderProps } from './cascader/src/cascader.mjs';
|
|
@@ -117,7 +117,7 @@ export { useDialog } from './dialog/src/use-dialog.mjs';
|
|
|
117
117
|
export { dialogEmits, dialogProps } from './dialog/src/dialog.mjs';
|
|
118
118
|
export { dialogInjectionKey } from './dialog/src/constants.mjs';
|
|
119
119
|
export { dividerProps } from './divider/src/divider.mjs';
|
|
120
|
-
export { drawerEmits, drawerProps } from './drawer/src/
|
|
120
|
+
export { drawerEmits, drawerProps } from './drawer/src/drawer2.mjs';
|
|
121
121
|
export { DROPDOWN_COLLECTION_INJECTION_KEY, DROPDOWN_COLLECTION_ITEM_INJECTION_KEY, ElCollection, ElCollectionItem, FIRST_KEYS, FIRST_LAST_KEYS, LAST_KEYS, dropdownItemProps, dropdownMenuProps, dropdownProps } from './dropdown/src/dropdown.mjs';
|
|
122
122
|
export { DROPDOWN_INJECTION_KEY } from './dropdown/src/tokens.mjs';
|
|
123
123
|
export { emptyProps } from './empty/src/empty.mjs';
|
|
@@ -183,7 +183,7 @@ export { tableV2RowProps } from './table-v2/src/row.mjs';
|
|
|
183
183
|
export { tabsEmits, tabsProps } from './tabs/src/tabs.mjs';
|
|
184
184
|
export { tabBarProps } from './tabs/src/tab-bar.mjs';
|
|
185
185
|
export { tabNavEmits, tabNavProps } from './tabs/src/tab-nav.mjs';
|
|
186
|
-
export { tabPaneProps } from './tabs/src/tab-
|
|
186
|
+
export { tabPaneProps } from './tabs/src/tab-pane2.mjs';
|
|
187
187
|
export { tabsRootContextKey } from './tabs/src/constants.mjs';
|
|
188
188
|
export { tagEmits, tagProps } from './tag/src/tag.mjs';
|
|
189
189
|
export { textProps } from './text/src/text.mjs';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import '../../utils/index.mjs';
|
|
2
2
|
import Tabs from './src/tabs.mjs';
|
|
3
3
|
export { tabsEmits, tabsProps } from './src/tabs.mjs';
|
|
4
|
-
import TabPane from './src/tab-
|
|
4
|
+
import TabPane from './src/tab-pane.mjs';
|
|
5
5
|
export { tabBarProps } from './src/tab-bar.mjs';
|
|
6
6
|
export { tabNavEmits, tabNavProps } from './src/tab-nav.mjs';
|
|
7
|
-
export { tabPaneProps } from './src/tab-
|
|
7
|
+
export { tabPaneProps } from './src/tab-pane2.mjs';
|
|
8
8
|
export { tabsRootContextKey } from './src/constants.mjs';
|
|
9
9
|
import { withInstall, withNoopInstall } from '../../utils/vue/install.mjs';
|
|
10
10
|
|
|
@@ -1,18 +1,77 @@
|
|
|
1
|
+
import { defineComponent, getCurrentInstance, useSlots, inject, ref, computed, watch, reactive, onMounted, onUnmounted, unref, withDirectives, openBlock, createElementBlock, normalizeClass, renderSlot, vShow, createCommentVNode } from 'vue';
|
|
2
|
+
import { eagerComputed } from '@vueuse/core';
|
|
1
3
|
import '../../../utils/index.mjs';
|
|
2
|
-
import
|
|
4
|
+
import '../../../hooks/index.mjs';
|
|
5
|
+
import { tabsRootContextKey } from './constants.mjs';
|
|
6
|
+
import { tabPaneProps } from './tab-pane2.mjs';
|
|
7
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
8
|
+
import { throwError } from '../../../utils/error.mjs';
|
|
9
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
3
10
|
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
},
|
|
9
|
-
name: {
|
|
10
|
-
type: [String, Number]
|
|
11
|
-
},
|
|
12
|
-
closable: Boolean,
|
|
13
|
-
disabled: Boolean,
|
|
14
|
-
lazy: Boolean
|
|
11
|
+
const _hoisted_1 = ["id", "aria-hidden", "aria-labelledby"];
|
|
12
|
+
const COMPONENT_NAME = "ElTabPane";
|
|
13
|
+
const __default__ = defineComponent({
|
|
14
|
+
name: COMPONENT_NAME
|
|
15
15
|
});
|
|
16
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
17
|
+
...__default__,
|
|
18
|
+
props: tabPaneProps,
|
|
19
|
+
setup(__props) {
|
|
20
|
+
const props = __props;
|
|
21
|
+
const instance = getCurrentInstance();
|
|
22
|
+
const slots = useSlots();
|
|
23
|
+
const tabsRoot = inject(tabsRootContextKey);
|
|
24
|
+
if (!tabsRoot)
|
|
25
|
+
throwError(COMPONENT_NAME, "usage: <el-tabs><el-tab-pane /></el-tabs/>");
|
|
26
|
+
const ns = useNamespace("tab-pane");
|
|
27
|
+
const index = ref();
|
|
28
|
+
const isClosable = computed(() => props.closable || tabsRoot.props.closable);
|
|
29
|
+
const active = eagerComputed(() => {
|
|
30
|
+
var _a;
|
|
31
|
+
return tabsRoot.currentName.value === ((_a = props.name) != null ? _a : index.value);
|
|
32
|
+
});
|
|
33
|
+
const loaded = ref(active.value);
|
|
34
|
+
const paneName = computed(() => {
|
|
35
|
+
var _a;
|
|
36
|
+
return (_a = props.name) != null ? _a : index.value;
|
|
37
|
+
});
|
|
38
|
+
const shouldBeRender = eagerComputed(() => !props.lazy || loaded.value || active.value);
|
|
39
|
+
watch(active, (val) => {
|
|
40
|
+
if (val)
|
|
41
|
+
loaded.value = true;
|
|
42
|
+
});
|
|
43
|
+
const pane = reactive({
|
|
44
|
+
uid: instance.uid,
|
|
45
|
+
slots,
|
|
46
|
+
props,
|
|
47
|
+
paneName,
|
|
48
|
+
active,
|
|
49
|
+
index,
|
|
50
|
+
isClosable
|
|
51
|
+
});
|
|
52
|
+
onMounted(() => {
|
|
53
|
+
tabsRoot.registerPane(pane);
|
|
54
|
+
});
|
|
55
|
+
onUnmounted(() => {
|
|
56
|
+
tabsRoot.unregisterPane(pane.uid);
|
|
57
|
+
});
|
|
58
|
+
return (_ctx, _cache) => {
|
|
59
|
+
return unref(shouldBeRender) ? withDirectives((openBlock(), createElementBlock("div", {
|
|
60
|
+
key: 0,
|
|
61
|
+
id: `pane-${unref(paneName)}`,
|
|
62
|
+
class: normalizeClass(unref(ns).b()),
|
|
63
|
+
role: "tabpanel",
|
|
64
|
+
"aria-hidden": !unref(active),
|
|
65
|
+
"aria-labelledby": `tab-${unref(paneName)}`
|
|
66
|
+
}, [
|
|
67
|
+
renderSlot(_ctx.$slots, "default")
|
|
68
|
+
], 10, _hoisted_1)), [
|
|
69
|
+
[vShow, unref(active)]
|
|
70
|
+
]) : createCommentVNode("v-if", true);
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
var TabPane = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "tab-pane.vue"]]);
|
|
16
75
|
|
|
17
|
-
export {
|
|
76
|
+
export { TabPane as default };
|
|
18
77
|
//# sourceMappingURL=tab-pane.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tab-pane.mjs","sources":["../../../../../../packages/components/tabs/src/tab-pane.
|
|
1
|
+
{"version":3,"file":"tab-pane.mjs","sources":["../../../../../../packages/components/tabs/src/tab-pane.vue"],"sourcesContent":["<template>\n <div\n v-if=\"shouldBeRender\"\n v-show=\"active\"\n :id=\"`pane-${paneName}`\"\n :class=\"ns.b()\"\n role=\"tabpanel\"\n :aria-hidden=\"!active\"\n :aria-labelledby=\"`tab-${paneName}`\"\n >\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n computed,\n getCurrentInstance,\n inject,\n onMounted,\n onUnmounted,\n reactive,\n ref,\n useSlots,\n watch,\n} from 'vue'\nimport { eagerComputed } from '@vueuse/core'\nimport { throwError } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { tabsRootContextKey } from './constants'\nimport { tabPaneProps } from './tab-pane'\n\nconst COMPONENT_NAME = 'ElTabPane'\ndefineOptions({\n name: COMPONENT_NAME,\n})\nconst props = defineProps(tabPaneProps)\n\nconst instance = getCurrentInstance()!\nconst slots = useSlots()\n\nconst tabsRoot = inject(tabsRootContextKey)\nif (!tabsRoot)\n throwError(COMPONENT_NAME, 'usage: <el-tabs><el-tab-pane /></el-tabs/>')\n\nconst ns = useNamespace('tab-pane')\n\nconst index = ref<string>()\nconst isClosable = computed(() => props.closable || tabsRoot.props.closable)\nconst active = eagerComputed(\n () => tabsRoot.currentName.value === (props.name ?? index.value)\n)\nconst loaded = ref(active.value)\nconst paneName = computed(() => props.name ?? index.value)\nconst shouldBeRender = eagerComputed(\n () => !props.lazy || loaded.value || active.value\n)\n\nwatch(active, (val) => {\n if (val) loaded.value = true\n})\n\nconst pane = reactive({\n uid: instance.uid,\n slots,\n props,\n paneName,\n active,\n index,\n isClosable,\n})\n\nonMounted(() => {\n tabsRoot.registerPane(pane)\n})\n\nonUnmounted(() => {\n tabsRoot.unregisterPane(pane.uid)\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;mCAiCc,CAAA;AAAA,EACZ,IAAM,EAAA,cAAA;AACR;;;;;;AAGA,IAAA,MAAM,WAAW,kBAAmB,EAAA,CAAA;AACpC,IAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AAEvB,IAAM,MAAA,QAAA,GAAW,OAAO,kBAAkB,CAAA,CAAA;AAC1C,IAAA,IAAI,CAAC,QAAA;AACH,MAAA,UAAA,CAAW,gBAAgB,4CAA4C,CAAA,CAAA;AAEzE,IAAM,MAAA,EAAA,GAAK,aAAa,UAAU,CAAA,CAAA;AAElC,IAAA,MAAM,QAAQ,GAAY,EAAA,CAAA;AAC1B,IAAA,MAAM,aAAa,QAAS,CAAA,MAAM,MAAM,QAAY,IAAA,QAAA,CAAS,MAAM,QAAQ,CAAA,CAAA;AAC3E,IAAM,MAAA,MAAA,GAAS,cACb,MAAM;AAER,MAAM,IAAA,EAAA,CAAA;AACN,MAAA,eAAiB,CAAS,WAAA,CAAA,KAAY,MAAA,CAAA,EAAA,QAAc,CAAK,IAAA,KAAA,IAAA,GAAA,EAAA,GAAA,KAAA,CAAA,KAAA,CAAA,CAAA;AACzD,KAAM,CAAA,CAAA;AAIN,IAAM,MAAA,MAAA,GAAS,GAAQ,CAAA,MAAA,CAAA,KAAA,CAAA,CAAA;AACrB,IAAI,MAAA,QAAA,GAAA,QAAA,CAAA,MAAA;AAAK,MAAA,IAAA,EAAA,CAAA;AAAe,MACzB,OAAA,CAAA,EAAA,GAAA,KAAA,CAAA,IAAA,KAAA,IAAA,GAAA,EAAA,GAAA,KAAA,CAAA,KAAA,CAAA;AAED,KAAA,CAAA,CAAA;AAAsB,IAAA,oBACN,GAAA,aAAA,CAAA,MAAA,CAAA,KAAA,CAAA,IAAA,IAAA,MAAA,CAAA,KAAA,IAAA,MAAA,CAAA,KAAA,CAAA,CAAA;AAAA,IACd,KAAA,CAAA,MAAA,EAAA,CAAA,GAAA,KAAA;AAAA,MACA,IAAA,GAAA;AAAA,QACA,MAAA,CAAA,KAAA,GAAA,IAAA,CAAA;AAAA,KACA,CAAA,CAAA;AAAA,IACA,MAAA,IAAA,GAAA,QAAA,CAAA;AAAA,MACA,GAAA,EAAA,QAAA,CAAA,GAAA;AAAA,MACD,KAAA;AAED,MAAA,KAAA;AACE,MAAA,QAAA;AAA0B,MAC3B,MAAA;AAED,MAAA,KAAA;AACE,MAAS,UAAA;AAAuB,KACjC,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,77 +1,18 @@
|
|
|
1
|
-
import { defineComponent, getCurrentInstance, useSlots, inject, ref, computed, watch, reactive, onMounted, onUnmounted, unref, withDirectives, openBlock, createElementBlock, normalizeClass, renderSlot, vShow, createCommentVNode } from 'vue';
|
|
2
|
-
import { eagerComputed } from '@vueuse/core';
|
|
3
1
|
import '../../../utils/index.mjs';
|
|
4
|
-
import '../../../
|
|
5
|
-
import { tabsRootContextKey } from './constants.mjs';
|
|
6
|
-
import { tabPaneProps } from './tab-pane.mjs';
|
|
7
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
8
|
-
import { throwError } from '../../../utils/error.mjs';
|
|
9
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
2
|
+
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
|
10
3
|
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
4
|
+
const tabPaneProps = buildProps({
|
|
5
|
+
label: {
|
|
6
|
+
type: String,
|
|
7
|
+
default: ""
|
|
8
|
+
},
|
|
9
|
+
name: {
|
|
10
|
+
type: [String, Number]
|
|
11
|
+
},
|
|
12
|
+
closable: Boolean,
|
|
13
|
+
disabled: Boolean,
|
|
14
|
+
lazy: Boolean
|
|
15
15
|
});
|
|
16
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
17
|
-
...__default__,
|
|
18
|
-
props: tabPaneProps,
|
|
19
|
-
setup(__props) {
|
|
20
|
-
const props = __props;
|
|
21
|
-
const instance = getCurrentInstance();
|
|
22
|
-
const slots = useSlots();
|
|
23
|
-
const tabsRoot = inject(tabsRootContextKey);
|
|
24
|
-
if (!tabsRoot)
|
|
25
|
-
throwError(COMPONENT_NAME, "usage: <el-tabs><el-tab-pane /></el-tabs/>");
|
|
26
|
-
const ns = useNamespace("tab-pane");
|
|
27
|
-
const index = ref();
|
|
28
|
-
const isClosable = computed(() => props.closable || tabsRoot.props.closable);
|
|
29
|
-
const active = eagerComputed(() => {
|
|
30
|
-
var _a;
|
|
31
|
-
return tabsRoot.currentName.value === ((_a = props.name) != null ? _a : index.value);
|
|
32
|
-
});
|
|
33
|
-
const loaded = ref(active.value);
|
|
34
|
-
const paneName = computed(() => {
|
|
35
|
-
var _a;
|
|
36
|
-
return (_a = props.name) != null ? _a : index.value;
|
|
37
|
-
});
|
|
38
|
-
const shouldBeRender = eagerComputed(() => !props.lazy || loaded.value || active.value);
|
|
39
|
-
watch(active, (val) => {
|
|
40
|
-
if (val)
|
|
41
|
-
loaded.value = true;
|
|
42
|
-
});
|
|
43
|
-
const pane = reactive({
|
|
44
|
-
uid: instance.uid,
|
|
45
|
-
slots,
|
|
46
|
-
props,
|
|
47
|
-
paneName,
|
|
48
|
-
active,
|
|
49
|
-
index,
|
|
50
|
-
isClosable
|
|
51
|
-
});
|
|
52
|
-
onMounted(() => {
|
|
53
|
-
tabsRoot.registerPane(pane);
|
|
54
|
-
});
|
|
55
|
-
onUnmounted(() => {
|
|
56
|
-
tabsRoot.unregisterPane(pane.uid);
|
|
57
|
-
});
|
|
58
|
-
return (_ctx, _cache) => {
|
|
59
|
-
return unref(shouldBeRender) ? withDirectives((openBlock(), createElementBlock("div", {
|
|
60
|
-
key: 0,
|
|
61
|
-
id: `pane-${unref(paneName)}`,
|
|
62
|
-
class: normalizeClass(unref(ns).b()),
|
|
63
|
-
role: "tabpanel",
|
|
64
|
-
"aria-hidden": !unref(active),
|
|
65
|
-
"aria-labelledby": `tab-${unref(paneName)}`
|
|
66
|
-
}, [
|
|
67
|
-
renderSlot(_ctx.$slots, "default")
|
|
68
|
-
], 10, _hoisted_1)), [
|
|
69
|
-
[vShow, unref(active)]
|
|
70
|
-
]) : createCommentVNode("v-if", true);
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
var TabPane = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "tab-pane.vue"]]);
|
|
75
16
|
|
|
76
|
-
export {
|
|
17
|
+
export { tabPaneProps };
|
|
77
18
|
//# sourceMappingURL=tab-pane2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tab-pane2.mjs","sources":["../../../../../../packages/components/tabs/src/tab-pane.
|
|
1
|
+
{"version":3,"file":"tab-pane2.mjs","sources":["../../../../../../packages/components/tabs/src/tab-pane.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type TabPane from './tab-pane.vue'\n\nexport const tabPaneProps = buildProps({\n label: {\n type: String,\n default: '',\n },\n name: {\n type: [String, Number],\n },\n closable: Boolean,\n disabled: Boolean,\n lazy: Boolean,\n} as const)\n\nexport type TabPaneProps = ExtractPropTypes<typeof tabPaneProps>\n\nexport type TabPaneInstance = InstanceType<typeof TabPane>\n"],"names":[],"mappings":";;;AACY,MAAC,YAAY,GAAG,UAAU,CAAC;AACvC,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,IAAI,EAAE,OAAO;AACf,CAAC;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed, watch } from 'vue';
|
|
2
2
|
import '../../../../utils/index.mjs';
|
|
3
|
-
import { CHECKED_CHANGE_EVENT } from '../transfer-
|
|
3
|
+
import { CHECKED_CHANGE_EVENT } from '../transfer-panel.mjs';
|
|
4
4
|
import { usePropsAlias } from './use-props-alias.mjs';
|
|
5
5
|
import { isFunction } from '@vue/shared';
|
|
6
6
|
|