@element-plus/nightly 0.0.20221014 → 0.0.20221016
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.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/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/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/alert/index.mjs +2 -2
- package/es/components/alert/src/alert.mjs +36 -96
- package/es/components/alert/src/alert.mjs.map +1 -1
- package/es/components/alert/src/alert2.mjs +96 -36
- package/es/components/alert/src/alert2.mjs.map +1 -1
- package/es/components/avatar/index.mjs +2 -2
- package/es/components/avatar/src/avatar.mjs +32 -67
- package/es/components/avatar/src/avatar.mjs.map +1 -1
- package/es/components/avatar/src/avatar2.mjs +67 -32
- package/es/components/avatar/src/avatar2.mjs.map +1 -1
- package/es/components/badge/index.mjs +2 -2
- package/es/components/badge/src/badge.mjs +17 -55
- package/es/components/badge/src/badge.mjs.map +1 -1
- package/es/components/badge/src/badge2.mjs +55 -17
- package/es/components/badge/src/badge2.mjs.map +1 -1
- package/es/components/card/index.mjs +2 -2
- package/es/components/card/src/card.mjs +16 -35
- package/es/components/card/src/card.mjs.map +1 -1
- package/es/components/card/src/card2.mjs +35 -16
- package/es/components/card/src/card2.mjs.map +1 -1
- package/es/components/descriptions/src/description2.mjs +1 -1
- package/es/components/descriptions/src/descriptions-row.mjs +7 -64
- package/es/components/descriptions/src/descriptions-row.mjs.map +1 -1
- package/es/components/descriptions/src/descriptions-row2.mjs +64 -7
- package/es/components/descriptions/src/descriptions-row2.mjs.map +1 -1
- package/es/components/index.mjs +10 -10
- package/es/components/input-number/index.mjs +2 -2
- package/es/components/input-number/src/input-number.mjs +57 -298
- package/es/components/input-number/src/input-number.mjs.map +1 -1
- package/es/components/input-number/src/input-number2.mjs +298 -57
- package/es/components/input-number/src/input-number2.mjs.map +1 -1
- package/es/components/menu/index.mjs +2 -2
- package/es/components/menu/src/menu-item.mjs +14 -100
- package/es/components/menu/src/menu-item.mjs.map +1 -1
- package/es/components/menu/src/menu-item2.mjs +100 -14
- package/es/components/menu/src/menu-item2.mjs.map +1 -1
- package/es/components/page-header/index.mjs +2 -2
- package/es/components/page-header/src/page-header.mjs +17 -102
- package/es/components/page-header/src/page-header.mjs.map +1 -1
- package/es/components/page-header/src/page-header2.mjs +102 -17
- package/es/components/page-header/src/page-header2.mjs.map +1 -1
- package/es/components/pagination/src/components/prev.mjs +18 -34
- package/es/components/pagination/src/components/prev.mjs.map +1 -1
- package/es/components/pagination/src/components/prev2.mjs +34 -18
- package/es/components/pagination/src/components/prev2.mjs.map +1 -1
- package/es/components/pagination/src/pagination.mjs +1 -1
- package/es/components/radio/index.mjs +2 -2
- package/es/components/radio/src/radio-button.mjs +9 -64
- package/es/components/radio/src/radio-button.mjs.map +1 -1
- package/es/components/radio/src/radio-button2.mjs +64 -9
- package/es/components/radio/src/radio-button2.mjs.map +1 -1
- package/es/components/steps/index.mjs +2 -2
- package/es/components/steps/src/item.mjs +20 -191
- package/es/components/steps/src/item.mjs.map +1 -1
- package/es/components/steps/src/item2.mjs +191 -20
- package/es/components/steps/src/item2.mjs.map +1 -1
- package/es/components/tabs/index.mjs +2 -2
- package/es/components/tabs/src/tab-pane.mjs +13 -73
- package/es/components/tabs/src/tab-pane.mjs.map +1 -1
- package/es/components/tabs/src/tab-pane2.mjs +73 -13
- 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 -131
- package/es/components/transfer/src/transfer-panel.mjs.map +1 -1
- package/es/components/transfer/src/transfer-panel2.mjs +131 -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 +10 -10
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/alert/index.js +2 -2
- package/lib/components/alert/src/alert.js +37 -95
- package/lib/components/alert/src/alert.js.map +1 -1
- package/lib/components/alert/src/alert2.js +95 -37
- package/lib/components/alert/src/alert2.js.map +1 -1
- package/lib/components/avatar/index.js +2 -2
- package/lib/components/avatar/src/avatar.js +33 -67
- package/lib/components/avatar/src/avatar.js.map +1 -1
- package/lib/components/avatar/src/avatar2.js +67 -33
- package/lib/components/avatar/src/avatar2.js.map +1 -1
- package/lib/components/badge/index.js +2 -2
- package/lib/components/badge/src/badge.js +17 -55
- package/lib/components/badge/src/badge.js.map +1 -1
- package/lib/components/badge/src/badge2.js +55 -17
- package/lib/components/badge/src/badge2.js.map +1 -1
- package/lib/components/card/index.js +2 -2
- package/lib/components/card/src/card.js +16 -35
- package/lib/components/card/src/card.js.map +1 -1
- package/lib/components/card/src/card2.js +35 -16
- package/lib/components/card/src/card2.js.map +1 -1
- package/lib/components/descriptions/src/description2.js +1 -1
- package/lib/components/descriptions/src/descriptions-row.js +7 -64
- package/lib/components/descriptions/src/descriptions-row.js.map +1 -1
- package/lib/components/descriptions/src/descriptions-row2.js +64 -7
- package/lib/components/descriptions/src/descriptions-row2.js.map +1 -1
- package/lib/components/index.js +10 -10
- package/lib/components/input-number/index.js +2 -2
- package/lib/components/input-number/src/input-number.js +57 -297
- package/lib/components/input-number/src/input-number.js.map +1 -1
- package/lib/components/input-number/src/input-number2.js +297 -57
- package/lib/components/input-number/src/input-number2.js.map +1 -1
- package/lib/components/menu/index.js +2 -2
- package/lib/components/menu/src/menu-item.js +15 -100
- package/lib/components/menu/src/menu-item.js.map +1 -1
- package/lib/components/menu/src/menu-item2.js +100 -15
- package/lib/components/menu/src/menu-item2.js.map +1 -1
- package/lib/components/page-header/index.js +2 -2
- package/lib/components/page-header/src/page-header.js +18 -102
- package/lib/components/page-header/src/page-header.js.map +1 -1
- package/lib/components/page-header/src/page-header2.js +102 -18
- package/lib/components/page-header/src/page-header2.js.map +1 -1
- package/lib/components/pagination/src/components/prev.js +19 -34
- package/lib/components/pagination/src/components/prev.js.map +1 -1
- package/lib/components/pagination/src/components/prev2.js +34 -19
- package/lib/components/pagination/src/components/prev2.js.map +1 -1
- package/lib/components/pagination/src/pagination.js +1 -1
- package/lib/components/radio/index.js +2 -2
- package/lib/components/radio/src/radio-button.js +9 -64
- package/lib/components/radio/src/radio-button.js.map +1 -1
- package/lib/components/radio/src/radio-button2.js +64 -9
- package/lib/components/radio/src/radio-button2.js.map +1 -1
- package/lib/components/steps/index.js +2 -2
- package/lib/components/steps/src/item.js +20 -191
- package/lib/components/steps/src/item.js.map +1 -1
- package/lib/components/steps/src/item2.js +191 -20
- package/lib/components/steps/src/item2.js.map +1 -1
- package/lib/components/tabs/index.js +2 -2
- package/lib/components/tabs/src/tab-pane.js +13 -73
- package/lib/components/tabs/src/tab-pane.js.map +1 -1
- package/lib/components/tabs/src/tab-pane2.js +73 -13
- 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 -131
- package/lib/components/transfer/src/transfer-panel.js.map +1 -1
- package/lib/components/transfer/src/transfer-panel2.js +131 -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 +10 -10
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/web-types.json +1 -1
|
@@ -1,25 +1,196 @@
|
|
|
1
|
-
import '
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import { defineComponent, ref, inject, getCurrentInstance, onMounted, watch, onBeforeUnmount, computed, reactive, openBlock, createElementBlock, normalizeStyle, unref, normalizeClass, createCommentVNode, createElementVNode, renderSlot, createBlock, withCtx, resolveDynamicComponent, createVNode, toDisplayString, createTextVNode } from 'vue';
|
|
2
|
+
import '../../../hooks/index.mjs';
|
|
3
|
+
import { ElIcon } from '../../icon/index.mjs';
|
|
4
|
+
import { Check, Close } from '@element-plus/icons-vue';
|
|
5
|
+
import { stepProps } from './item.mjs';
|
|
6
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
7
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
4
8
|
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
9
|
+
const __default__ = defineComponent({
|
|
10
|
+
name: "ElStep"
|
|
11
|
+
});
|
|
12
|
+
const _sfc_main = defineComponent({
|
|
13
|
+
...__default__,
|
|
14
|
+
props: stepProps,
|
|
15
|
+
setup(__props) {
|
|
16
|
+
const props = __props;
|
|
17
|
+
const ns = useNamespace("step");
|
|
18
|
+
const index = ref(-1);
|
|
19
|
+
const lineStyle = ref({});
|
|
20
|
+
const internalStatus = ref("");
|
|
21
|
+
const parent = inject("ElSteps");
|
|
22
|
+
const currentInstance = getCurrentInstance();
|
|
23
|
+
onMounted(() => {
|
|
24
|
+
watch([
|
|
25
|
+
() => parent.props.active,
|
|
26
|
+
() => parent.props.processStatus,
|
|
27
|
+
() => parent.props.finishStatus
|
|
28
|
+
], ([active]) => {
|
|
29
|
+
updateStatus(active);
|
|
30
|
+
}, { immediate: true });
|
|
31
|
+
});
|
|
32
|
+
onBeforeUnmount(() => {
|
|
33
|
+
parent.steps.value = parent.steps.value.filter((instance) => instance.uid !== (currentInstance == null ? void 0 : currentInstance.uid));
|
|
34
|
+
});
|
|
35
|
+
const currentStatus = computed(() => {
|
|
36
|
+
return props.status || internalStatus.value;
|
|
37
|
+
});
|
|
38
|
+
const prevStatus = computed(() => {
|
|
39
|
+
const prevStep = parent.steps.value[index.value - 1];
|
|
40
|
+
return prevStep ? prevStep.currentStatus : "wait";
|
|
41
|
+
});
|
|
42
|
+
const isCenter = computed(() => {
|
|
43
|
+
return parent.props.alignCenter;
|
|
44
|
+
});
|
|
45
|
+
const isVertical = computed(() => {
|
|
46
|
+
return parent.props.direction === "vertical";
|
|
47
|
+
});
|
|
48
|
+
const isSimple = computed(() => {
|
|
49
|
+
return parent.props.simple;
|
|
50
|
+
});
|
|
51
|
+
const stepsCount = computed(() => {
|
|
52
|
+
return parent.steps.value.length;
|
|
53
|
+
});
|
|
54
|
+
const isLast = computed(() => {
|
|
55
|
+
var _a;
|
|
56
|
+
return ((_a = parent.steps.value[stepsCount.value - 1]) == null ? void 0 : _a.uid) === (currentInstance == null ? void 0 : currentInstance.uid);
|
|
57
|
+
});
|
|
58
|
+
const space = computed(() => {
|
|
59
|
+
return isSimple.value ? "" : parent.props.space;
|
|
60
|
+
});
|
|
61
|
+
const style = computed(() => {
|
|
62
|
+
const style2 = {
|
|
63
|
+
flexBasis: typeof space.value === "number" ? `${space.value}px` : space.value ? space.value : `${100 / (stepsCount.value - (isCenter.value ? 0 : 1))}%`
|
|
64
|
+
};
|
|
65
|
+
if (isVertical.value)
|
|
66
|
+
return style2;
|
|
67
|
+
if (isLast.value) {
|
|
68
|
+
style2.maxWidth = `${100 / stepsCount.value}%`;
|
|
69
|
+
}
|
|
70
|
+
return style2;
|
|
71
|
+
});
|
|
72
|
+
const setIndex = (val) => {
|
|
73
|
+
index.value = val;
|
|
74
|
+
};
|
|
75
|
+
const calcProgress = (status) => {
|
|
76
|
+
let step = 100;
|
|
77
|
+
const style2 = {};
|
|
78
|
+
style2.transitionDelay = `${150 * index.value}ms`;
|
|
79
|
+
if (status === parent.props.processStatus) {
|
|
80
|
+
step = 0;
|
|
81
|
+
} else if (status === "wait") {
|
|
82
|
+
step = 0;
|
|
83
|
+
style2.transitionDelay = `${-150 * index.value}ms`;
|
|
84
|
+
}
|
|
85
|
+
style2.borderWidth = step && !isSimple.value ? "1px" : 0;
|
|
86
|
+
style2[parent.props.direction === "vertical" ? "height" : "width"] = `${step}%`;
|
|
87
|
+
lineStyle.value = style2;
|
|
88
|
+
};
|
|
89
|
+
const updateStatus = (activeIndex) => {
|
|
90
|
+
if (activeIndex > index.value) {
|
|
91
|
+
internalStatus.value = parent.props.finishStatus;
|
|
92
|
+
} else if (activeIndex === index.value && prevStatus.value !== "error") {
|
|
93
|
+
internalStatus.value = parent.props.processStatus;
|
|
94
|
+
} else {
|
|
95
|
+
internalStatus.value = "wait";
|
|
96
|
+
}
|
|
97
|
+
const prevChild = parent.steps.value[index.value - 1];
|
|
98
|
+
if (prevChild)
|
|
99
|
+
prevChild.calcProgress(internalStatus.value);
|
|
100
|
+
};
|
|
101
|
+
const stepItemState = reactive({
|
|
102
|
+
uid: computed(() => currentInstance == null ? void 0 : currentInstance.uid),
|
|
103
|
+
currentStatus,
|
|
104
|
+
setIndex,
|
|
105
|
+
calcProgress
|
|
106
|
+
});
|
|
107
|
+
parent.steps.value = [...parent.steps.value, stepItemState];
|
|
108
|
+
return (_ctx, _cache) => {
|
|
109
|
+
return openBlock(), createElementBlock("div", {
|
|
110
|
+
style: normalizeStyle(unref(style)),
|
|
111
|
+
class: normalizeClass([
|
|
112
|
+
unref(ns).b(),
|
|
113
|
+
unref(ns).is(unref(isSimple) ? "simple" : unref(parent).props.direction),
|
|
114
|
+
unref(ns).is("flex", unref(isLast) && !unref(space) && !unref(isCenter)),
|
|
115
|
+
unref(ns).is("center", unref(isCenter) && !unref(isVertical) && !unref(isSimple))
|
|
116
|
+
])
|
|
117
|
+
}, [
|
|
118
|
+
createCommentVNode(" icon & line "),
|
|
119
|
+
createElementVNode("div", {
|
|
120
|
+
class: normalizeClass([unref(ns).e("head"), unref(ns).is(unref(currentStatus))])
|
|
121
|
+
}, [
|
|
122
|
+
!unref(isSimple) ? (openBlock(), createElementBlock("div", {
|
|
123
|
+
key: 0,
|
|
124
|
+
class: normalizeClass(unref(ns).e("line"))
|
|
125
|
+
}, [
|
|
126
|
+
createElementVNode("i", {
|
|
127
|
+
class: normalizeClass(unref(ns).e("line-inner")),
|
|
128
|
+
style: normalizeStyle(lineStyle.value)
|
|
129
|
+
}, null, 6)
|
|
130
|
+
], 2)) : createCommentVNode("v-if", true),
|
|
131
|
+
createElementVNode("div", {
|
|
132
|
+
class: normalizeClass([unref(ns).e("icon"), unref(ns).is(_ctx.icon || _ctx.$slots.icon ? "icon" : "text")])
|
|
133
|
+
}, [
|
|
134
|
+
renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
135
|
+
_ctx.icon ? (openBlock(), createBlock(unref(ElIcon), {
|
|
136
|
+
key: 0,
|
|
137
|
+
class: normalizeClass(unref(ns).e("icon-inner"))
|
|
138
|
+
}, {
|
|
139
|
+
default: withCtx(() => [
|
|
140
|
+
(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon)))
|
|
141
|
+
]),
|
|
142
|
+
_: 1
|
|
143
|
+
}, 8, ["class"])) : unref(currentStatus) === "success" ? (openBlock(), createBlock(unref(ElIcon), {
|
|
144
|
+
key: 1,
|
|
145
|
+
class: normalizeClass([unref(ns).e("icon-inner"), unref(ns).is("status")])
|
|
146
|
+
}, {
|
|
147
|
+
default: withCtx(() => [
|
|
148
|
+
createVNode(unref(Check))
|
|
149
|
+
]),
|
|
150
|
+
_: 1
|
|
151
|
+
}, 8, ["class"])) : unref(currentStatus) === "error" ? (openBlock(), createBlock(unref(ElIcon), {
|
|
152
|
+
key: 2,
|
|
153
|
+
class: normalizeClass([unref(ns).e("icon-inner"), unref(ns).is("status")])
|
|
154
|
+
}, {
|
|
155
|
+
default: withCtx(() => [
|
|
156
|
+
createVNode(unref(Close))
|
|
157
|
+
]),
|
|
158
|
+
_: 1
|
|
159
|
+
}, 8, ["class"])) : !unref(isSimple) ? (openBlock(), createElementBlock("div", {
|
|
160
|
+
key: 3,
|
|
161
|
+
class: normalizeClass(unref(ns).e("icon-inner"))
|
|
162
|
+
}, toDisplayString(index.value + 1), 3)) : createCommentVNode("v-if", true)
|
|
163
|
+
])
|
|
164
|
+
], 2)
|
|
165
|
+
], 2),
|
|
166
|
+
createCommentVNode(" title & description "),
|
|
167
|
+
createElementVNode("div", {
|
|
168
|
+
class: normalizeClass(unref(ns).e("main"))
|
|
169
|
+
}, [
|
|
170
|
+
createElementVNode("div", {
|
|
171
|
+
class: normalizeClass([unref(ns).e("title"), unref(ns).is(unref(currentStatus))])
|
|
172
|
+
}, [
|
|
173
|
+
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
174
|
+
createTextVNode(toDisplayString(_ctx.title), 1)
|
|
175
|
+
])
|
|
176
|
+
], 2),
|
|
177
|
+
unref(isSimple) ? (openBlock(), createElementBlock("div", {
|
|
178
|
+
key: 0,
|
|
179
|
+
class: normalizeClass(unref(ns).e("arrow"))
|
|
180
|
+
}, null, 2)) : (openBlock(), createElementBlock("div", {
|
|
181
|
+
key: 1,
|
|
182
|
+
class: normalizeClass([unref(ns).e("description"), unref(ns).is(unref(currentStatus))])
|
|
183
|
+
}, [
|
|
184
|
+
renderSlot(_ctx.$slots, "description", {}, () => [
|
|
185
|
+
createTextVNode(toDisplayString(_ctx.description), 1)
|
|
186
|
+
])
|
|
187
|
+
], 2))
|
|
188
|
+
], 2)
|
|
189
|
+
], 6);
|
|
190
|
+
};
|
|
21
191
|
}
|
|
22
192
|
});
|
|
193
|
+
var Step = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/steps/src/item.vue"]]);
|
|
23
194
|
|
|
24
|
-
export {
|
|
195
|
+
export { Step as default };
|
|
25
196
|
//# sourceMappingURL=item2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"item2.mjs","sources":["../../../../../../packages/components/steps/src/item.
|
|
1
|
+
{"version":3,"file":"item2.mjs","sources":["../../../../../../packages/components/steps/src/item.vue"],"sourcesContent":["<template>\n <div\n :style=\"style\"\n :class=\"[\n ns.b(),\n ns.is(isSimple ? 'simple' : parent.props.direction),\n ns.is('flex', isLast && !space && !isCenter),\n ns.is('center', isCenter && !isVertical && !isSimple),\n ]\"\n >\n <!-- icon & line -->\n <div :class=\"[ns.e('head'), ns.is(currentStatus)]\">\n <div v-if=\"!isSimple\" :class=\"ns.e('line')\">\n <i :class=\"ns.e('line-inner')\" :style=\"lineStyle\" />\n </div>\n\n <div\n :class=\"[ns.e('icon'), ns.is(icon || $slots.icon ? 'icon' : 'text')]\"\n >\n <slot name=\"icon\">\n <el-icon v-if=\"icon\" :class=\"ns.e('icon-inner')\">\n <component :is=\"icon\" />\n </el-icon>\n <el-icon\n v-else-if=\"currentStatus === 'success'\"\n :class=\"[ns.e('icon-inner'), ns.is('status')]\"\n >\n <Check />\n </el-icon>\n <el-icon\n v-else-if=\"currentStatus === 'error'\"\n :class=\"[ns.e('icon-inner'), ns.is('status')]\"\n >\n <Close />\n </el-icon>\n <div v-else-if=\"!isSimple\" :class=\"ns.e('icon-inner')\">\n {{ index + 1 }}\n </div>\n </slot>\n </div>\n </div>\n <!-- title & description -->\n <div :class=\"ns.e('main')\">\n <div :class=\"[ns.e('title'), ns.is(currentStatus)]\">\n <slot name=\"title\">{{ title }}</slot>\n </div>\n <div v-if=\"isSimple\" :class=\"ns.e('arrow')\" />\n <div v-else :class=\"[ns.e('description'), ns.is(currentStatus)]\">\n <slot name=\"description\">{{ description }}</slot>\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n computed,\n getCurrentInstance,\n inject,\n onBeforeUnmount,\n onMounted,\n reactive,\n ref,\n watch,\n} from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { Check, Close } from '@element-plus/icons-vue'\nimport { stepProps } from './item'\n\nimport type { CSSProperties, Ref } from 'vue'\n\nexport interface IStepsProps {\n space: number | string\n active: number\n direction: string\n alignCenter: boolean\n simple: boolean\n finishStatus: string\n processStatus: string\n}\n\nexport interface StepItemState {\n uid: number | undefined\n currentStatus: string\n setIndex: (val: number) => void\n calcProgress: (status: string) => void\n}\n\nexport interface IStepsInject {\n props: IStepsProps\n steps: Ref<StepItemState[]>\n}\n\ndefineOptions({\n name: 'ElStep',\n})\n\nconst props = defineProps(stepProps)\nconst ns = useNamespace('step')\nconst index = ref(-1)\nconst lineStyle = ref({})\nconst internalStatus = ref('')\nconst parent = inject('ElSteps') as IStepsInject\nconst currentInstance = getCurrentInstance()\n\nonMounted(() => {\n watch(\n [\n () => parent.props.active,\n () => parent.props.processStatus,\n () => parent.props.finishStatus,\n ],\n ([active]) => {\n updateStatus(active)\n },\n { immediate: true }\n )\n})\n\nonBeforeUnmount(() => {\n parent.steps.value = parent.steps.value.filter(\n (instance) => instance.uid !== currentInstance?.uid\n )\n})\n\nconst currentStatus = computed(() => {\n return props.status || internalStatus.value\n})\n\nconst prevStatus = computed(() => {\n const prevStep = parent.steps.value[index.value - 1]\n return prevStep ? prevStep.currentStatus : 'wait'\n})\n\nconst isCenter = computed(() => {\n return parent.props.alignCenter\n})\n\nconst isVertical = computed(() => {\n return parent.props.direction === 'vertical'\n})\n\nconst isSimple = computed(() => {\n return parent.props.simple\n})\n\nconst stepsCount = computed(() => {\n return parent.steps.value.length\n})\n\nconst isLast = computed(() => {\n return parent.steps.value[stepsCount.value - 1]?.uid === currentInstance?.uid\n})\n\nconst space = computed(() => {\n return isSimple.value ? '' : parent.props.space\n})\n\nconst style = computed(() => {\n const style: CSSProperties = {\n flexBasis:\n typeof space.value === 'number'\n ? `${space.value}px`\n : space.value\n ? space.value\n : `${100 / (stepsCount.value - (isCenter.value ? 0 : 1))}%`,\n }\n if (isVertical.value) return style\n if (isLast.value) {\n style.maxWidth = `${100 / stepsCount.value}%`\n }\n return style\n})\n\nconst setIndex = (val: number) => {\n index.value = val\n}\n\nconst calcProgress = (status: string) => {\n let step = 100\n const style: CSSProperties = {}\n style.transitionDelay = `${150 * index.value}ms`\n if (status === parent.props.processStatus) {\n step = 0\n } else if (status === 'wait') {\n step = 0\n style.transitionDelay = `${-150 * index.value}ms`\n }\n style.borderWidth = step && !isSimple.value ? '1px' : 0\n style[parent.props.direction === 'vertical' ? 'height' : 'width'] = `${step}%`\n lineStyle.value = style\n}\n\nconst updateStatus = (activeIndex: number) => {\n if (activeIndex > index.value) {\n internalStatus.value = parent.props.finishStatus\n } else if (activeIndex === index.value && prevStatus.value !== 'error') {\n internalStatus.value = parent.props.processStatus\n } else {\n internalStatus.value = 'wait'\n }\n const prevChild = parent.steps.value[index.value - 1]\n if (prevChild) prevChild.calcProgress(internalStatus.value)\n}\n\nconst stepItemState = reactive({\n uid: computed(() => currentInstance?.uid),\n currentStatus,\n setIndex,\n calcProgress,\n})\n\nparent.steps.value = [...parent.steps.value, stepItemState]\n</script>\n"],"names":[],"mappings":";;;;;;;;m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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-pane2.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-pane.mjs';
|
|
8
8
|
import { withInstall, withNoopInstall } from '../../utils/vue/install.mjs';
|
|
9
9
|
|
|
10
10
|
const ElTabs = withInstall(Tabs, {
|
|
@@ -1,78 +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
|
-
import '../../../tokens/index.mjs';
|
|
4
1
|
import '../../../utils/index.mjs';
|
|
5
|
-
import '../../../
|
|
6
|
-
import { tabPaneProps } from './tab-pane2.mjs';
|
|
7
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
8
|
-
import { tabsRootContextKey } from '../../../tokens/tabs.mjs';
|
|
9
|
-
import { throwError } from '../../../utils/error.mjs';
|
|
10
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
2
|
+
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
|
11
3
|
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
|
16
15
|
});
|
|
17
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
18
|
-
...__default__,
|
|
19
|
-
props: tabPaneProps,
|
|
20
|
-
setup(__props) {
|
|
21
|
-
const props = __props;
|
|
22
|
-
const instance = getCurrentInstance();
|
|
23
|
-
const slots = useSlots();
|
|
24
|
-
const tabsRoot = inject(tabsRootContextKey);
|
|
25
|
-
if (!tabsRoot)
|
|
26
|
-
throwError(COMPONENT_NAME, "usage: <el-tabs><el-tab-pane /></el-tabs/>");
|
|
27
|
-
const ns = useNamespace("tab-pane");
|
|
28
|
-
const index = ref();
|
|
29
|
-
const isClosable = computed(() => props.closable || tabsRoot.props.closable);
|
|
30
|
-
const active = eagerComputed(() => {
|
|
31
|
-
var _a;
|
|
32
|
-
return tabsRoot.currentName.value === ((_a = props.name) != null ? _a : index.value);
|
|
33
|
-
});
|
|
34
|
-
const loaded = ref(active.value);
|
|
35
|
-
const paneName = computed(() => {
|
|
36
|
-
var _a;
|
|
37
|
-
return (_a = props.name) != null ? _a : index.value;
|
|
38
|
-
});
|
|
39
|
-
const shouldBeRender = eagerComputed(() => !props.lazy || loaded.value || active.value);
|
|
40
|
-
watch(active, (val) => {
|
|
41
|
-
if (val)
|
|
42
|
-
loaded.value = true;
|
|
43
|
-
});
|
|
44
|
-
const pane = reactive({
|
|
45
|
-
uid: instance.uid,
|
|
46
|
-
slots,
|
|
47
|
-
props,
|
|
48
|
-
paneName,
|
|
49
|
-
active,
|
|
50
|
-
index,
|
|
51
|
-
isClosable
|
|
52
|
-
});
|
|
53
|
-
onMounted(() => {
|
|
54
|
-
tabsRoot.registerPane(pane);
|
|
55
|
-
});
|
|
56
|
-
onUnmounted(() => {
|
|
57
|
-
tabsRoot.unregisterPane(pane.uid);
|
|
58
|
-
});
|
|
59
|
-
return (_ctx, _cache) => {
|
|
60
|
-
return unref(shouldBeRender) ? withDirectives((openBlock(), createElementBlock("div", {
|
|
61
|
-
key: 0,
|
|
62
|
-
id: `pane-${unref(paneName)}`,
|
|
63
|
-
class: normalizeClass(unref(ns).b()),
|
|
64
|
-
role: "tabpanel",
|
|
65
|
-
"aria-hidden": !unref(active),
|
|
66
|
-
"aria-labelledby": `tab-${unref(paneName)}`
|
|
67
|
-
}, [
|
|
68
|
-
renderSlot(_ctx.$slots, "default")
|
|
69
|
-
], 10, _hoisted_1)), [
|
|
70
|
-
[vShow, unref(active)]
|
|
71
|
-
]) : createCommentVNode("v-if", true);
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
var TabPane = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tabs/src/tab-pane.vue"]]);
|
|
76
16
|
|
|
77
|
-
export {
|
|
17
|
+
export { tabPaneProps };
|
|
78
18
|
//# 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.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,18 +1,78 @@
|
|
|
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
|
+
import '../../../tokens/index.mjs';
|
|
1
4
|
import '../../../utils/index.mjs';
|
|
2
|
-
import
|
|
5
|
+
import '../../../hooks/index.mjs';
|
|
6
|
+
import { tabPaneProps } from './tab-pane.mjs';
|
|
7
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
8
|
+
import { tabsRootContextKey } from '../../../tokens/tabs.mjs';
|
|
9
|
+
import { throwError } from '../../../utils/error.mjs';
|
|
10
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
3
11
|
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
},
|
|
9
|
-
name: {
|
|
10
|
-
type: [String, Number]
|
|
11
|
-
},
|
|
12
|
-
closable: Boolean,
|
|
13
|
-
disabled: Boolean,
|
|
14
|
-
lazy: Boolean
|
|
12
|
+
const _hoisted_1 = ["id", "aria-hidden", "aria-labelledby"];
|
|
13
|
+
const COMPONENT_NAME = "ElTabPane";
|
|
14
|
+
const __default__ = defineComponent({
|
|
15
|
+
name: COMPONENT_NAME
|
|
15
16
|
});
|
|
17
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
18
|
+
...__default__,
|
|
19
|
+
props: tabPaneProps,
|
|
20
|
+
setup(__props) {
|
|
21
|
+
const props = __props;
|
|
22
|
+
const instance = getCurrentInstance();
|
|
23
|
+
const slots = useSlots();
|
|
24
|
+
const tabsRoot = inject(tabsRootContextKey);
|
|
25
|
+
if (!tabsRoot)
|
|
26
|
+
throwError(COMPONENT_NAME, "usage: <el-tabs><el-tab-pane /></el-tabs/>");
|
|
27
|
+
const ns = useNamespace("tab-pane");
|
|
28
|
+
const index = ref();
|
|
29
|
+
const isClosable = computed(() => props.closable || tabsRoot.props.closable);
|
|
30
|
+
const active = eagerComputed(() => {
|
|
31
|
+
var _a;
|
|
32
|
+
return tabsRoot.currentName.value === ((_a = props.name) != null ? _a : index.value);
|
|
33
|
+
});
|
|
34
|
+
const loaded = ref(active.value);
|
|
35
|
+
const paneName = computed(() => {
|
|
36
|
+
var _a;
|
|
37
|
+
return (_a = props.name) != null ? _a : index.value;
|
|
38
|
+
});
|
|
39
|
+
const shouldBeRender = eagerComputed(() => !props.lazy || loaded.value || active.value);
|
|
40
|
+
watch(active, (val) => {
|
|
41
|
+
if (val)
|
|
42
|
+
loaded.value = true;
|
|
43
|
+
});
|
|
44
|
+
const pane = reactive({
|
|
45
|
+
uid: instance.uid,
|
|
46
|
+
slots,
|
|
47
|
+
props,
|
|
48
|
+
paneName,
|
|
49
|
+
active,
|
|
50
|
+
index,
|
|
51
|
+
isClosable
|
|
52
|
+
});
|
|
53
|
+
onMounted(() => {
|
|
54
|
+
tabsRoot.registerPane(pane);
|
|
55
|
+
});
|
|
56
|
+
onUnmounted(() => {
|
|
57
|
+
tabsRoot.unregisterPane(pane.uid);
|
|
58
|
+
});
|
|
59
|
+
return (_ctx, _cache) => {
|
|
60
|
+
return unref(shouldBeRender) ? withDirectives((openBlock(), createElementBlock("div", {
|
|
61
|
+
key: 0,
|
|
62
|
+
id: `pane-${unref(paneName)}`,
|
|
63
|
+
class: normalizeClass(unref(ns).b()),
|
|
64
|
+
role: "tabpanel",
|
|
65
|
+
"aria-hidden": !unref(active),
|
|
66
|
+
"aria-labelledby": `tab-${unref(paneName)}`
|
|
67
|
+
}, [
|
|
68
|
+
renderSlot(_ctx.$slots, "default")
|
|
69
|
+
], 10, _hoisted_1)), [
|
|
70
|
+
[vShow, unref(active)]
|
|
71
|
+
]) : createCommentVNode("v-if", true);
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
var TabPane = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tabs/src/tab-pane.vue"]]);
|
|
16
76
|
|
|
17
|
-
export {
|
|
77
|
+
export { TabPane as default };
|
|
18
78
|
//# 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.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 { tabsRootContextKey } from '@element-plus/tokens'\nimport { throwError } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\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,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
|
|
|
@@ -1,136 +1,24 @@
|
|
|
1
|
-
import { defineComponent, useSlots, reactive, computed, toRefs, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, createVNode, isRef, withCtx, createTextVNode, toDisplayString, createBlock, createCommentVNode, withDirectives, Fragment, renderList, vShow, renderSlot } from 'vue';
|
|
2
1
|
import '../../../utils/index.mjs';
|
|
3
|
-
import '
|
|
4
|
-
import {
|
|
5
|
-
import { ElInput } from '../../input/index.mjs';
|
|
6
|
-
import { Search } from '@element-plus/icons-vue';
|
|
7
|
-
import { transferPanelProps, transferPanelEmits } from './transfer-panel2.mjs';
|
|
8
|
-
import './composables/index.mjs';
|
|
9
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
10
|
-
import { useLocale } from '../../../hooks/use-locale/index.mjs';
|
|
11
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
12
|
-
import { usePropsAlias } from './composables/use-props-alias.mjs';
|
|
13
|
-
import { useCheck } from './composables/use-check.mjs';
|
|
14
|
-
import { isEmpty } from '../../../utils/types.mjs';
|
|
2
|
+
import { transferProps, transferCheckedChangeFn } from './transfer.mjs';
|
|
3
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
15
4
|
|
|
16
|
-
const
|
|
17
|
-
|
|
5
|
+
const CHECKED_CHANGE_EVENT = "checked-change";
|
|
6
|
+
const transferPanelProps = buildProps({
|
|
7
|
+
data: transferProps.data,
|
|
8
|
+
optionRender: {
|
|
9
|
+
type: definePropType(Function)
|
|
10
|
+
},
|
|
11
|
+
placeholder: String,
|
|
12
|
+
title: String,
|
|
13
|
+
filterable: Boolean,
|
|
14
|
+
format: transferProps.format,
|
|
15
|
+
filterMethod: transferProps.filterMethod,
|
|
16
|
+
defaultChecked: transferProps.leftDefaultChecked,
|
|
17
|
+
props: transferProps.props
|
|
18
18
|
});
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
emits: transferPanelEmits,
|
|
23
|
-
setup(__props, { expose, emit }) {
|
|
24
|
-
const props = __props;
|
|
25
|
-
const slots = useSlots();
|
|
26
|
-
const OptionContent = ({ option }) => option;
|
|
27
|
-
const { t } = useLocale();
|
|
28
|
-
const ns = useNamespace("transfer");
|
|
29
|
-
const panelState = reactive({
|
|
30
|
-
checked: [],
|
|
31
|
-
allChecked: false,
|
|
32
|
-
query: "",
|
|
33
|
-
inputHover: false,
|
|
34
|
-
checkChangeByUser: true
|
|
35
|
-
});
|
|
36
|
-
const propsAlias = usePropsAlias(props);
|
|
37
|
-
const {
|
|
38
|
-
filteredData,
|
|
39
|
-
checkedSummary,
|
|
40
|
-
isIndeterminate,
|
|
41
|
-
handleAllCheckedChange
|
|
42
|
-
} = useCheck(props, panelState, emit);
|
|
43
|
-
const hasNoMatch = computed(() => !isEmpty(panelState.query) && isEmpty(filteredData.value));
|
|
44
|
-
const hasFooter = computed(() => !isEmpty(slots.default()[0].children));
|
|
45
|
-
const { checked, allChecked, query, inputHover } = toRefs(panelState);
|
|
46
|
-
expose({
|
|
47
|
-
query
|
|
48
|
-
});
|
|
49
|
-
return (_ctx, _cache) => {
|
|
50
|
-
return openBlock(), createElementBlock("div", {
|
|
51
|
-
class: normalizeClass(unref(ns).b("panel"))
|
|
52
|
-
}, [
|
|
53
|
-
createElementVNode("p", {
|
|
54
|
-
class: normalizeClass(unref(ns).be("panel", "header"))
|
|
55
|
-
}, [
|
|
56
|
-
createVNode(unref(ElCheckbox), {
|
|
57
|
-
modelValue: unref(allChecked),
|
|
58
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(allChecked) ? allChecked.value = $event : null),
|
|
59
|
-
indeterminate: unref(isIndeterminate),
|
|
60
|
-
"validate-event": false,
|
|
61
|
-
onChange: unref(handleAllCheckedChange)
|
|
62
|
-
}, {
|
|
63
|
-
default: withCtx(() => [
|
|
64
|
-
createTextVNode(toDisplayString(_ctx.title) + " ", 1),
|
|
65
|
-
createElementVNode("span", null, toDisplayString(unref(checkedSummary)), 1)
|
|
66
|
-
]),
|
|
67
|
-
_: 1
|
|
68
|
-
}, 8, ["modelValue", "indeterminate", "onChange"])
|
|
69
|
-
], 2),
|
|
70
|
-
createElementVNode("div", {
|
|
71
|
-
class: normalizeClass([unref(ns).be("panel", "body"), unref(ns).is("with-footer", unref(hasFooter))])
|
|
72
|
-
}, [
|
|
73
|
-
_ctx.filterable ? (openBlock(), createBlock(unref(ElInput), {
|
|
74
|
-
key: 0,
|
|
75
|
-
modelValue: unref(query),
|
|
76
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(query) ? query.value = $event : null),
|
|
77
|
-
class: normalizeClass(unref(ns).be("panel", "filter")),
|
|
78
|
-
size: "default",
|
|
79
|
-
placeholder: _ctx.placeholder,
|
|
80
|
-
"prefix-icon": unref(Search),
|
|
81
|
-
clearable: "",
|
|
82
|
-
"validate-event": false,
|
|
83
|
-
onMouseenter: _cache[2] || (_cache[2] = ($event) => inputHover.value = true),
|
|
84
|
-
onMouseleave: _cache[3] || (_cache[3] = ($event) => inputHover.value = false)
|
|
85
|
-
}, null, 8, ["modelValue", "class", "placeholder", "prefix-icon"])) : createCommentVNode("v-if", true),
|
|
86
|
-
withDirectives(createVNode(unref(ElCheckboxGroup), {
|
|
87
|
-
modelValue: unref(checked),
|
|
88
|
-
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => isRef(checked) ? checked.value = $event : null),
|
|
89
|
-
"validate-event": false,
|
|
90
|
-
class: normalizeClass([unref(ns).is("filterable", _ctx.filterable), unref(ns).be("panel", "list")])
|
|
91
|
-
}, {
|
|
92
|
-
default: withCtx(() => [
|
|
93
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(filteredData), (item) => {
|
|
94
|
-
return openBlock(), createBlock(unref(ElCheckbox), {
|
|
95
|
-
key: item[unref(propsAlias).key],
|
|
96
|
-
class: normalizeClass(unref(ns).be("panel", "item")),
|
|
97
|
-
label: item[unref(propsAlias).key],
|
|
98
|
-
disabled: item[unref(propsAlias).disabled],
|
|
99
|
-
"validate-event": false
|
|
100
|
-
}, {
|
|
101
|
-
default: withCtx(() => {
|
|
102
|
-
var _a;
|
|
103
|
-
return [
|
|
104
|
-
createVNode(OptionContent, {
|
|
105
|
-
option: (_a = _ctx.optionRender) == null ? void 0 : _a.call(_ctx, item)
|
|
106
|
-
}, null, 8, ["option"])
|
|
107
|
-
];
|
|
108
|
-
}),
|
|
109
|
-
_: 2
|
|
110
|
-
}, 1032, ["class", "label", "disabled"]);
|
|
111
|
-
}), 128))
|
|
112
|
-
]),
|
|
113
|
-
_: 1
|
|
114
|
-
}, 8, ["modelValue", "class"]), [
|
|
115
|
-
[vShow, !unref(hasNoMatch) && !unref(isEmpty)(_ctx.data)]
|
|
116
|
-
]),
|
|
117
|
-
withDirectives(createElementVNode("p", {
|
|
118
|
-
class: normalizeClass(unref(ns).be("panel", "empty"))
|
|
119
|
-
}, toDisplayString(unref(hasNoMatch) ? unref(t)("el.transfer.noMatch") : unref(t)("el.transfer.noData")), 3), [
|
|
120
|
-
[vShow, unref(hasNoMatch) || unref(isEmpty)(_ctx.data)]
|
|
121
|
-
])
|
|
122
|
-
], 2),
|
|
123
|
-
unref(hasFooter) ? (openBlock(), createElementBlock("p", {
|
|
124
|
-
key: 0,
|
|
125
|
-
class: normalizeClass(unref(ns).be("panel", "footer"))
|
|
126
|
-
}, [
|
|
127
|
-
renderSlot(_ctx.$slots, "default")
|
|
128
|
-
], 2)) : createCommentVNode("v-if", true)
|
|
129
|
-
], 2);
|
|
130
|
-
};
|
|
131
|
-
}
|
|
132
|
-
});
|
|
133
|
-
var TransferPanel = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/transfer/src/transfer-panel.vue"]]);
|
|
19
|
+
const transferPanelEmits = {
|
|
20
|
+
[CHECKED_CHANGE_EVENT]: transferCheckedChangeFn
|
|
21
|
+
};
|
|
134
22
|
|
|
135
|
-
export {
|
|
23
|
+
export { CHECKED_CHANGE_EVENT, transferPanelEmits, transferPanelProps };
|
|
136
24
|
//# sourceMappingURL=transfer-panel.mjs.map
|