完全跑通1.0版本
This commit is contained in:
28
frontend/node_modules/element-plus/lib/components/tabs/src/constants.d.ts
generated
vendored
Normal file
28
frontend/node_modules/element-plus/lib/components/tabs/src/constants.d.ts
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
import { TabPaneProps } from "./tab-pane.js";
|
||||
import { TabNavInstance } from "./tab-nav.js";
|
||||
import { TabsProps } from "./tabs.js";
|
||||
import { ComputedRef, InjectionKey, Ref, Slots, UnwrapRef, VNode } from "vue";
|
||||
|
||||
//#region ../../packages/components/tabs/src/constants.d.ts
|
||||
type TabPaneName = string | number;
|
||||
type TabsPaneContext = UnwrapRef<{
|
||||
uid: number;
|
||||
getVnode: () => VNode;
|
||||
slots: Slots;
|
||||
props: TabPaneProps;
|
||||
paneName: ComputedRef<TabPaneName | undefined>;
|
||||
active: ComputedRef<boolean>;
|
||||
index: Ref<string | undefined>;
|
||||
isClosable: ComputedRef<boolean>;
|
||||
isFocusInsidePane: () => boolean | undefined;
|
||||
}>;
|
||||
interface TabsRootContext {
|
||||
props: TabsProps;
|
||||
currentName: Ref<TabPaneName>;
|
||||
registerPane: (pane: TabsPaneContext) => void;
|
||||
unregisterPane: (pane: TabsPaneContext) => void;
|
||||
nav$: Ref<TabNavInstance | undefined>;
|
||||
}
|
||||
declare const tabsRootContextKey: InjectionKey<TabsRootContext>;
|
||||
//#endregion
|
||||
export { TabPaneName, TabsPaneContext, TabsRootContext, tabsRootContextKey };
|
||||
7
frontend/node_modules/element-plus/lib/components/tabs/src/constants.js
generated
vendored
Normal file
7
frontend/node_modules/element-plus/lib/components/tabs/src/constants.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
||||
//#region ../../packages/components/tabs/src/constants.ts
|
||||
const tabsRootContextKey = Symbol("tabsRootContextKey");
|
||||
//#endregion
|
||||
exports.tabsRootContextKey = tabsRootContextKey;
|
||||
|
||||
//# sourceMappingURL=constants.js.map
|
||||
1
frontend/node_modules/element-plus/lib/components/tabs/src/constants.js.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/lib/components/tabs/src/constants.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"constants.js","names":[],"sources":["../../../../../../packages/components/tabs/src/constants.ts"],"sourcesContent":["import type {\n ComputedRef,\n InjectionKey,\n Ref,\n Slots,\n UnwrapRef,\n VNode,\n} from 'vue'\nimport type { TabsProps } from './tabs'\nimport type { TabPaneProps } from './tab-pane'\nimport type { TabNavInstance } from './tab-nav'\n\nexport type TabPaneName = string | number\n\nexport type TabsPaneContext = UnwrapRef<{\n uid: number\n getVnode: () => VNode\n slots: Slots\n props: TabPaneProps\n paneName: ComputedRef<TabPaneName | undefined>\n active: ComputedRef<boolean>\n index: Ref<string | undefined>\n isClosable: ComputedRef<boolean>\n isFocusInsidePane: () => boolean | undefined\n}>\n\nexport interface TabsRootContext {\n props: TabsProps\n currentName: Ref<TabPaneName>\n registerPane: (pane: TabsPaneContext) => void\n unregisterPane: (pane: TabsPaneContext) => void\n nav$: Ref<TabNavInstance | undefined>\n}\n\nexport const tabsRootContextKey: InjectionKey<TabsRootContext> =\n Symbol('tabsRootContextKey')\n"],"mappings":";;AAkCA,MAAa,qBACX,OAAO,qBAAqB"}
|
||||
104
frontend/node_modules/element-plus/lib/components/tabs/src/tab-bar.d.ts
generated
vendored
Normal file
104
frontend/node_modules/element-plus/lib/components/tabs/src/tab-bar.d.ts
generated
vendored
Normal file
@@ -0,0 +1,104 @@
|
||||
import { EpPropFinalized } from "../../../utils/vue/props/types.js";
|
||||
import { Mutable } from "../../../utils/typescript.js";
|
||||
import { TabPaneName, TabsPaneContext } from "./constants.js";
|
||||
import _default from "./tab-bar.vue.js";
|
||||
import * as _$vue from "vue";
|
||||
import { ExtractPublicPropTypes } from "vue";
|
||||
|
||||
//#region ../../packages/components/tabs/src/tab-bar.d.ts
|
||||
/**
|
||||
* @deprecated Removed after 3.0.0, Use `TabBarProps` instead.
|
||||
*/
|
||||
declare const tabBarProps: {
|
||||
readonly tabs: EpPropFinalized<(new (...args: any[]) => {
|
||||
uid: number;
|
||||
getVnode: () => _$vue.VNode;
|
||||
slots: _$vue.Slots;
|
||||
props: {
|
||||
label?: string | undefined;
|
||||
name?: string | number | undefined;
|
||||
closable?: boolean | undefined;
|
||||
disabled?: boolean | undefined;
|
||||
lazy?: boolean | undefined;
|
||||
};
|
||||
paneName: TabPaneName | undefined;
|
||||
active: boolean;
|
||||
index: string | undefined;
|
||||
isClosable: boolean;
|
||||
isFocusInsidePane: () => boolean | undefined;
|
||||
}[]) | (() => {
|
||||
uid: number;
|
||||
getVnode: () => _$vue.VNode;
|
||||
slots: _$vue.Slots;
|
||||
props: {
|
||||
label?: string | undefined;
|
||||
name?: string | number | undefined;
|
||||
closable?: boolean | undefined;
|
||||
disabled?: boolean | undefined;
|
||||
lazy?: boolean | undefined;
|
||||
};
|
||||
paneName: TabPaneName | undefined;
|
||||
active: boolean;
|
||||
index: string | undefined;
|
||||
isClosable: boolean;
|
||||
isFocusInsidePane: () => boolean | undefined;
|
||||
}[]) | (((new (...args: any[]) => {
|
||||
uid: number;
|
||||
getVnode: () => _$vue.VNode;
|
||||
slots: _$vue.Slots;
|
||||
props: {
|
||||
label?: string | undefined;
|
||||
name?: string | number | undefined;
|
||||
closable?: boolean | undefined;
|
||||
disabled?: boolean | undefined;
|
||||
lazy?: boolean | undefined;
|
||||
};
|
||||
paneName: TabPaneName | undefined;
|
||||
active: boolean;
|
||||
index: string | undefined;
|
||||
isClosable: boolean;
|
||||
isFocusInsidePane: () => boolean | undefined;
|
||||
}[]) | (() => {
|
||||
uid: number;
|
||||
getVnode: () => _$vue.VNode;
|
||||
slots: _$vue.Slots;
|
||||
props: {
|
||||
label?: string | undefined;
|
||||
name?: string | number | undefined;
|
||||
closable?: boolean | undefined;
|
||||
disabled?: boolean | undefined;
|
||||
lazy?: boolean | undefined;
|
||||
};
|
||||
paneName: TabPaneName | undefined;
|
||||
active: boolean;
|
||||
index: string | undefined;
|
||||
isClosable: boolean;
|
||||
isFocusInsidePane: () => boolean | undefined;
|
||||
}[])) | null)[], unknown, unknown, () => [], boolean>;
|
||||
readonly tabRefs: EpPropFinalized<(new (...args: any[]) => {
|
||||
[key: string]: HTMLDivElement;
|
||||
[key: number]: HTMLDivElement;
|
||||
}) | (() => {
|
||||
[key: string]: HTMLDivElement;
|
||||
[key: number]: HTMLDivElement;
|
||||
}) | (((new (...args: any[]) => {
|
||||
[key: string]: HTMLDivElement;
|
||||
[key: number]: HTMLDivElement;
|
||||
}) | (() => {
|
||||
[key: string]: HTMLDivElement;
|
||||
[key: number]: HTMLDivElement;
|
||||
})) | null)[], unknown, unknown, () => Mutable<{}>, boolean>;
|
||||
};
|
||||
type TabBarProps = {
|
||||
tabs?: TabsPaneContext[];
|
||||
tabRefs?: {
|
||||
[key: TabPaneName]: HTMLDivElement;
|
||||
};
|
||||
};
|
||||
/**
|
||||
* @deprecated Removed after 3.0.0, Use `TabBarProps` instead.
|
||||
*/
|
||||
type TabBarPropsPublic = ExtractPublicPropTypes<typeof tabBarProps>;
|
||||
type TabBarInstance = InstanceType<typeof _default> & unknown;
|
||||
//#endregion
|
||||
export { TabBarInstance, TabBarProps, TabBarPropsPublic, tabBarProps };
|
||||
21
frontend/node_modules/element-plus/lib/components/tabs/src/tab-bar.js
generated
vendored
Normal file
21
frontend/node_modules/element-plus/lib/components/tabs/src/tab-bar.js
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
||||
const require_runtime = require("../../../utils/vue/props/runtime.js");
|
||||
const require_typescript = require("../../../utils/typescript.js");
|
||||
//#region ../../packages/components/tabs/src/tab-bar.ts
|
||||
/**
|
||||
* @deprecated Removed after 3.0.0, Use `TabBarProps` instead.
|
||||
*/
|
||||
const tabBarProps = require_runtime.buildProps({
|
||||
tabs: {
|
||||
type: require_runtime.definePropType(Array),
|
||||
default: () => require_typescript.mutable([])
|
||||
},
|
||||
tabRefs: {
|
||||
type: require_runtime.definePropType(Object),
|
||||
default: () => require_typescript.mutable({})
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
exports.tabBarProps = tabBarProps;
|
||||
|
||||
//# sourceMappingURL=tab-bar.js.map
|
||||
1
frontend/node_modules/element-plus/lib/components/tabs/src/tab-bar.js.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/lib/components/tabs/src/tab-bar.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"tab-bar.js","names":["buildProps","definePropType","mutable"],"sources":["../../../../../../packages/components/tabs/src/tab-bar.ts"],"sourcesContent":["import { buildProps, definePropType, mutable } from '@element-plus/utils'\n\nimport type { ExtractPublicPropTypes } from 'vue'\nimport type { TabPaneName, TabsPaneContext } from './constants'\nimport type TabBar from './tab-bar.vue'\n\n/**\n * @deprecated Removed after 3.0.0, Use `TabBarProps` instead.\n */\nexport const tabBarProps = buildProps({\n tabs: {\n type: definePropType<TabsPaneContext[]>(Array),\n default: () => mutable([] as const),\n },\n tabRefs: {\n type: definePropType<{ [key: TabPaneName]: HTMLDivElement }>(Object),\n default: () => mutable({} as const),\n },\n} as const)\n\nexport type TabBarProps = {\n tabs?: TabsPaneContext[]\n tabRefs?: { [key: TabPaneName]: HTMLDivElement }\n}\n\n/**\n * @deprecated Removed after 3.0.0, Use `TabBarProps` instead.\n */\nexport type TabBarPropsPublic = ExtractPublicPropTypes<typeof tabBarProps>\nexport type TabBarInstance = InstanceType<typeof TabBar> & unknown\n"],"mappings":";;;;;;;AASA,MAAa,cAAcA,gBAAAA,WAAW;CACpC,MAAM;EACJ,MAAMC,gBAAAA,eAAkC,MAAM;EAC9C,eAAeC,mBAAAA,QAAQ,EAAE,CAAU;EACpC;CACD,SAAS;EACP,MAAMD,gBAAAA,eAAuD,OAAO;EACpE,eAAeC,mBAAAA,QAAQ,EAAE,CAAU;EACpC;CACF,CAAU"}
|
||||
18
frontend/node_modules/element-plus/lib/components/tabs/src/tab-bar.vue.d.ts
generated
vendored
Normal file
18
frontend/node_modules/element-plus/lib/components/tabs/src/tab-bar.vue.d.ts
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
import { TabPaneName, TabsPaneContext } from "./constants.js";
|
||||
import { TabBarProps } from "./tab-bar.js";
|
||||
import * as _$vue from "vue";
|
||||
import { CSSProperties } from "vue";
|
||||
|
||||
//#region ../../packages/components/tabs/src/tab-bar.vue.d.ts
|
||||
declare const __VLS_export: _$vue.DefineComponent<TabBarProps, {
|
||||
/** @description tab root html element */ref: _$vue.Ref<HTMLDivElement | undefined, HTMLDivElement | undefined>; /** @description method to manually update tab bar style, return the updated style */
|
||||
update: () => CSSProperties;
|
||||
}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<TabBarProps> & Readonly<{}>, {
|
||||
tabs: TabsPaneContext[];
|
||||
tabRefs: {
|
||||
[key: TabPaneName]: HTMLDivElement;
|
||||
};
|
||||
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
||||
declare const _default: typeof __VLS_export;
|
||||
//#endregion
|
||||
export { _default as default };
|
||||
95
frontend/node_modules/element-plus/lib/components/tabs/src/tab-bar.vue_vue_type_script_setup_true_lang.js
generated
vendored
Normal file
95
frontend/node_modules/element-plus/lib/components/tabs/src/tab-bar.vue_vue_type_script_setup_true_lang.js
generated
vendored
Normal file
@@ -0,0 +1,95 @@
|
||||
require("../../../_virtual/_rolldown/runtime.js");
|
||||
const require_types = require("../../../utils/types.js");
|
||||
const require_strings = require("../../../utils/strings.js");
|
||||
const require_error = require("../../../utils/error.js");
|
||||
const require_index = require("../../../hooks/use-namespace/index.js");
|
||||
const require_constants = require("./constants.js");
|
||||
const require_tab_bar = require("./tab-bar.js");
|
||||
let _vueuse_core = require("@vueuse/core");
|
||||
let vue = require("vue");
|
||||
//#region ../../packages/components/tabs/src/tab-bar.vue?vue&type=script&setup=true&lang.ts
|
||||
const COMPONENT_NAME = "ElTabBar";
|
||||
var tab_bar_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
||||
name: COMPONENT_NAME,
|
||||
__name: "tab-bar",
|
||||
props: require_tab_bar.tabBarProps,
|
||||
setup(__props, { expose: __expose }) {
|
||||
const props = __props;
|
||||
const rootTabs = (0, vue.inject)(require_constants.tabsRootContextKey);
|
||||
if (!rootTabs) require_error.throwError(COMPONENT_NAME, "<el-tabs><el-tab-bar /></el-tabs>");
|
||||
const ns = require_index.useNamespace("tabs");
|
||||
const barRef = (0, vue.ref)();
|
||||
const barStyle = (0, vue.ref)();
|
||||
/**
|
||||
* when defaultValue is not set, the bar is always shown.
|
||||
*
|
||||
* when defaultValue is set, the bar will be hidden until style is calculated
|
||||
* to avoid the bar showing in the wrong position on initial render.
|
||||
*/
|
||||
const renderActiveBar = (0, vue.computed)(() => require_types.isUndefined(rootTabs.props.defaultValue) || Boolean(barStyle.value?.transform));
|
||||
const getBarStyle = () => {
|
||||
let offset = 0;
|
||||
let tabSize = 0;
|
||||
const sizeName = ["top", "bottom"].includes(rootTabs.props.tabPosition) ? "width" : "height";
|
||||
const sizeDir = sizeName === "width" ? "x" : "y";
|
||||
const position = sizeDir === "x" ? "left" : "top";
|
||||
props.tabs.every((tab) => {
|
||||
if (require_types.isUndefined(tab.paneName)) return false;
|
||||
const $el = props.tabRefs[tab.paneName];
|
||||
if (!$el) return false;
|
||||
if (!tab.active) return true;
|
||||
offset = $el[`offset${require_strings.capitalize(position)}`];
|
||||
tabSize = $el[`client${require_strings.capitalize(sizeName)}`];
|
||||
const tabStyles = window.getComputedStyle($el);
|
||||
if (sizeName === "width") {
|
||||
tabSize -= Number.parseFloat(tabStyles.paddingLeft) + Number.parseFloat(tabStyles.paddingRight);
|
||||
offset += Number.parseFloat(tabStyles.paddingLeft);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
return {
|
||||
[sizeName]: `${tabSize}px`,
|
||||
transform: `translate${require_strings.capitalize(sizeDir)}(${offset}px)`
|
||||
};
|
||||
};
|
||||
const update = () => barStyle.value = getBarStyle();
|
||||
const tabObservers = [];
|
||||
const observerTabs = () => {
|
||||
tabObservers.forEach((observer) => observer.stop());
|
||||
tabObservers.length = 0;
|
||||
Object.values(props.tabRefs).forEach((tab) => {
|
||||
tabObservers.push((0, _vueuse_core.useResizeObserver)(tab, update));
|
||||
});
|
||||
};
|
||||
(0, vue.watch)(() => props.tabs, async () => {
|
||||
await (0, vue.nextTick)();
|
||||
update();
|
||||
observerTabs();
|
||||
}, { immediate: true });
|
||||
const barObserver = (0, _vueuse_core.useResizeObserver)(barRef, () => update());
|
||||
(0, vue.onBeforeUnmount)(() => {
|
||||
tabObservers.forEach((observer) => observer.stop());
|
||||
tabObservers.length = 0;
|
||||
barObserver.stop();
|
||||
});
|
||||
__expose({
|
||||
/** @description tab root html element */
|
||||
ref: barRef,
|
||||
/** @description method to manually update tab bar style, return the updated style */
|
||||
update
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
return renderActiveBar.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
||||
key: 0,
|
||||
ref_key: "barRef",
|
||||
ref: barRef,
|
||||
class: (0, vue.normalizeClass)([(0, vue.unref)(ns).e("active-bar"), (0, vue.unref)(ns).is((0, vue.unref)(rootTabs).props.tabPosition)]),
|
||||
style: (0, vue.normalizeStyle)(barStyle.value)
|
||||
}, null, 6)) : (0, vue.createCommentVNode)("v-if", true);
|
||||
};
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
exports.default = tab_bar_vue_vue_type_script_setup_true_lang_default;
|
||||
|
||||
//# sourceMappingURL=tab-bar.vue_vue_type_script_setup_true_lang.js.map
|
||||
1
frontend/node_modules/element-plus/lib/components/tabs/src/tab-bar.vue_vue_type_script_setup_true_lang.js.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/lib/components/tabs/src/tab-bar.vue_vue_type_script_setup_true_lang.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
10
frontend/node_modules/element-plus/lib/components/tabs/src/tab-bar2.js
generated
vendored
Normal file
10
frontend/node_modules/element-plus/lib/components/tabs/src/tab-bar2.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
Object.defineProperties(exports, {
|
||||
__esModule: { value: true },
|
||||
[Symbol.toStringTag]: { value: "Module" }
|
||||
});
|
||||
//#region ../../packages/components/tabs/src/tab-bar.vue
|
||||
var tab_bar_default = require("./tab-bar.vue_vue_type_script_setup_true_lang.js").default;
|
||||
//#endregion
|
||||
exports.default = tab_bar_default;
|
||||
|
||||
//# sourceMappingURL=tab-bar2.js.map
|
||||
1
frontend/node_modules/element-plus/lib/components/tabs/src/tab-bar2.js.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/lib/components/tabs/src/tab-bar2.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"tab-bar2.js","names":[],"sources":["../../../../../../packages/components/tabs/src/tab-bar.vue"],"sourcesContent":["<template>\n <div\n v-if=\"renderActiveBar\"\n ref=\"barRef\"\n :class=\"[ns.e('active-bar'), ns.is(rootTabs!.props.tabPosition)]\"\n :style=\"barStyle\"\n />\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, inject, nextTick, onBeforeUnmount, ref, watch } from 'vue'\nimport { useResizeObserver } from '@vueuse/core'\nimport { capitalize, isUndefined, throwError } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { tabsRootContextKey } from './constants'\n\nimport type { TabBarProps } from './tab-bar'\nimport type { CSSProperties } from 'vue'\n\nconst COMPONENT_NAME = 'ElTabBar'\ndefineOptions({\n name: COMPONENT_NAME,\n})\nconst props = withDefaults(defineProps<TabBarProps>(), {\n tabs: () => [],\n tabRefs: () => ({}),\n})\n\nconst rootTabs = inject(tabsRootContextKey)\nif (!rootTabs) throwError(COMPONENT_NAME, '<el-tabs><el-tab-bar /></el-tabs>')\n\nconst ns = useNamespace('tabs')\n\nconst barRef = ref<HTMLDivElement>()\nconst barStyle = ref<CSSProperties>()\n/**\n * when defaultValue is not set, the bar is always shown.\n *\n * when defaultValue is set, the bar will be hidden until style is calculated\n * to avoid the bar showing in the wrong position on initial render.\n */\nconst renderActiveBar = computed(\n () =>\n isUndefined(rootTabs.props.defaultValue) ||\n Boolean(barStyle.value?.transform)\n)\n\nconst getBarStyle = (): CSSProperties => {\n let offset = 0\n let tabSize = 0\n\n const sizeName = ['top', 'bottom'].includes(rootTabs.props.tabPosition)\n ? 'width'\n : 'height'\n const sizeDir = sizeName === 'width' ? 'x' : 'y'\n const position = sizeDir === 'x' ? 'left' : 'top'\n\n props.tabs.every((tab) => {\n if (isUndefined(tab.paneName)) return false\n const $el = props.tabRefs[tab.paneName]\n if (!$el) return false\n\n if (!tab.active) {\n return true\n }\n\n offset = $el[`offset${capitalize(position)}`]\n tabSize = $el[`client${capitalize(sizeName)}`]\n\n const tabStyles = window.getComputedStyle($el)\n\n if (sizeName === 'width') {\n tabSize -=\n Number.parseFloat(tabStyles.paddingLeft) +\n Number.parseFloat(tabStyles.paddingRight)\n offset += Number.parseFloat(tabStyles.paddingLeft)\n }\n return false\n })\n\n return {\n [sizeName]: `${tabSize}px`,\n transform: `translate${capitalize(sizeDir)}(${offset}px)`,\n }\n}\n\nconst update = () => (barStyle.value = getBarStyle())\n\nconst tabObservers = [] as ReturnType<typeof useResizeObserver>[]\nconst observerTabs = () => {\n tabObservers.forEach((observer) => observer.stop())\n tabObservers.length = 0\n\n Object.values(props.tabRefs).forEach((tab) => {\n tabObservers.push(useResizeObserver(tab, update))\n })\n}\n\nwatch(\n () => props.tabs,\n async () => {\n await nextTick()\n update()\n\n observerTabs()\n },\n { immediate: true }\n)\nconst barObserver = useResizeObserver(barRef, () => update())\n\nonBeforeUnmount(() => {\n tabObservers.forEach((observer) => observer.stop())\n tabObservers.length = 0\n barObserver.stop()\n})\n\ndefineExpose({\n /** @description tab root html element */\n ref: barRef,\n /** @description method to manually update tab bar style, return the updated style */\n update,\n})\n</script>\n"],"mappings":""}
|
||||
301
frontend/node_modules/element-plus/lib/components/tabs/src/tab-nav.d.ts
generated
vendored
Normal file
301
frontend/node_modules/element-plus/lib/components/tabs/src/tab-nav.d.ts
generated
vendored
Normal file
@@ -0,0 +1,301 @@
|
||||
import { EpPropFinalized, EpPropMergeType } from "../../../utils/vue/props/types.js";
|
||||
import { TabPaneName, TabsPaneContext } from "./constants.js";
|
||||
import { TabBarInstance } from "./tab-bar.js";
|
||||
import * as _$vue from "vue";
|
||||
import { ExtractPropTypes, ExtractPublicPropTypes } from "vue";
|
||||
import * as _$vue_jsx_runtime0 from "vue/jsx-runtime";
|
||||
|
||||
//#region ../../packages/components/tabs/src/tab-nav.d.ts
|
||||
declare const tabNavProps: {
|
||||
readonly panes: EpPropFinalized<(new (...args: any[]) => {
|
||||
uid: number;
|
||||
getVnode: () => _$vue.VNode;
|
||||
slots: _$vue.Slots;
|
||||
props: {
|
||||
label?: string | undefined;
|
||||
name?: string | number | undefined;
|
||||
closable?: boolean | undefined;
|
||||
disabled?: boolean | undefined;
|
||||
lazy?: boolean | undefined;
|
||||
};
|
||||
paneName: TabPaneName | undefined;
|
||||
active: boolean;
|
||||
index: string | undefined;
|
||||
isClosable: boolean;
|
||||
isFocusInsidePane: () => boolean | undefined;
|
||||
}[]) | (() => {
|
||||
uid: number;
|
||||
getVnode: () => _$vue.VNode;
|
||||
slots: _$vue.Slots;
|
||||
props: {
|
||||
label?: string | undefined;
|
||||
name?: string | number | undefined;
|
||||
closable?: boolean | undefined;
|
||||
disabled?: boolean | undefined;
|
||||
lazy?: boolean | undefined;
|
||||
};
|
||||
paneName: TabPaneName | undefined;
|
||||
active: boolean;
|
||||
index: string | undefined;
|
||||
isClosable: boolean;
|
||||
isFocusInsidePane: () => boolean | undefined;
|
||||
}[]) | (((new (...args: any[]) => {
|
||||
uid: number;
|
||||
getVnode: () => _$vue.VNode;
|
||||
slots: _$vue.Slots;
|
||||
props: {
|
||||
label?: string | undefined;
|
||||
name?: string | number | undefined;
|
||||
closable?: boolean | undefined;
|
||||
disabled?: boolean | undefined;
|
||||
lazy?: boolean | undefined;
|
||||
};
|
||||
paneName: TabPaneName | undefined;
|
||||
active: boolean;
|
||||
index: string | undefined;
|
||||
isClosable: boolean;
|
||||
isFocusInsidePane: () => boolean | undefined;
|
||||
}[]) | (() => {
|
||||
uid: number;
|
||||
getVnode: () => _$vue.VNode;
|
||||
slots: _$vue.Slots;
|
||||
props: {
|
||||
label?: string | undefined;
|
||||
name?: string | number | undefined;
|
||||
closable?: boolean | undefined;
|
||||
disabled?: boolean | undefined;
|
||||
lazy?: boolean | undefined;
|
||||
};
|
||||
paneName: TabPaneName | undefined;
|
||||
active: boolean;
|
||||
index: string | undefined;
|
||||
isClosable: boolean;
|
||||
isFocusInsidePane: () => boolean | undefined;
|
||||
}[])) | null)[], unknown, unknown, () => [], boolean>;
|
||||
readonly currentName: EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
||||
readonly editable: BooleanConstructor;
|
||||
readonly type: EpPropFinalized<StringConstructor, "" | "card" | "border-card", unknown, "", boolean>;
|
||||
readonly stretch: BooleanConstructor;
|
||||
readonly tabindex: EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, undefined, boolean>;
|
||||
};
|
||||
declare const tabNavEmits: {
|
||||
tabClick: (tab: TabsPaneContext, tabName: TabPaneName, ev: Event) => boolean;
|
||||
tabRemove: (tab: TabsPaneContext, ev: Event) => boolean;
|
||||
};
|
||||
type TabNavProps = ExtractPropTypes<typeof tabNavProps>;
|
||||
type TabNavPropsPublic = ExtractPublicPropTypes<typeof tabNavProps>;
|
||||
type TabNavEmits = typeof tabNavEmits;
|
||||
declare const TabNav: _$vue.DefineComponent<ExtractPropTypes<{
|
||||
readonly panes: EpPropFinalized<(new (...args: any[]) => {
|
||||
uid: number;
|
||||
getVnode: () => _$vue.VNode;
|
||||
slots: _$vue.Slots;
|
||||
props: {
|
||||
label?: string | undefined;
|
||||
name?: string | number | undefined;
|
||||
closable?: boolean | undefined;
|
||||
disabled?: boolean | undefined;
|
||||
lazy?: boolean | undefined;
|
||||
};
|
||||
paneName: TabPaneName | undefined;
|
||||
active: boolean;
|
||||
index: string | undefined;
|
||||
isClosable: boolean;
|
||||
isFocusInsidePane: () => boolean | undefined;
|
||||
}[]) | (() => {
|
||||
uid: number;
|
||||
getVnode: () => _$vue.VNode;
|
||||
slots: _$vue.Slots;
|
||||
props: {
|
||||
label?: string | undefined;
|
||||
name?: string | number | undefined;
|
||||
closable?: boolean | undefined;
|
||||
disabled?: boolean | undefined;
|
||||
lazy?: boolean | undefined;
|
||||
};
|
||||
paneName: TabPaneName | undefined;
|
||||
active: boolean;
|
||||
index: string | undefined;
|
||||
isClosable: boolean;
|
||||
isFocusInsidePane: () => boolean | undefined;
|
||||
}[]) | (((new (...args: any[]) => {
|
||||
uid: number;
|
||||
getVnode: () => _$vue.VNode;
|
||||
slots: _$vue.Slots;
|
||||
props: {
|
||||
label?: string | undefined;
|
||||
name?: string | number | undefined;
|
||||
closable?: boolean | undefined;
|
||||
disabled?: boolean | undefined;
|
||||
lazy?: boolean | undefined;
|
||||
};
|
||||
paneName: TabPaneName | undefined;
|
||||
active: boolean;
|
||||
index: string | undefined;
|
||||
isClosable: boolean;
|
||||
isFocusInsidePane: () => boolean | undefined;
|
||||
}[]) | (() => {
|
||||
uid: number;
|
||||
getVnode: () => _$vue.VNode;
|
||||
slots: _$vue.Slots;
|
||||
props: {
|
||||
label?: string | undefined;
|
||||
name?: string | number | undefined;
|
||||
closable?: boolean | undefined;
|
||||
disabled?: boolean | undefined;
|
||||
lazy?: boolean | undefined;
|
||||
};
|
||||
paneName: TabPaneName | undefined;
|
||||
active: boolean;
|
||||
index: string | undefined;
|
||||
isClosable: boolean;
|
||||
isFocusInsidePane: () => boolean | undefined;
|
||||
}[])) | null)[], unknown, unknown, () => [], boolean>;
|
||||
readonly currentName: EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
||||
readonly editable: BooleanConstructor;
|
||||
readonly type: EpPropFinalized<StringConstructor, "" | "card" | "border-card", unknown, "", boolean>;
|
||||
readonly stretch: BooleanConstructor;
|
||||
readonly tabindex: EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, undefined, boolean>;
|
||||
}>, () => _$vue_jsx_runtime0.JSX.Element, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
||||
tabClick: (tab: TabsPaneContext, tabName: TabPaneName, ev: Event) => boolean;
|
||||
tabRemove: (tab: TabsPaneContext, ev: Event) => boolean;
|
||||
}, string, _$vue.PublicProps, Readonly<ExtractPropTypes<{
|
||||
readonly panes: EpPropFinalized<(new (...args: any[]) => {
|
||||
uid: number;
|
||||
getVnode: () => _$vue.VNode;
|
||||
slots: _$vue.Slots;
|
||||
props: {
|
||||
label?: string | undefined;
|
||||
name?: string | number | undefined;
|
||||
closable?: boolean | undefined;
|
||||
disabled?: boolean | undefined;
|
||||
lazy?: boolean | undefined;
|
||||
};
|
||||
paneName: TabPaneName | undefined;
|
||||
active: boolean;
|
||||
index: string | undefined;
|
||||
isClosable: boolean;
|
||||
isFocusInsidePane: () => boolean | undefined;
|
||||
}[]) | (() => {
|
||||
uid: number;
|
||||
getVnode: () => _$vue.VNode;
|
||||
slots: _$vue.Slots;
|
||||
props: {
|
||||
label?: string | undefined;
|
||||
name?: string | number | undefined;
|
||||
closable?: boolean | undefined;
|
||||
disabled?: boolean | undefined;
|
||||
lazy?: boolean | undefined;
|
||||
};
|
||||
paneName: TabPaneName | undefined;
|
||||
active: boolean;
|
||||
index: string | undefined;
|
||||
isClosable: boolean;
|
||||
isFocusInsidePane: () => boolean | undefined;
|
||||
}[]) | (((new (...args: any[]) => {
|
||||
uid: number;
|
||||
getVnode: () => _$vue.VNode;
|
||||
slots: _$vue.Slots;
|
||||
props: {
|
||||
label?: string | undefined;
|
||||
name?: string | number | undefined;
|
||||
closable?: boolean | undefined;
|
||||
disabled?: boolean | undefined;
|
||||
lazy?: boolean | undefined;
|
||||
};
|
||||
paneName: TabPaneName | undefined;
|
||||
active: boolean;
|
||||
index: string | undefined;
|
||||
isClosable: boolean;
|
||||
isFocusInsidePane: () => boolean | undefined;
|
||||
}[]) | (() => {
|
||||
uid: number;
|
||||
getVnode: () => _$vue.VNode;
|
||||
slots: _$vue.Slots;
|
||||
props: {
|
||||
label?: string | undefined;
|
||||
name?: string | number | undefined;
|
||||
closable?: boolean | undefined;
|
||||
disabled?: boolean | undefined;
|
||||
lazy?: boolean | undefined;
|
||||
};
|
||||
paneName: TabPaneName | undefined;
|
||||
active: boolean;
|
||||
index: string | undefined;
|
||||
isClosable: boolean;
|
||||
isFocusInsidePane: () => boolean | undefined;
|
||||
}[])) | null)[], unknown, unknown, () => [], boolean>;
|
||||
readonly currentName: EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
||||
readonly editable: BooleanConstructor;
|
||||
readonly type: EpPropFinalized<StringConstructor, "" | "card" | "border-card", unknown, "", boolean>;
|
||||
readonly stretch: BooleanConstructor;
|
||||
readonly tabindex: EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, undefined, boolean>;
|
||||
}>> & Readonly<{
|
||||
onTabClick?: ((tab: {
|
||||
uid: number;
|
||||
getVnode: () => _$vue.VNode;
|
||||
slots: _$vue.Slots;
|
||||
props: {
|
||||
label?: string | undefined;
|
||||
name?: string | number | undefined;
|
||||
closable?: boolean | undefined;
|
||||
disabled?: boolean | undefined;
|
||||
lazy?: boolean | undefined;
|
||||
};
|
||||
paneName: TabPaneName | undefined;
|
||||
active: boolean;
|
||||
index: string | undefined;
|
||||
isClosable: boolean;
|
||||
isFocusInsidePane: () => boolean | undefined;
|
||||
}, tabName: TabPaneName, ev: Event) => any) | undefined;
|
||||
onTabRemove?: ((tab: {
|
||||
uid: number;
|
||||
getVnode: () => _$vue.VNode;
|
||||
slots: _$vue.Slots;
|
||||
props: {
|
||||
label?: string | undefined;
|
||||
name?: string | number | undefined;
|
||||
closable?: boolean | undefined;
|
||||
disabled?: boolean | undefined;
|
||||
lazy?: boolean | undefined;
|
||||
};
|
||||
paneName: TabPaneName | undefined;
|
||||
active: boolean;
|
||||
index: string | undefined;
|
||||
isClosable: boolean;
|
||||
isFocusInsidePane: () => boolean | undefined;
|
||||
}, ev: Event) => any) | undefined;
|
||||
}>, {
|
||||
readonly type: EpPropMergeType<StringConstructor, "" | "card" | "border-card", unknown>;
|
||||
readonly tabindex: EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
||||
readonly stretch: boolean;
|
||||
readonly editable: boolean;
|
||||
readonly panes: {
|
||||
uid: number;
|
||||
getVnode: () => _$vue.VNode;
|
||||
slots: _$vue.Slots;
|
||||
props: {
|
||||
label?: string | undefined;
|
||||
name?: string | number | undefined;
|
||||
closable?: boolean | undefined;
|
||||
disabled?: boolean | undefined;
|
||||
lazy?: boolean | undefined;
|
||||
};
|
||||
paneName: TabPaneName | undefined;
|
||||
active: boolean;
|
||||
index: string | undefined;
|
||||
isClosable: boolean;
|
||||
isFocusInsidePane: () => boolean | undefined;
|
||||
}[];
|
||||
readonly currentName: EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
||||
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>;
|
||||
type TabNavInstance = InstanceType<typeof TabNav> & {
|
||||
scrollToActiveTab: () => Promise<void>;
|
||||
removeFocus: () => void;
|
||||
focusActiveTab: () => void;
|
||||
scheduleRender: () => void;
|
||||
tabListRef: HTMLDivElement | undefined;
|
||||
tabBarRef: TabBarInstance | undefined;
|
||||
};
|
||||
//#endregion
|
||||
export { TabNavEmits, TabNavInstance, TabNavProps, TabNavPropsPublic, TabNav as default, tabNavEmits, tabNavProps };
|
||||
296
frontend/node_modules/element-plus/lib/components/tabs/src/tab-nav.js
generated
vendored
Normal file
296
frontend/node_modules/element-plus/lib/components/tabs/src/tab-nav.js
generated
vendored
Normal file
@@ -0,0 +1,296 @@
|
||||
require("../../../_virtual/_rolldown/runtime.js");
|
||||
const require_aria = require("../../../constants/aria.js");
|
||||
const require_event = require("../../../utils/dom/event.js");
|
||||
const require_raf = require("../../../utils/raf.js");
|
||||
const require_error = require("../../../utils/error.js");
|
||||
const require_runtime$1 = require("../../../utils/vue/props/runtime.js");
|
||||
const require_typescript = require("../../../utils/typescript.js");
|
||||
const require_numbers = require("../../../utils/numbers.js");
|
||||
const require_index = require("../../../hooks/use-namespace/index.js");
|
||||
const require_index$1 = require("../../icon/index.js");
|
||||
const require_use_wheel = require("../../virtual-list/src/hooks/use-wheel.js");
|
||||
const require_constants = require("./constants.js");
|
||||
const require_tab_bar = require("./tab-bar2.js");
|
||||
let _vueuse_core = require("@vueuse/core");
|
||||
let lodash_unified = require("lodash-unified");
|
||||
let _element_plus_icons_vue = require("@element-plus/icons-vue");
|
||||
let vue = require("vue");
|
||||
//#region ../../packages/components/tabs/src/tab-nav.tsx
|
||||
const tabNavProps = require_runtime$1.buildProps({
|
||||
panes: {
|
||||
type: require_runtime$1.definePropType(Array),
|
||||
default: () => require_typescript.mutable([])
|
||||
},
|
||||
currentName: {
|
||||
type: [String, Number],
|
||||
default: ""
|
||||
},
|
||||
editable: Boolean,
|
||||
type: {
|
||||
type: String,
|
||||
values: [
|
||||
"card",
|
||||
"border-card",
|
||||
""
|
||||
],
|
||||
default: ""
|
||||
},
|
||||
stretch: Boolean,
|
||||
/**
|
||||
* @description tab-nav tabindex
|
||||
*/
|
||||
tabindex: {
|
||||
type: [String, Number],
|
||||
default: void 0
|
||||
}
|
||||
});
|
||||
const tabNavEmits = {
|
||||
tabClick: (tab, tabName, ev) => ev instanceof Event,
|
||||
tabRemove: (tab, ev) => ev instanceof Event
|
||||
};
|
||||
const COMPONENT_NAME = "ElTabNav";
|
||||
const TabNav = /* @__PURE__ */ (0, vue.defineComponent)({
|
||||
name: COMPONENT_NAME,
|
||||
props: tabNavProps,
|
||||
emits: tabNavEmits,
|
||||
setup(props, { expose, emit }) {
|
||||
const rootTabs = (0, vue.inject)(require_constants.tabsRootContextKey);
|
||||
if (!rootTabs) require_error.throwError(COMPONENT_NAME, `<el-tabs><tab-nav /></el-tabs>`);
|
||||
const ns = require_index.useNamespace("tabs");
|
||||
const visibility = (0, _vueuse_core.useDocumentVisibility)();
|
||||
const focused = (0, _vueuse_core.useWindowFocus)();
|
||||
const navScroll$ = (0, vue.ref)();
|
||||
const nav$ = (0, vue.ref)();
|
||||
const el$ = (0, vue.ref)();
|
||||
const tabRefsMap = (0, vue.ref)({});
|
||||
const tabBarRef = (0, vue.ref)();
|
||||
const scrollable = (0, vue.ref)(false);
|
||||
const navOffset = (0, vue.ref)(0);
|
||||
const isFocus = (0, vue.ref)(false);
|
||||
const focusable = (0, vue.ref)(true);
|
||||
const isWheelScrolling = (0, vue.ref)(false);
|
||||
const tracker = (0, vue.shallowRef)();
|
||||
const isHorizontal = (0, vue.computed)(() => ["top", "bottom"].includes(rootTabs.props.tabPosition));
|
||||
const sizeName = (0, vue.computed)(() => isHorizontal.value ? "width" : "height");
|
||||
const navStyle = (0, vue.computed)(() => {
|
||||
const dir = sizeName.value === "width" ? "X" : "Y";
|
||||
return {
|
||||
transition: isWheelScrolling.value ? "none" : void 0,
|
||||
transform: `translate${dir}(-${navOffset.value}px)`
|
||||
};
|
||||
});
|
||||
const { width: navContainerWidth, height: navContainerHeight } = (0, _vueuse_core.useElementSize)(navScroll$);
|
||||
const { width: navWidth, height: navHeight } = (0, _vueuse_core.useElementSize)(nav$, {
|
||||
width: 0,
|
||||
height: 0
|
||||
}, { box: "border-box" });
|
||||
const navContainerSize = (0, vue.computed)(() => isHorizontal.value ? navContainerWidth.value : navContainerHeight.value);
|
||||
const navSize = (0, vue.computed)(() => isHorizontal.value ? navWidth.value : navHeight.value);
|
||||
const { onWheel } = require_use_wheel.default({
|
||||
atStartEdge: (0, vue.computed)(() => navOffset.value <= 0),
|
||||
atEndEdge: (0, vue.computed)(() => navSize.value - navOffset.value <= navContainerSize.value),
|
||||
layout: (0, vue.computed)(() => isHorizontal.value ? "horizontal" : "vertical")
|
||||
}, (offset) => {
|
||||
navOffset.value = (0, lodash_unified.clamp)(navOffset.value + offset, 0, navSize.value - navContainerSize.value);
|
||||
});
|
||||
const handleWheel = (event) => {
|
||||
isWheelScrolling.value = true;
|
||||
onWheel(event);
|
||||
require_raf.rAF(() => {
|
||||
isWheelScrolling.value = false;
|
||||
});
|
||||
};
|
||||
const scrollPrev = () => {
|
||||
if (!navScroll$.value) return;
|
||||
const containerSize = navScroll$.value.getBoundingClientRect()[sizeName.value];
|
||||
const currentOffset = navOffset.value;
|
||||
if (!currentOffset) return;
|
||||
navOffset.value = currentOffset > containerSize ? currentOffset - containerSize : 0;
|
||||
};
|
||||
const scrollNext = () => {
|
||||
if (!navScroll$.value || !nav$.value) return;
|
||||
const navSize = nav$.value.getBoundingClientRect()[sizeName.value];
|
||||
const containerSize = navScroll$.value.getBoundingClientRect()[sizeName.value];
|
||||
const currentOffset = navOffset.value;
|
||||
if (!require_numbers.isGreaterThan(navSize - currentOffset, containerSize)) return;
|
||||
navOffset.value = navSize - currentOffset > containerSize * 2 ? currentOffset + containerSize : navSize - containerSize;
|
||||
};
|
||||
const scrollToActiveTab = async () => {
|
||||
const nav = nav$.value;
|
||||
if (!scrollable.value || !el$.value || !navScroll$.value || !nav) return;
|
||||
await (0, vue.nextTick)();
|
||||
const activeTab = tabRefsMap.value[props.currentName];
|
||||
if (!activeTab) return;
|
||||
const navScroll = navScroll$.value;
|
||||
const activeTabBounding = activeTab.getBoundingClientRect();
|
||||
const navScrollBounding = navScroll.getBoundingClientRect();
|
||||
const navScrollLeft = navScrollBounding.left + 1;
|
||||
const navScrollRight = navScrollBounding.right - 1;
|
||||
const navBounding = nav.getBoundingClientRect();
|
||||
const maxOffset = isHorizontal.value ? navBounding.width - navScrollBounding.width : navBounding.height - navScrollBounding.height;
|
||||
const currentOffset = navOffset.value;
|
||||
let newOffset = currentOffset;
|
||||
if (isHorizontal.value) {
|
||||
if (activeTabBounding.left < navScrollLeft) newOffset = currentOffset - (navScrollLeft - activeTabBounding.left);
|
||||
if (activeTabBounding.right > navScrollRight) newOffset = currentOffset + activeTabBounding.right - navScrollRight;
|
||||
} else {
|
||||
if (activeTabBounding.top < navScrollBounding.top) newOffset = currentOffset - (navScrollBounding.top - activeTabBounding.top);
|
||||
if (activeTabBounding.bottom > navScrollBounding.bottom) newOffset = currentOffset + (activeTabBounding.bottom - navScrollBounding.bottom);
|
||||
}
|
||||
newOffset = Math.max(newOffset, 0);
|
||||
navOffset.value = Math.min(newOffset, maxOffset);
|
||||
};
|
||||
const update = () => {
|
||||
if (!nav$.value || !navScroll$.value) return;
|
||||
props.stretch && tabBarRef.value?.update();
|
||||
const navSize = nav$.value.getBoundingClientRect()[sizeName.value];
|
||||
const containerSize = navScroll$.value.getBoundingClientRect()[sizeName.value];
|
||||
const currentOffset = navOffset.value;
|
||||
if (containerSize < navSize) {
|
||||
scrollable.value = scrollable.value || {};
|
||||
scrollable.value.prev = currentOffset;
|
||||
scrollable.value.next = require_numbers.isGreaterThan(navSize, currentOffset + containerSize);
|
||||
if (require_numbers.isGreaterThan(containerSize, navSize - currentOffset)) navOffset.value = navSize - containerSize;
|
||||
} else {
|
||||
scrollable.value = false;
|
||||
if (currentOffset > 0) navOffset.value = 0;
|
||||
}
|
||||
};
|
||||
const changeTab = (event) => {
|
||||
const code = require_event.getEventCode(event);
|
||||
let step = 0;
|
||||
switch (code) {
|
||||
case require_aria.EVENT_CODE.left:
|
||||
case require_aria.EVENT_CODE.up:
|
||||
step = -1;
|
||||
break;
|
||||
case require_aria.EVENT_CODE.right:
|
||||
case require_aria.EVENT_CODE.down:
|
||||
step = 1;
|
||||
break;
|
||||
default: return;
|
||||
}
|
||||
const tabList = Array.from(event.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)"));
|
||||
let nextIndex = tabList.indexOf(event.target) + step;
|
||||
if (nextIndex < 0) nextIndex = tabList.length - 1;
|
||||
else if (nextIndex >= tabList.length) nextIndex = 0;
|
||||
tabList[nextIndex].focus({ preventScroll: true });
|
||||
tabList[nextIndex].click();
|
||||
setFocus();
|
||||
};
|
||||
const setFocus = () => {
|
||||
if (focusable.value) isFocus.value = true;
|
||||
};
|
||||
const removeFocus = () => isFocus.value = false;
|
||||
const setRefs = (el, key) => {
|
||||
tabRefsMap.value[key] = el;
|
||||
};
|
||||
const focusActiveTab = async () => {
|
||||
await (0, vue.nextTick)();
|
||||
tabRefsMap.value[props.currentName]?.focus({ preventScroll: true });
|
||||
};
|
||||
(0, vue.watch)(visibility, (visibility) => {
|
||||
if (visibility === "hidden") focusable.value = false;
|
||||
else if (visibility === "visible") setTimeout(() => focusable.value = true, 50);
|
||||
});
|
||||
(0, vue.watch)(focused, (focused) => {
|
||||
if (focused) setTimeout(() => focusable.value = true, 50);
|
||||
else focusable.value = false;
|
||||
});
|
||||
(0, _vueuse_core.useResizeObserver)(el$, () => {
|
||||
require_raf.rAF(update);
|
||||
});
|
||||
(0, vue.onMounted)(() => setTimeout(() => scrollToActiveTab(), 0));
|
||||
(0, vue.onUpdated)(() => update());
|
||||
expose({
|
||||
scrollToActiveTab,
|
||||
removeFocus,
|
||||
focusActiveTab,
|
||||
tabListRef: nav$,
|
||||
tabBarRef,
|
||||
scheduleRender: () => (0, vue.triggerRef)(tracker)
|
||||
});
|
||||
return () => {
|
||||
const scrollBtn = scrollable.value ? [(0, vue.createVNode)("span", {
|
||||
"class": [ns.e("nav-prev"), ns.is("disabled", !scrollable.value.prev)],
|
||||
"onClick": scrollPrev
|
||||
}, [(0, vue.createVNode)(require_index$1.ElIcon, null, { default: () => [(0, vue.createVNode)(_element_plus_icons_vue.ArrowLeft, null, null)] })]), (0, vue.createVNode)("span", {
|
||||
"class": [ns.e("nav-next"), ns.is("disabled", !scrollable.value.next)],
|
||||
"onClick": scrollNext
|
||||
}, [(0, vue.createVNode)(require_index$1.ElIcon, null, { default: () => [(0, vue.createVNode)(_element_plus_icons_vue.ArrowRight, null, null)] })])] : null;
|
||||
const tabs = props.panes.map((pane, index) => {
|
||||
const uid = pane.uid;
|
||||
const disabled = pane.props.disabled;
|
||||
const tabName = pane.props.name ?? pane.index ?? `${index}`;
|
||||
const closable = !disabled && (pane.isClosable || pane.props.closable !== false && props.editable);
|
||||
pane.index = `${index}`;
|
||||
const btnClose = closable ? (0, vue.createVNode)(require_index$1.ElIcon, {
|
||||
"class": "is-icon-close",
|
||||
"onClick": (ev) => emit("tabRemove", pane, ev)
|
||||
}, { default: () => [(0, vue.createVNode)(_element_plus_icons_vue.Close, null, null)] }) : null;
|
||||
const tabLabelContent = pane.slots.label?.() || pane.props.label;
|
||||
const tabindex = !disabled && pane.active ? props.tabindex ?? rootTabs.props.tabindex : -1;
|
||||
return (0, vue.createVNode)("div", {
|
||||
"ref": (el) => setRefs(el, tabName),
|
||||
"class": [
|
||||
ns.e("item"),
|
||||
ns.is(rootTabs.props.tabPosition),
|
||||
ns.is("active", pane.active),
|
||||
ns.is("disabled", disabled),
|
||||
ns.is("closable", closable),
|
||||
ns.is("focus", isFocus.value)
|
||||
],
|
||||
"id": `tab-${tabName}`,
|
||||
"key": `tab-${uid}`,
|
||||
"aria-controls": `pane-${tabName}`,
|
||||
"role": "tab",
|
||||
"aria-selected": pane.active,
|
||||
"tabindex": tabindex,
|
||||
"onFocus": () => setFocus(),
|
||||
"onBlur": () => removeFocus(),
|
||||
"onClick": (ev) => {
|
||||
removeFocus();
|
||||
emit("tabClick", pane, tabName, ev);
|
||||
},
|
||||
"onKeydown": (ev) => {
|
||||
const code = require_event.getEventCode(ev);
|
||||
if (closable && (code === require_aria.EVENT_CODE.delete || code === require_aria.EVENT_CODE.backspace)) emit("tabRemove", pane, ev);
|
||||
}
|
||||
}, [...[tabLabelContent, btnClose]]);
|
||||
});
|
||||
tracker.value;
|
||||
return (0, vue.createVNode)("div", {
|
||||
"ref": el$,
|
||||
"class": [
|
||||
ns.e("nav-wrap"),
|
||||
ns.is("scrollable", !!scrollable.value),
|
||||
ns.is(rootTabs.props.tabPosition)
|
||||
]
|
||||
}, [scrollBtn, (0, vue.createVNode)("div", {
|
||||
"class": ns.e("nav-scroll"),
|
||||
"ref": navScroll$
|
||||
}, [props.panes.length > 0 ? (0, vue.createVNode)("div", {
|
||||
"class": [
|
||||
ns.e("nav"),
|
||||
ns.is(rootTabs.props.tabPosition),
|
||||
ns.is("stretch", props.stretch && ["top", "bottom"].includes(rootTabs.props.tabPosition))
|
||||
],
|
||||
"ref": nav$,
|
||||
"style": navStyle.value,
|
||||
"role": "tablist",
|
||||
"onKeydown": changeTab,
|
||||
"onWheel": handleWheel
|
||||
}, [...[!props.type ? (0, vue.createVNode)(require_tab_bar.default, {
|
||||
"ref": tabBarRef,
|
||||
"tabs": [...props.panes],
|
||||
"tabRefs": tabRefsMap.value
|
||||
}, null) : null, tabs]]) : null])]);
|
||||
};
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
exports.default = TabNav;
|
||||
exports.tabNavEmits = tabNavEmits;
|
||||
exports.tabNavProps = tabNavProps;
|
||||
|
||||
//# sourceMappingURL=tab-nav.js.map
|
||||
1
frontend/node_modules/element-plus/lib/components/tabs/src/tab-nav.js.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/lib/components/tabs/src/tab-nav.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
50
frontend/node_modules/element-plus/lib/components/tabs/src/tab-pane.d.ts
generated
vendored
Normal file
50
frontend/node_modules/element-plus/lib/components/tabs/src/tab-pane.d.ts
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
import { EpPropFinalized, EpPropMergeType } from "../../../utils/vue/props/types.js";
|
||||
import _default from "./tab-pane.vue.js";
|
||||
import * as _$vue from "vue";
|
||||
import { ExtractPublicPropTypes } from "vue";
|
||||
|
||||
//#region ../../packages/components/tabs/src/tab-pane.d.ts
|
||||
/**
|
||||
* @deprecated Removed after 3.0.0, Use `TabPaneProps` instead.
|
||||
*/
|
||||
declare const tabPaneProps: {
|
||||
readonly label: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
||||
readonly name: {
|
||||
readonly type: _$vue.PropType<EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
readonly closable: EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
||||
readonly disabled: BooleanConstructor;
|
||||
readonly lazy: BooleanConstructor;
|
||||
};
|
||||
type TabPaneProps = {
|
||||
/**
|
||||
* @description title of the tab
|
||||
*/
|
||||
label?: string;
|
||||
/**
|
||||
* @description identifier corresponding to the name of Tabs, representing the alias of the tab-pane, the default is ordinal number of the tab-pane in the sequence, e.g. the first tab-pane is '0'
|
||||
*/
|
||||
name?: string | number;
|
||||
/**
|
||||
* @description whether Tab is closable
|
||||
*/
|
||||
closable?: boolean;
|
||||
/**
|
||||
* @description whether Tab is disabled
|
||||
*/
|
||||
disabled?: boolean;
|
||||
/**
|
||||
* @description whether Tab is lazily rendered
|
||||
*/
|
||||
lazy?: boolean;
|
||||
};
|
||||
/**
|
||||
* @deprecated Removed after 3.0.0, Use `TabPaneProps` instead.
|
||||
*/
|
||||
type TabPanePropsPublic = ExtractPublicPropTypes<typeof tabPaneProps>;
|
||||
type TabPaneInstance = InstanceType<typeof _default> & unknown;
|
||||
//#endregion
|
||||
export { TabPaneInstance, TabPaneProps, TabPanePropsPublic, tabPaneProps };
|
||||
37
frontend/node_modules/element-plus/lib/components/tabs/src/tab-pane.js
generated
vendored
Normal file
37
frontend/node_modules/element-plus/lib/components/tabs/src/tab-pane.js
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
||||
//#region ../../packages/components/tabs/src/tab-pane.ts
|
||||
/**
|
||||
* @deprecated Removed after 3.0.0, Use `TabPaneProps` instead.
|
||||
*/
|
||||
const tabPaneProps = require("../../../utils/vue/props/runtime.js").buildProps({
|
||||
/**
|
||||
* @description title of the tab
|
||||
*/
|
||||
label: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
/**
|
||||
* @description identifier corresponding to the name of Tabs, representing the alias of the tab-pane, the default is ordinal number of the tab-pane in the sequence, e.g. the first tab-pane is '0'
|
||||
*/
|
||||
name: { type: [String, Number] },
|
||||
/**
|
||||
* @description whether Tab is closable
|
||||
*/
|
||||
closable: {
|
||||
type: Boolean,
|
||||
default: void 0
|
||||
},
|
||||
/**
|
||||
* @description whether Tab is disabled
|
||||
*/
|
||||
disabled: Boolean,
|
||||
/**
|
||||
* @description whether Tab is lazily rendered
|
||||
*/
|
||||
lazy: Boolean
|
||||
});
|
||||
//#endregion
|
||||
exports.tabPaneProps = tabPaneProps;
|
||||
|
||||
//# sourceMappingURL=tab-pane.js.map
|
||||
1
frontend/node_modules/element-plus/lib/components/tabs/src/tab-pane.js.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/lib/components/tabs/src/tab-pane.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"tab-pane.js","names":["buildProps"],"sources":["../../../../../../packages/components/tabs/src/tab-pane.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\n\nimport type { ExtractPublicPropTypes } from 'vue'\nimport type TabPane from './tab-pane.vue'\n\n/**\n * @deprecated Removed after 3.0.0, Use `TabPaneProps` instead.\n */\nexport const tabPaneProps = buildProps({\n /**\n * @description title of the tab\n */\n label: {\n type: String,\n default: '',\n },\n /**\n * @description identifier corresponding to the name of Tabs, representing the alias of the tab-pane, the default is ordinal number of the tab-pane in the sequence, e.g. the first tab-pane is '0'\n */\n name: {\n type: [String, Number],\n },\n /**\n * @description whether Tab is closable\n */\n closable: {\n type: Boolean,\n default: undefined,\n },\n /**\n * @description whether Tab is disabled\n */\n disabled: Boolean,\n /**\n * @description whether Tab is lazily rendered\n */\n lazy: Boolean,\n} as const)\n\nexport type TabPaneProps = {\n /**\n * @description title of the tab\n */\n label?: string\n /**\n * @description identifier corresponding to the name of Tabs, representing the alias of the tab-pane, the default is ordinal number of the tab-pane in the sequence, e.g. the first tab-pane is '0'\n */\n name?: string | number\n /**\n * @description whether Tab is closable\n */\n closable?: boolean\n /**\n * @description whether Tab is disabled\n */\n disabled?: boolean\n /**\n * @description whether Tab is lazily rendered\n */\n lazy?: boolean\n}\n\n/**\n * @deprecated Removed after 3.0.0, Use `TabPaneProps` instead.\n */\nexport type TabPanePropsPublic = ExtractPublicPropTypes<typeof tabPaneProps>\n\nexport type TabPaneInstance = InstanceType<typeof TabPane> & unknown\n"],"mappings":";;;;;AAQA,MAAa,6DAAeA,CAAAA,WAAW;;;;CAIrC,OAAO;EACL,MAAM;EACN,SAAS;EACV;;;;CAID,MAAM,EACJ,MAAM,CAAC,QAAQ,OAAO,EACvB;;;;CAID,UAAU;EACR,MAAM;EACN,SAAS,KAAA;EACV;;;;CAID,UAAU;;;;CAIV,MAAM;CACP,CAAU"}
|
||||
21
frontend/node_modules/element-plus/lib/components/tabs/src/tab-pane.vue.d.ts
generated
vendored
Normal file
21
frontend/node_modules/element-plus/lib/components/tabs/src/tab-pane.vue.d.ts
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
import { TabPaneProps } from "./tab-pane.js";
|
||||
import * as _$vue from "vue";
|
||||
|
||||
//#region ../../packages/components/tabs/src/tab-pane.vue.d.ts
|
||||
declare var __VLS_1: {};
|
||||
type __VLS_Slots = {} & {
|
||||
default?: (props: typeof __VLS_1) => any;
|
||||
};
|
||||
declare const __VLS_base: _$vue.DefineComponent<TabPaneProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<TabPaneProps> & Readonly<{}>, {
|
||||
label: string;
|
||||
closable: boolean;
|
||||
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
||||
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
||||
declare const _default: typeof __VLS_export;
|
||||
type __VLS_WithSlots<T, S> = T & {
|
||||
new (): {
|
||||
$slots: S;
|
||||
};
|
||||
};
|
||||
//#endregion
|
||||
export { _default as default };
|
||||
73
frontend/node_modules/element-plus/lib/components/tabs/src/tab-pane.vue_vue_type_script_setup_true_lang.js
generated
vendored
Normal file
73
frontend/node_modules/element-plus/lib/components/tabs/src/tab-pane.vue_vue_type_script_setup_true_lang.js
generated
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
require("../../../_virtual/_rolldown/runtime.js");
|
||||
const require_error = require("../../../utils/error.js");
|
||||
const require_index = require("../../../hooks/use-namespace/index.js");
|
||||
const require_constants = require("./constants.js");
|
||||
const require_tab_pane = require("./tab-pane.js");
|
||||
let vue = require("vue");
|
||||
//#region ../../packages/components/tabs/src/tab-pane.vue?vue&type=script&setup=true&lang.ts
|
||||
const _hoisted_1 = [
|
||||
"id",
|
||||
"aria-hidden",
|
||||
"aria-labelledby"
|
||||
];
|
||||
const COMPONENT_NAME = "ElTabPane";
|
||||
var tab_pane_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
||||
name: COMPONENT_NAME,
|
||||
__name: "tab-pane",
|
||||
props: require_tab_pane.tabPaneProps,
|
||||
setup(__props) {
|
||||
const props = __props;
|
||||
const instance = (0, vue.getCurrentInstance)();
|
||||
const slots = (0, vue.useSlots)();
|
||||
const tabsRoot = (0, vue.inject)(require_constants.tabsRootContextKey);
|
||||
if (!tabsRoot) require_error.throwError(COMPONENT_NAME, "usage: <el-tabs><el-tab-pane /></el-tabs/>");
|
||||
const ns = require_index.useNamespace("tab-pane");
|
||||
const paneRef = (0, vue.ref)();
|
||||
const index = (0, vue.ref)();
|
||||
const isClosable = (0, vue.computed)(() => props.closable ?? tabsRoot.props.closable);
|
||||
const active = (0, vue.computed)(() => tabsRoot.currentName.value === (props.name ?? index.value));
|
||||
const loaded = (0, vue.ref)(active.value);
|
||||
const paneName = (0, vue.computed)(() => props.name ?? index.value);
|
||||
const shouldBeRender = (0, vue.computed)(() => !props.lazy || loaded.value || active.value);
|
||||
const isFocusInsidePane = () => {
|
||||
return paneRef.value?.contains(document.activeElement);
|
||||
};
|
||||
(0, vue.watch)(active, (val) => {
|
||||
if (val) loaded.value = true;
|
||||
});
|
||||
const pane = (0, vue.reactive)({
|
||||
uid: instance.uid,
|
||||
getVnode: () => instance.vnode,
|
||||
slots,
|
||||
props,
|
||||
paneName,
|
||||
active,
|
||||
index,
|
||||
isClosable,
|
||||
isFocusInsidePane
|
||||
});
|
||||
tabsRoot.registerPane(pane);
|
||||
(0, vue.onBeforeUnmount)(() => {
|
||||
tabsRoot.unregisterPane(pane);
|
||||
});
|
||||
(0, vue.onBeforeUpdate)(() => {
|
||||
if (slots.label) tabsRoot.nav$.value?.scheduleRender();
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
return shouldBeRender.value ? (0, vue.withDirectives)(((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
||||
key: 0,
|
||||
id: `pane-${paneName.value}`,
|
||||
ref_key: "paneRef",
|
||||
ref: paneRef,
|
||||
class: (0, vue.normalizeClass)((0, vue.unref)(ns).b()),
|
||||
role: "tabpanel",
|
||||
"aria-hidden": !active.value,
|
||||
"aria-labelledby": `tab-${paneName.value}`
|
||||
}, [(0, vue.renderSlot)(_ctx.$slots, "default")], 10, _hoisted_1)), [[vue.vShow, active.value]]) : (0, vue.createCommentVNode)("v-if", true);
|
||||
};
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
exports.default = tab_pane_vue_vue_type_script_setup_true_lang_default;
|
||||
|
||||
//# sourceMappingURL=tab-pane.vue_vue_type_script_setup_true_lang.js.map
|
||||
1
frontend/node_modules/element-plus/lib/components/tabs/src/tab-pane.vue_vue_type_script_setup_true_lang.js.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/lib/components/tabs/src/tab-pane.vue_vue_type_script_setup_true_lang.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"tab-pane.vue_vue_type_script_setup_true_lang.js","names":[],"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 ref=\"paneRef\"\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 onBeforeUnmount,\n onBeforeUpdate,\n reactive,\n ref,\n useSlots,\n watch,\n} from 'vue'\nimport { throwError } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { tabsRootContextKey } from './constants'\n\nimport type { TabPaneProps } from './tab-pane'\n\nconst COMPONENT_NAME = 'ElTabPane'\ndefineOptions({\n name: COMPONENT_NAME,\n})\nconst props = withDefaults(defineProps<TabPaneProps>(), {\n label: '',\n closable: undefined,\n})\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 paneRef = ref<HTMLDivElement>()\nconst index = ref<string>()\nconst isClosable = computed(() => props.closable ?? tabsRoot.props.closable)\nconst active = computed(\n () => tabsRoot.currentName.value === (props.name ?? index.value)\n)\nconst loaded = ref(active.value)\nconst paneName = computed(() => props.name ?? index.value)\nconst shouldBeRender = computed(\n () => !props.lazy || loaded.value || active.value\n)\n\nconst isFocusInsidePane = () => {\n return paneRef.value?.contains(document.activeElement)\n}\n\nwatch(active, (val) => {\n if (val) loaded.value = true\n})\n\nconst pane = reactive({\n uid: instance.uid,\n getVnode: () => instance.vnode,\n slots,\n props,\n paneName,\n active,\n index,\n isClosable,\n isFocusInsidePane,\n})\n\ntabsRoot.registerPane(pane)\n\nonBeforeUnmount(() => {\n tabsRoot.unregisterPane(pane)\n})\n\nonBeforeUpdate(() => {\n if (slots.label) tabsRoot.nav$.value?.scheduleRender()\n})\n</script>\n"],"mappings":";;;;;;;;;;;;AAiCA,MAAM,iBAAiB;;;;;;EAIvB,MAAM,QAAQ;EAKd,MAAM,YAAA,GAAA,IAAA,qBAA+B;EACrC,MAAM,SAAA,GAAA,IAAA,WAAiB;EAEvB,MAAM,YAAA,GAAA,IAAA,QAAkB,kBAAA,mBAAkB;EAC1C,IAAI,CAAC,UACH,cAAA,WAAW,gBAAgB,6CAA4C;EAEzE,MAAM,KAAK,cAAA,aAAa,WAAU;EAElC,MAAM,WAAA,GAAA,IAAA,MAA8B;EACpC,MAAM,SAAA,GAAA,IAAA,MAAoB;EAC1B,MAAM,cAAA,GAAA,IAAA,gBAA4B,MAAM,YAAY,SAAS,MAAM,SAAQ;EAC3E,MAAM,UAAA,GAAA,IAAA,gBACE,SAAS,YAAY,WAAW,MAAM,QAAQ,MAAM,OAC5D;EACA,MAAM,UAAA,GAAA,IAAA,KAAa,OAAO,MAAK;EAC/B,MAAM,YAAA,GAAA,IAAA,gBAA0B,MAAM,QAAQ,MAAM,MAAK;EACzD,MAAM,kBAAA,GAAA,IAAA,gBACE,CAAC,MAAM,QAAQ,OAAO,SAAS,OAAO,MAC9C;EAEA,MAAM,0BAA0B;GAC9B,OAAO,QAAQ,OAAO,SAAS,SAAS,cAAa;;EAGvD,CAAA,GAAA,IAAA,OAAM,SAAS,QAAQ;GACrB,IAAI,KAAK,OAAO,QAAQ;IACzB;EAED,MAAM,QAAA,GAAA,IAAA,UAAgB;GACpB,KAAK,SAAS;GACd,gBAAgB,SAAS;GACzB;GACA;GACA;GACA;GACA;GACA;GACA;GACD,CAAA;EAED,SAAS,aAAa,KAAI;EAE1B,CAAA,GAAA,IAAA,uBAAsB;GACpB,SAAS,eAAe,KAAI;IAC7B;EAED,CAAA,GAAA,IAAA,sBAAqB;GACnB,IAAI,MAAM,OAAO,SAAS,KAAK,OAAO,gBAAe;IACtD;;UAzFS,eAAA,SAAA,GAAA,IAAA,kBAAA,GAAA,IAAA,YAAA,GAAA,GAAA,IAAA,oBAUF,OAAA;;IARH,IAAE,QAAU,SAAA;aACT;IAAJ,KAAI;IACH,QAAA,GAAA,IAAA,iBAAA,GAAA,IAAA,OAAO,GAAE,CAAC,GAAC,CAAA;IACZ,MAAK;IACJ,eAAW,CAAG,OAAA;IACd,mBAAe,OAAS,SAAA;2BAEjB,KAAA,QAAA,UAAA,CAAA,EAAA,IAAA,WAAA,GAAA,CAAA,CAAA,IAAA,OARA,OAAA,MAAM,CAAA,CAAA,IAAA,GAAA,IAAA,oBAAA,QAAA,KAAA"}
|
||||
10
frontend/node_modules/element-plus/lib/components/tabs/src/tab-pane2.js
generated
vendored
Normal file
10
frontend/node_modules/element-plus/lib/components/tabs/src/tab-pane2.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
Object.defineProperties(exports, {
|
||||
__esModule: { value: true },
|
||||
[Symbol.toStringTag]: { value: "Module" }
|
||||
});
|
||||
//#region ../../packages/components/tabs/src/tab-pane.vue
|
||||
var tab_pane_default = require("./tab-pane.vue_vue_type_script_setup_true_lang.js").default;
|
||||
//#endregion
|
||||
exports.default = tab_pane_default;
|
||||
|
||||
//# sourceMappingURL=tab-pane2.js.map
|
||||
1
frontend/node_modules/element-plus/lib/components/tabs/src/tab-pane2.js.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/lib/components/tabs/src/tab-pane2.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"tab-pane2.js","names":[],"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 ref=\"paneRef\"\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 onBeforeUnmount,\n onBeforeUpdate,\n reactive,\n ref,\n useSlots,\n watch,\n} from 'vue'\nimport { throwError } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { tabsRootContextKey } from './constants'\n\nimport type { TabPaneProps } from './tab-pane'\n\nconst COMPONENT_NAME = 'ElTabPane'\ndefineOptions({\n name: COMPONENT_NAME,\n})\nconst props = withDefaults(defineProps<TabPaneProps>(), {\n label: '',\n closable: undefined,\n})\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 paneRef = ref<HTMLDivElement>()\nconst index = ref<string>()\nconst isClosable = computed(() => props.closable ?? tabsRoot.props.closable)\nconst active = computed(\n () => tabsRoot.currentName.value === (props.name ?? index.value)\n)\nconst loaded = ref(active.value)\nconst paneName = computed(() => props.name ?? index.value)\nconst shouldBeRender = computed(\n () => !props.lazy || loaded.value || active.value\n)\n\nconst isFocusInsidePane = () => {\n return paneRef.value?.contains(document.activeElement)\n}\n\nwatch(active, (val) => {\n if (val) loaded.value = true\n})\n\nconst pane = reactive({\n uid: instance.uid,\n getVnode: () => instance.vnode,\n slots,\n props,\n paneName,\n active,\n index,\n isClosable,\n isFocusInsidePane,\n})\n\ntabsRoot.registerPane(pane)\n\nonBeforeUnmount(() => {\n tabsRoot.unregisterPane(pane)\n})\n\nonBeforeUpdate(() => {\n if (slots.label) tabsRoot.nav$.value?.scheduleRender()\n})\n</script>\n"],"mappings":""}
|
||||
155
frontend/node_modules/element-plus/lib/components/tabs/src/tabs.d.ts
generated
vendored
Normal file
155
frontend/node_modules/element-plus/lib/components/tabs/src/tabs.d.ts
generated
vendored
Normal file
@@ -0,0 +1,155 @@
|
||||
import { EpPropFinalized, EpPropMergeType } from "../../../utils/vue/props/types.js";
|
||||
import { Awaitable } from "../../../utils/typescript.js";
|
||||
import { TabPaneName, TabsPaneContext } from "./constants.js";
|
||||
import { TabNavInstance } from "./tab-nav.js";
|
||||
import * as _$vue from "vue";
|
||||
import { ExtractPropTypes, ExtractPublicPropTypes, VNode } from "vue";
|
||||
import * as _$vue_jsx_runtime0 from "vue/jsx-runtime";
|
||||
|
||||
//#region ../../packages/components/tabs/src/tabs.d.ts
|
||||
declare const tabsProps: {
|
||||
readonly type: EpPropFinalized<StringConstructor, "" | "card" | "border-card", unknown, "", boolean>;
|
||||
readonly closable: BooleanConstructor;
|
||||
readonly addable: BooleanConstructor;
|
||||
readonly modelValue: {
|
||||
readonly type: _$vue.PropType<EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
readonly defaultValue: {
|
||||
readonly type: _$vue.PropType<EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
readonly editable: BooleanConstructor;
|
||||
readonly tabPosition: EpPropFinalized<StringConstructor, "top" | "bottom" | "left" | "right", unknown, "top", boolean>;
|
||||
readonly beforeLeave: EpPropFinalized<(new (...args: any[]) => (newName: TabPaneName, oldName: TabPaneName) => Awaitable<void | boolean>) | (() => (newName: TabPaneName, oldName: TabPaneName) => Awaitable<void | boolean>) | {
|
||||
(): (newName: TabPaneName, oldName: TabPaneName) => Awaitable<void | boolean>;
|
||||
new (): any;
|
||||
readonly prototype: any;
|
||||
} | (((new (...args: any[]) => (newName: TabPaneName, oldName: TabPaneName) => Awaitable<void | boolean>) | (() => (newName: TabPaneName, oldName: TabPaneName) => Awaitable<void | boolean>) | {
|
||||
(): (newName: TabPaneName, oldName: TabPaneName) => Awaitable<void | boolean>;
|
||||
new (): any;
|
||||
readonly prototype: any;
|
||||
}) | null)[], unknown, unknown, () => true, boolean>;
|
||||
readonly stretch: BooleanConstructor;
|
||||
readonly tabindex: EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, 0, boolean>;
|
||||
};
|
||||
type TabsProps = ExtractPropTypes<typeof tabsProps>;
|
||||
type TabsPropsPublic = ExtractPublicPropTypes<typeof tabsProps>;
|
||||
declare const tabsEmits: {
|
||||
"update:modelValue": (name: TabPaneName) => name is string | number;
|
||||
tabClick: (pane: TabsPaneContext, ev: Event) => boolean;
|
||||
tabChange: (name: TabPaneName) => name is string | number;
|
||||
edit: (paneName: TabPaneName | undefined, action: "remove" | "add") => boolean;
|
||||
tabRemove: (name: TabPaneName) => name is string | number;
|
||||
tabAdd: () => boolean;
|
||||
};
|
||||
type TabsEmits = typeof tabsEmits;
|
||||
type TabsPanes = Record<number, TabsPaneContext>;
|
||||
declare const Tabs: _$vue.DefineComponent<ExtractPropTypes<{
|
||||
readonly type: EpPropFinalized<StringConstructor, "" | "card" | "border-card", unknown, "", boolean>;
|
||||
readonly closable: BooleanConstructor;
|
||||
readonly addable: BooleanConstructor;
|
||||
readonly modelValue: {
|
||||
readonly type: _$vue.PropType<EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
readonly defaultValue: {
|
||||
readonly type: _$vue.PropType<EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
readonly editable: BooleanConstructor;
|
||||
readonly tabPosition: EpPropFinalized<StringConstructor, "top" | "bottom" | "left" | "right", unknown, "top", boolean>;
|
||||
readonly beforeLeave: EpPropFinalized<(new (...args: any[]) => (newName: TabPaneName, oldName: TabPaneName) => Awaitable<void | boolean>) | (() => (newName: TabPaneName, oldName: TabPaneName) => Awaitable<void | boolean>) | {
|
||||
(): (newName: TabPaneName, oldName: TabPaneName) => Awaitable<void | boolean>;
|
||||
new (): any;
|
||||
readonly prototype: any;
|
||||
} | (((new (...args: any[]) => (newName: TabPaneName, oldName: TabPaneName) => Awaitable<void | boolean>) | (() => (newName: TabPaneName, oldName: TabPaneName) => Awaitable<void | boolean>) | {
|
||||
(): (newName: TabPaneName, oldName: TabPaneName) => Awaitable<void | boolean>;
|
||||
new (): any;
|
||||
readonly prototype: any;
|
||||
}) | null)[], unknown, unknown, () => true, boolean>;
|
||||
readonly stretch: BooleanConstructor;
|
||||
readonly tabindex: EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, 0, boolean>;
|
||||
}>, () => _$vue_jsx_runtime0.JSX.Element, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
||||
"update:modelValue": (name: TabPaneName) => name is string | number;
|
||||
tabClick: (pane: TabsPaneContext, ev: Event) => boolean;
|
||||
tabChange: (name: TabPaneName) => name is string | number;
|
||||
edit: (paneName: TabPaneName | undefined, action: "remove" | "add") => boolean;
|
||||
tabRemove: (name: TabPaneName) => name is string | number;
|
||||
tabAdd: () => boolean;
|
||||
}, string, _$vue.PublicProps, Readonly<ExtractPropTypes<{
|
||||
readonly type: EpPropFinalized<StringConstructor, "" | "card" | "border-card", unknown, "", boolean>;
|
||||
readonly closable: BooleanConstructor;
|
||||
readonly addable: BooleanConstructor;
|
||||
readonly modelValue: {
|
||||
readonly type: _$vue.PropType<EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
readonly defaultValue: {
|
||||
readonly type: _$vue.PropType<EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
readonly editable: BooleanConstructor;
|
||||
readonly tabPosition: EpPropFinalized<StringConstructor, "top" | "bottom" | "left" | "right", unknown, "top", boolean>;
|
||||
readonly beforeLeave: EpPropFinalized<(new (...args: any[]) => (newName: TabPaneName, oldName: TabPaneName) => Awaitable<void | boolean>) | (() => (newName: TabPaneName, oldName: TabPaneName) => Awaitable<void | boolean>) | {
|
||||
(): (newName: TabPaneName, oldName: TabPaneName) => Awaitable<void | boolean>;
|
||||
new (): any;
|
||||
readonly prototype: any;
|
||||
} | (((new (...args: any[]) => (newName: TabPaneName, oldName: TabPaneName) => Awaitable<void | boolean>) | (() => (newName: TabPaneName, oldName: TabPaneName) => Awaitable<void | boolean>) | {
|
||||
(): (newName: TabPaneName, oldName: TabPaneName) => Awaitable<void | boolean>;
|
||||
new (): any;
|
||||
readonly prototype: any;
|
||||
}) | null)[], unknown, unknown, () => true, boolean>;
|
||||
readonly stretch: BooleanConstructor;
|
||||
readonly tabindex: EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, 0, boolean>;
|
||||
}>> & Readonly<{
|
||||
"onUpdate:modelValue"?: ((name: TabPaneName) => any) | undefined;
|
||||
onTabClick?: ((pane: {
|
||||
uid: number;
|
||||
getVnode: () => VNode;
|
||||
slots: _$vue.Slots;
|
||||
props: {
|
||||
label?: string | undefined;
|
||||
name?: string | number | undefined;
|
||||
closable?: boolean | undefined;
|
||||
disabled?: boolean | undefined;
|
||||
lazy?: boolean | undefined;
|
||||
};
|
||||
paneName: TabPaneName | undefined;
|
||||
active: boolean;
|
||||
index: string | undefined;
|
||||
isClosable: boolean;
|
||||
isFocusInsidePane: () => boolean | undefined;
|
||||
}, ev: Event) => any) | undefined;
|
||||
onTabChange?: ((name: TabPaneName) => any) | undefined;
|
||||
onEdit?: ((paneName: TabPaneName | undefined, action: "add" | "remove") => any) | undefined;
|
||||
onTabRemove?: ((name: TabPaneName) => any) | undefined;
|
||||
onTabAdd?: (() => any) | undefined;
|
||||
}>, {
|
||||
readonly type: EpPropMergeType<StringConstructor, "" | "card" | "border-card", unknown>;
|
||||
readonly closable: boolean;
|
||||
readonly tabindex: EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
||||
readonly stretch: boolean;
|
||||
readonly editable: boolean;
|
||||
readonly tabPosition: EpPropMergeType<StringConstructor, "top" | "bottom" | "left" | "right", unknown>;
|
||||
readonly beforeLeave: (newName: TabPaneName, oldName: TabPaneName) => Awaitable<void | boolean>;
|
||||
readonly addable: boolean;
|
||||
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>;
|
||||
type TabsInstance = InstanceType<typeof Tabs> & {
|
||||
currentName: TabPaneName;
|
||||
tabNavRef: TabNavInstance | undefined;
|
||||
};
|
||||
//#endregion
|
||||
export { TabsEmits, TabsInstance, TabsPanes, TabsProps, TabsPropsPublic, Tabs as default, tabsEmits, tabsProps };
|
||||
210
frontend/node_modules/element-plus/lib/components/tabs/src/tabs.js
generated
vendored
Normal file
210
frontend/node_modules/element-plus/lib/components/tabs/src/tabs.js
generated
vendored
Normal file
@@ -0,0 +1,210 @@
|
||||
require("../../../_virtual/_rolldown/runtime.js");
|
||||
const require_aria = require("../../../constants/aria.js");
|
||||
const require_event = require("../../../constants/event.js");
|
||||
const require_event$1 = require("../../../utils/dom/event.js");
|
||||
const require_types = require("../../../utils/types.js");
|
||||
const require_runtime$1 = require("../../../utils/vue/props/runtime.js");
|
||||
const require_index = require("../../../hooks/use-namespace/index.js");
|
||||
const require_index$1 = require("../../../hooks/use-ordered-children/index.js");
|
||||
const require_index$2 = require("../../icon/index.js");
|
||||
const require_constants = require("./constants.js");
|
||||
const require_tab_nav = require("./tab-nav.js");
|
||||
let lodash_unified = require("lodash-unified");
|
||||
let _element_plus_icons_vue = require("@element-plus/icons-vue");
|
||||
let vue = require("vue");
|
||||
let _vue_shared = require("@vue/shared");
|
||||
//#region ../../packages/components/tabs/src/tabs.tsx
|
||||
const tabsProps = require_runtime$1.buildProps({
|
||||
/**
|
||||
* @description type of Tab
|
||||
*/
|
||||
type: {
|
||||
type: String,
|
||||
values: [
|
||||
"card",
|
||||
"border-card",
|
||||
""
|
||||
],
|
||||
default: ""
|
||||
},
|
||||
/**
|
||||
* @description whether Tab is closable
|
||||
*/
|
||||
closable: Boolean,
|
||||
/**
|
||||
* @description whether Tab is addable
|
||||
*/
|
||||
addable: Boolean,
|
||||
/**
|
||||
* @description binding value, name of the selected tab
|
||||
*/
|
||||
modelValue: { type: [String, Number] },
|
||||
/**
|
||||
* @description initial value when `model-value` is not set
|
||||
*/
|
||||
defaultValue: { type: [String, Number] },
|
||||
/**
|
||||
* @description whether Tab is addable and closable
|
||||
*/
|
||||
editable: Boolean,
|
||||
/**
|
||||
* @description position of tabs
|
||||
*/
|
||||
tabPosition: {
|
||||
type: String,
|
||||
values: [
|
||||
"top",
|
||||
"right",
|
||||
"bottom",
|
||||
"left"
|
||||
],
|
||||
default: "top"
|
||||
},
|
||||
/**
|
||||
* @description hook function before switching tab. If `false` is returned or a `Promise` is returned and then is rejected, switching will be prevented
|
||||
*/
|
||||
beforeLeave: {
|
||||
type: require_runtime$1.definePropType(Function),
|
||||
default: () => true
|
||||
},
|
||||
/**
|
||||
* @description whether width of tab automatically fits its container
|
||||
*/
|
||||
stretch: Boolean,
|
||||
/**
|
||||
* @description tabs tabindex
|
||||
*/
|
||||
tabindex: {
|
||||
type: [String, Number],
|
||||
default: 0
|
||||
}
|
||||
});
|
||||
const isPaneName = (value) => (0, _vue_shared.isString)(value) || require_types.isNumber(value);
|
||||
const tabsEmits = {
|
||||
[require_event.UPDATE_MODEL_EVENT]: (name) => isPaneName(name),
|
||||
tabClick: (pane, ev) => ev instanceof Event,
|
||||
tabChange: (name) => isPaneName(name),
|
||||
edit: (paneName, action) => ["remove", "add"].includes(action),
|
||||
tabRemove: (name) => isPaneName(name),
|
||||
tabAdd: () => true
|
||||
};
|
||||
const Tabs = /* @__PURE__ */ (0, vue.defineComponent)({
|
||||
name: "ElTabs",
|
||||
props: tabsProps,
|
||||
emits: tabsEmits,
|
||||
setup(props, { emit, slots, expose }) {
|
||||
const ns = require_index.useNamespace("tabs");
|
||||
const isVertical = (0, vue.computed)(() => ["left", "right"].includes(props.tabPosition));
|
||||
const { children: panes, addChild: registerPane, removeChild: unregisterPane, ChildrenSorter: PanesSorter } = require_index$1.useOrderedChildren((0, vue.getCurrentInstance)(), "ElTabPane");
|
||||
const nav$ = (0, vue.ref)();
|
||||
const currentName = (0, vue.ref)((require_types.isUndefined(props.modelValue) ? props.defaultValue : props.modelValue) ?? "0");
|
||||
const setCurrentName = async (value, trigger = false) => {
|
||||
if (currentName.value === value || require_types.isUndefined(value)) return;
|
||||
try {
|
||||
let canLeave;
|
||||
if (props.beforeLeave) {
|
||||
const result = props.beforeLeave(value, currentName.value);
|
||||
canLeave = result instanceof Promise ? await result : result;
|
||||
} else canLeave = true;
|
||||
if (canLeave !== false) {
|
||||
const isFocusInsidePane = panes.value.find((item) => item.paneName === currentName.value)?.isFocusInsidePane();
|
||||
currentName.value = value;
|
||||
if (trigger) {
|
||||
emit(require_event.UPDATE_MODEL_EVENT, value);
|
||||
emit("tabChange", value);
|
||||
}
|
||||
nav$.value?.removeFocus?.();
|
||||
if (isFocusInsidePane) nav$.value?.focusActiveTab();
|
||||
}
|
||||
} catch {}
|
||||
};
|
||||
const handleTabClick = (tab, tabName, event) => {
|
||||
if (tab.props.disabled) return;
|
||||
emit("tabClick", tab, event);
|
||||
setCurrentName(tabName, true);
|
||||
};
|
||||
const handleTabRemove = (pane, ev) => {
|
||||
if (pane.props.disabled || require_types.isUndefined(pane.props.name)) return;
|
||||
ev.stopPropagation();
|
||||
emit("edit", pane.props.name, "remove");
|
||||
emit("tabRemove", pane.props.name);
|
||||
};
|
||||
const handleTabAdd = () => {
|
||||
emit("edit", void 0, "add");
|
||||
emit("tabAdd");
|
||||
};
|
||||
const handleKeydown = (event) => {
|
||||
const code = require_event$1.getEventCode(event);
|
||||
if ([require_aria.EVENT_CODE.enter, require_aria.EVENT_CODE.numpadEnter].includes(code)) handleTabAdd();
|
||||
};
|
||||
const swapChildren = (vnode) => {
|
||||
const actualFirstChild = vnode.el.firstChild;
|
||||
const firstChild = ["bottom", "right"].includes(props.tabPosition) ? vnode.children[0].el : vnode.children[1].el;
|
||||
if (actualFirstChild !== firstChild) actualFirstChild.before(firstChild);
|
||||
};
|
||||
(0, vue.watch)(() => props.modelValue, (modelValue) => setCurrentName(modelValue));
|
||||
(0, vue.watch)(currentName, async () => {
|
||||
await (0, vue.nextTick)();
|
||||
nav$.value?.scrollToActiveTab();
|
||||
});
|
||||
(0, vue.provide)(require_constants.tabsRootContextKey, {
|
||||
props,
|
||||
currentName,
|
||||
registerPane,
|
||||
unregisterPane,
|
||||
nav$
|
||||
});
|
||||
expose({
|
||||
currentName,
|
||||
get tabNavRef() {
|
||||
return (0, lodash_unified.omit)(nav$.value, ["scheduleRender"]);
|
||||
}
|
||||
});
|
||||
return () => {
|
||||
const addSlot = slots["add-icon"];
|
||||
const newButton = props.editable || props.addable ? (0, vue.createVNode)("div", {
|
||||
"class": [ns.e("new-tab"), isVertical.value && ns.e("new-tab-vertical")],
|
||||
"tabindex": props.tabindex,
|
||||
"onClick": handleTabAdd,
|
||||
"onKeydown": handleKeydown
|
||||
}, [addSlot ? (0, vue.renderSlot)(slots, "add-icon") : (0, vue.createVNode)(require_index$2.ElIcon, { "class": ns.is("icon-plus") }, { default: () => [(0, vue.createVNode)(_element_plus_icons_vue.Plus, null, null)] })]) : null;
|
||||
const tabNav = () => (0, vue.createVNode)(require_tab_nav.default, {
|
||||
"ref": nav$,
|
||||
"currentName": currentName.value,
|
||||
"editable": props.editable,
|
||||
"type": props.type,
|
||||
"panes": panes.value,
|
||||
"stretch": props.stretch,
|
||||
"onTabClick": handleTabClick,
|
||||
"onTabRemove": handleTabRemove
|
||||
}, null);
|
||||
const header = (0, vue.createVNode)("div", { "class": [
|
||||
ns.e("header"),
|
||||
isVertical.value && ns.e("header-vertical"),
|
||||
ns.is(props.tabPosition)
|
||||
] }, [(0, vue.createVNode)(PanesSorter, null, {
|
||||
default: tabNav,
|
||||
$stable: true
|
||||
}), newButton]);
|
||||
const panels = (0, vue.createVNode)("div", { "class": ns.e("content") }, [(0, vue.renderSlot)(slots, "default")]);
|
||||
return (0, vue.createVNode)("div", {
|
||||
"class": [
|
||||
ns.b(),
|
||||
ns.m(props.tabPosition),
|
||||
{
|
||||
[ns.m("card")]: props.type === "card",
|
||||
[ns.m("border-card")]: props.type === "border-card"
|
||||
}
|
||||
],
|
||||
"onVnodeMounted": swapChildren,
|
||||
"onVnodeUpdated": swapChildren
|
||||
}, [panels, header]);
|
||||
};
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
exports.default = Tabs;
|
||||
exports.tabsEmits = tabsEmits;
|
||||
exports.tabsProps = tabsProps;
|
||||
|
||||
//# sourceMappingURL=tabs.js.map
|
||||
1
frontend/node_modules/element-plus/lib/components/tabs/src/tabs.js.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/lib/components/tabs/src/tabs.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user