@v-c/tabs 1.2.1 → 1.3.1
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/TabNavList/AddButton.vue.d.ts +6 -0
- package/dist/TabNavList/AddButton.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/TabNavList/ExtraContent.vue.d.ts +6 -0
- package/dist/TabNavList/ExtraContent.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/TabNavList/OperationNode.vue.d.ts +8 -0
- package/dist/TabNavList/OperationNode.vue_vue_type_script_setup_true_lang.js +17 -7
- package/dist/TabNavList/TabNode.vue.d.ts +4 -0
- package/dist/TabNavList/TabNode.vue_vue_type_script_setup_true_lang.js +7 -6
- package/dist/TabNavList/Wrapper.vue.d.ts +4 -0
- package/dist/TabNavList/Wrapper.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/TabNavList/index.vue.d.ts +4 -0
- package/dist/TabNavList/index.vue_vue_type_script_setup_true_lang.js +3 -2
- package/dist/TabPanelList/TabPane.vue.d.ts +4 -0
- package/dist/TabPanelList/TabPane.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/TabPanelList/index.vue.d.ts +16 -0
- package/dist/TabPanelList/index.vue_vue_type_script_setup_true_lang.js +3 -7
- package/dist/Tabs.vue.d.ts +9 -0
- package/dist/Tabs.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/interface.d.ts +5 -0
- package/package.json +6 -6
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AddButtonProps } from '../interface';
|
|
2
|
+
declare const __VLS_export: import('vue').DefineComponent<AddButtonProps, {
|
|
3
|
+
buttonRef: import('vue').Ref<HTMLButtonElement | undefined, HTMLButtonElement | undefined>;
|
|
4
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<AddButtonProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
5
|
+
declare const _default: typeof __VLS_export;
|
|
6
|
+
export default _default;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createCommentVNode, createElementBlock, createVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, ref, toRefs, unref } from "vue";
|
|
2
|
-
import { RenderComponent } from "@v-c/util";
|
|
2
|
+
import { RenderComponent, isVueRenderable } from "@v-c/util";
|
|
3
3
|
//#region src/TabNavList/AddButton.vue?vue&type=script&setup=true&lang.ts
|
|
4
4
|
var _hoisted_1 = ["aria-label"];
|
|
5
|
-
var AddButton_vue_vue_type_script_setup_true_lang_default =
|
|
5
|
+
var AddButton_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
6
6
|
name: "AddButton",
|
|
7
7
|
inheritAttrs: false,
|
|
8
8
|
__name: "AddButton",
|
|
@@ -29,7 +29,7 @@ var AddButton_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defi
|
|
|
29
29
|
style: normalizeStyle(unref(style)),
|
|
30
30
|
"aria-label": unref(locale)?.addAriaLabel || "Add tab",
|
|
31
31
|
onClick: handleClick
|
|
32
|
-
}, [createVNode(unref(RenderComponent), { render: unref(editable).addIcon
|
|
32
|
+
}, [createVNode(unref(RenderComponent), { render: unref(isVueRenderable)(unref(editable).addIcon) ? unref(editable).addIcon : "+" }, null, 8, ["render"])], 14, _hoisted_1)) : createCommentVNode("", true);
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ExtraContentProps } from '../interface';
|
|
2
|
+
declare const __VLS_export: import('vue').DefineComponent<ExtraContentProps, {
|
|
3
|
+
extraContentRef: import('vue').Ref<HTMLDivElement | undefined, HTMLDivElement | undefined>;
|
|
4
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ExtraContentProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
5
|
+
declare const _default: typeof __VLS_export;
|
|
6
|
+
export default _default;
|
|
@@ -2,7 +2,7 @@ import { computed, createCommentVNode, createElementBlock, createVNode, defineCo
|
|
|
2
2
|
import RenderComponent from "@v-c/util/dist/RenderComponent";
|
|
3
3
|
import { ensureValidVNode } from "@v-c/util/dist/vnode";
|
|
4
4
|
//#region src/TabNavList/ExtraContent.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
-
var ExtraContent_vue_vue_type_script_setup_true_lang_default =
|
|
5
|
+
var ExtraContent_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
6
6
|
__name: "ExtraContent",
|
|
7
7
|
props: {
|
|
8
8
|
position: {},
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { MoreProps, OperationNodeProps } from '../interface';
|
|
2
|
+
declare const __VLS_export: import('vue').DefineComponent<OperationNodeProps, {
|
|
3
|
+
operationNodeRef: Readonly<import('vue').ShallowRef<HTMLDivElement | null>>;
|
|
4
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<OperationNodeProps> & Readonly<{}>, {
|
|
5
|
+
more: MoreProps;
|
|
6
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getRemovable } from "../utils.js";
|
|
2
2
|
import AddButton_default from "./AddButton.js";
|
|
3
3
|
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, h, mergeProps, normalizeClass, normalizeStyle, openBlock, ref, toRefs, unref, useTemplateRef, watch, withCtx } from "vue";
|
|
4
|
-
import { clsx } from "@v-c/util";
|
|
4
|
+
import { clsx, isVueRenderable } from "@v-c/util";
|
|
5
5
|
import RenderComponent$1 from "@v-c/util/dist/RenderComponent";
|
|
6
6
|
import DropDown from "@v-c/dropdown";
|
|
7
7
|
import Menu from "@v-c/menu";
|
|
@@ -12,7 +12,7 @@ var _hoisted_1 = [
|
|
|
12
12
|
"aria-controls",
|
|
13
13
|
"aria-expanded"
|
|
14
14
|
];
|
|
15
|
-
var OperationNode_vue_vue_type_script_setup_true_lang_default =
|
|
15
|
+
var OperationNode_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
16
16
|
__name: "OperationNode",
|
|
17
17
|
props: {
|
|
18
18
|
prefixCls: {},
|
|
@@ -87,7 +87,7 @@ var OperationNode_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
|
|
|
87
87
|
e.stopPropagation();
|
|
88
88
|
onRemoveTab(e, key);
|
|
89
89
|
}
|
|
90
|
-
}, [closeIcon
|
|
90
|
+
}, [isVueRenderable(closeIcon) ? closeIcon : isVueRenderable(editable.value?.removeIcon) ? editable.value.removeIcon : "×"]) : null] });
|
|
91
91
|
}) });
|
|
92
92
|
});
|
|
93
93
|
const overlayClassName = computed(() => {
|
|
@@ -97,6 +97,16 @@ var OperationNode_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
|
|
|
97
97
|
});
|
|
98
98
|
});
|
|
99
99
|
const moreIconNode = computed(() => moreProps.value?.icon || "More");
|
|
100
|
+
const overlayNode = computed(() => {
|
|
101
|
+
const popupRender = moreProps.value?.popupRender;
|
|
102
|
+
if (!popupRender) return menuNode.value;
|
|
103
|
+
return popupRender(menuNode.value, {
|
|
104
|
+
restTabs: props.tabs,
|
|
105
|
+
onClose: () => {
|
|
106
|
+
open.value = false;
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
});
|
|
100
110
|
const moreStyle = computed(() => {
|
|
101
111
|
const style = { marginInlineStart: tabBarGutter.value ? `${tabBarGutter.value}px` : "0px" };
|
|
102
112
|
if (!props.tabs.length) {
|
|
@@ -168,14 +178,14 @@ var OperationNode_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
|
|
|
168
178
|
}, [!unref(mobile) ? (openBlock(), createBlock(unref(DropDown), mergeProps({
|
|
169
179
|
key: 0,
|
|
170
180
|
"prefix-cls": dropdownPrefix.value,
|
|
171
|
-
overlay:
|
|
172
|
-
|
|
181
|
+
overlay: overlayNode.value,
|
|
182
|
+
open: __props.tabs.length ? open.value : false,
|
|
173
183
|
"overlay-class-name": overlayClassName.value,
|
|
174
184
|
"overlay-style": unref(popupStyle),
|
|
175
185
|
"mouse-enter-delay": .1,
|
|
176
186
|
"mouse-leave-delay": .1,
|
|
177
187
|
"get-popup-container": unref(getPopupContainer)
|
|
178
|
-
}, unref(moreProps), {
|
|
188
|
+
}, unref(moreProps), { onOpenChange: _cache[0] || (_cache[0] = ($event) => open.value = $event) }), {
|
|
179
189
|
default: withCtx(() => [createElementVNode("button", {
|
|
180
190
|
id: `${unref(id)}-more`,
|
|
181
191
|
type: "button",
|
|
@@ -190,7 +200,7 @@ var OperationNode_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
|
|
|
190
200
|
}, 16, [
|
|
191
201
|
"prefix-cls",
|
|
192
202
|
"overlay",
|
|
193
|
-
"
|
|
203
|
+
"open",
|
|
194
204
|
"overlay-class-name",
|
|
195
205
|
"overlay-style",
|
|
196
206
|
"get-popup-container"
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { TabNodeProps } from '../interface';
|
|
2
|
+
declare const __VLS_export: import('vue').DefineComponent<TabNodeProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<TabNodeProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
3
|
+
declare const _default: typeof __VLS_export;
|
|
4
|
+
export default _default;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { genDataNodeKey, getRemovable } from "../utils.js";
|
|
2
2
|
import { computed, createBlock, defineComponent, h, onMounted, openBlock, ref, toRefs, unref, watch } from "vue";
|
|
3
|
-
import
|
|
3
|
+
import { isVueRenderable } from "@v-c/util";
|
|
4
|
+
import RenderComponent$1 from "@v-c/util/dist/RenderComponent";
|
|
4
5
|
import { isEmptyElement } from "@v-c/util/dist/props-util";
|
|
5
6
|
//#region src/TabNavList/TabNode.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
-
var TabNode_vue_vue_type_script_setup_true_lang_default =
|
|
7
|
+
var TabNode_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
7
8
|
name: "TabNode",
|
|
8
9
|
inheritAttrs: false,
|
|
9
10
|
__name: "TabNode",
|
|
@@ -86,8 +87,8 @@ var TabNode_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
|
|
|
86
87
|
"aria-live": "polite",
|
|
87
88
|
"style": "width: 0; height: 0; position: absolute; overflow: hidden; opacity: 0;"
|
|
88
89
|
}, `Tab ${props.currentPosition} of ${props.tabCount}`));
|
|
89
|
-
if (tab.value.icon) btnChildren.push(h("span", { class: [`${tabPrefix.value}-icon`] }, [h(RenderComponent, { render: tab.value.icon })]));
|
|
90
|
-
if (tab.value.label) if (typeof tab.value.label === "string" && !isEmptyElement(tab.value.icon)) btnChildren.push(h("span", {}, tab.value.label));
|
|
90
|
+
if (isVueRenderable(tab.value.icon)) btnChildren.push(h("span", { class: [`${tabPrefix.value}-icon`] }, [h(RenderComponent$1, { render: tab.value.icon })]));
|
|
91
|
+
if (isVueRenderable(tab.value.label)) if (typeof tab.value.label === "string" && !isEmptyElement(tab.value.icon)) btnChildren.push(h("span", {}, tab.value.label));
|
|
91
92
|
else btnChildren.push(tab.value.label);
|
|
92
93
|
const children = [h("div", {
|
|
93
94
|
"id": tab.value.id && `${tab.value.id}-tab-${tab.value.key}`,
|
|
@@ -118,7 +119,7 @@ var TabNode_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
|
|
|
118
119
|
e.stopPropagation();
|
|
119
120
|
onRemove(e);
|
|
120
121
|
}
|
|
121
|
-
}, [h(RenderComponent, { render: tab.value.closeIcon
|
|
122
|
+
}, [h(RenderComponent$1, { render: isVueRenderable(tab.value.closeIcon) ? tab.value.closeIcon : isVueRenderable(editable.value?.removeIcon) ? editable.value.removeIcon : "×" })]));
|
|
122
123
|
return h("div", {
|
|
123
124
|
"key": tab.value.key,
|
|
124
125
|
"data-node-key": genDataNodeKey(tab.value.key),
|
|
@@ -129,7 +130,7 @@ var TabNode_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
|
|
|
129
130
|
});
|
|
130
131
|
const finalNode = computed(() => props.renderWrapper ? props.renderWrapper(node.value) : node.value);
|
|
131
132
|
return (_ctx, _cache) => {
|
|
132
|
-
return openBlock(), createBlock(unref(RenderComponent), { render: finalNode.value }, null, 8, ["render"]);
|
|
133
|
+
return openBlock(), createBlock(unref(RenderComponent$1), { render: finalNode.value }, null, 8, ["render"]);
|
|
133
134
|
};
|
|
134
135
|
}
|
|
135
136
|
});
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { TabNavListWrapperProps } from '../interface';
|
|
2
|
+
declare const __VLS_export: import('vue').DefineComponent<TabNavListWrapperProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<TabNavListWrapperProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
3
|
+
declare const _default: typeof __VLS_export;
|
|
4
|
+
export default _default;
|
|
@@ -2,7 +2,7 @@ import TabNavList_default from "./index.js";
|
|
|
2
2
|
import { computed, createBlock, defineComponent, h, openBlock, unref } from "vue";
|
|
3
3
|
import RenderComponent from "@v-c/util/dist/RenderComponent";
|
|
4
4
|
//#region src/TabNavList/Wrapper.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
-
var Wrapper_vue_vue_type_script_setup_true_lang_default =
|
|
5
|
+
var Wrapper_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
6
6
|
name: "TabNavListWrapper",
|
|
7
7
|
inheritAttrs: false,
|
|
8
8
|
__name: "Wrapper",
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { TabNavListProps } from '../interface';
|
|
2
|
+
declare const __VLS_export: import('vue').DefineComponent<TabNavListProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<TabNavListProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
3
|
+
declare const _default: typeof __VLS_export;
|
|
4
|
+
export default _default;
|
|
@@ -13,7 +13,7 @@ import RenderComponent from "@v-c/util/dist/RenderComponent";
|
|
|
13
13
|
import ResizeObserver from "@v-c/resize-observer";
|
|
14
14
|
//#region src/TabNavList/index.vue?vue&type=script&setup=true&lang.ts
|
|
15
15
|
var _hoisted_1 = ["aria-orientation"];
|
|
16
|
-
var index_vue_vue_type_script_setup_true_lang_default =
|
|
16
|
+
var index_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
17
17
|
name: "TabNavList",
|
|
18
18
|
inheritAttrs: false,
|
|
19
19
|
__name: "index",
|
|
@@ -211,7 +211,8 @@ var index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
211
211
|
const enabledKeys = getEnabledKeys(tabs.value);
|
|
212
212
|
const currentIndex = enabledKeys.indexOf(focusKey.value || activeKey.value);
|
|
213
213
|
const len = enabledKeys.length;
|
|
214
|
-
|
|
214
|
+
const nextIndex = (currentIndex + offset + len) % len;
|
|
215
|
+
focusKey.value = enabledKeys[nextIndex];
|
|
215
216
|
}
|
|
216
217
|
function handleRemoveTab(removalKey, e) {
|
|
217
218
|
if (!removalKey) return;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { TabPaneProps } from '../interface';
|
|
2
|
+
declare const __VLS_export: import('vue').DefineComponent<TabPaneProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<TabPaneProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
3
|
+
declare const _default: typeof __VLS_export;
|
|
4
|
+
export default _default;
|
|
@@ -8,7 +8,7 @@ var _hoisted_1 = [
|
|
|
8
8
|
"aria-labelledby",
|
|
9
9
|
"aria-hidden"
|
|
10
10
|
];
|
|
11
|
-
var TabPane_vue_vue_type_script_setup_true_lang_default =
|
|
11
|
+
var TabPane_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
12
12
|
name: "TabPane",
|
|
13
13
|
inheritAttrs: false,
|
|
14
14
|
__name: "TabPane",
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CSSProperties } from 'vue';
|
|
2
|
+
import { AnimatedConfig, TabPosition } from '../interface';
|
|
3
|
+
interface TabPanelListProps {
|
|
4
|
+
activeKey: string;
|
|
5
|
+
id: string | null;
|
|
6
|
+
animated?: AnimatedConfig;
|
|
7
|
+
tabPosition?: TabPosition;
|
|
8
|
+
destroyOnHidden?: boolean;
|
|
9
|
+
bodyStyle?: CSSProperties;
|
|
10
|
+
bodyClassName?: string;
|
|
11
|
+
contentStyle?: CSSProperties;
|
|
12
|
+
contentClassName?: string;
|
|
13
|
+
}
|
|
14
|
+
declare const __VLS_export: import('vue').DefineComponent<TabPanelListProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<TabPanelListProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
@@ -4,7 +4,7 @@ import { Fragment, Transition, computed, createBlock, createCommentVNode, create
|
|
|
4
4
|
import RenderComponent from "@v-c/util/dist/RenderComponent";
|
|
5
5
|
import { getTransitionProps } from "@v-c/util/dist/utils/transition";
|
|
6
6
|
//#region src/TabPanelList/index.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
var index_vue_vue_type_script_setup_true_lang_default =
|
|
7
|
+
var index_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
8
8
|
__name: "index",
|
|
9
9
|
props: {
|
|
10
10
|
activeKey: {},
|
|
@@ -67,11 +67,7 @@ var index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
67
67
|
...unref(contentStyle) || {},
|
|
68
68
|
...item.style || {}
|
|
69
69
|
}),
|
|
70
|
-
"class-name": [
|
|
71
|
-
unref(contentClassName),
|
|
72
|
-
item.className,
|
|
73
|
-
item.key !== unref(activeKey) && `${tabPanePrefixCls.value}-hidden`
|
|
74
|
-
]
|
|
70
|
+
"class-name": [unref(contentClassName), item.className]
|
|
75
71
|
}, {
|
|
76
72
|
default: withCtx(() => [createVNode(unref(RenderComponent), { render: item.children }, null, 8, ["render"])]),
|
|
77
73
|
_: 2
|
|
@@ -83,7 +79,7 @@ var index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
83
79
|
"active",
|
|
84
80
|
"style",
|
|
85
81
|
"class-name"
|
|
86
|
-
])), [[vShow, shouldDestroyOnHidden(item) ? true : item.key === unref(activeKey)
|
|
82
|
+
])), [[vShow, shouldDestroyOnHidden(item) ? true : item.key === unref(activeKey)]]) : createCommentVNode("", true)]),
|
|
87
83
|
_: 2
|
|
88
84
|
}, 1040)) : createCommentVNode("", true), !tabPaneAnimated.value && shouldRender(item) ? withDirectives((openBlock(), createBlock(TabPane_default, {
|
|
89
85
|
key: 1,
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TabsProps } from './interface';
|
|
2
|
+
declare const __VLS_export: import('vue').DefineComponent<TabsProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<TabsProps> & Readonly<{}>, {
|
|
3
|
+
prefixCls: string;
|
|
4
|
+
animated: boolean | import('./interface').AnimatedConfig;
|
|
5
|
+
destroyOnHidden: boolean;
|
|
6
|
+
tabPosition: import('./interface').TabPosition;
|
|
7
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
@@ -10,7 +10,7 @@ import isMobile from "@v-c/util/dist/isMobile";
|
|
|
10
10
|
import omit from "@v-c/util/dist/omit";
|
|
11
11
|
//#region src/Tabs.vue?vue&type=script&setup=true&lang.ts
|
|
12
12
|
var _hoisted_1 = ["id"];
|
|
13
|
-
var Tabs_vue_vue_type_script_setup_true_lang_default =
|
|
13
|
+
var Tabs_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
14
14
|
name: "Tabs",
|
|
15
15
|
__name: "Tabs",
|
|
16
16
|
props: {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TabPaneProps, TabsProps } from './interface';
|
|
2
2
|
import { default as Tabs } from './Tabs.vue';
|
|
3
3
|
export type { TabPaneProps, TabsProps };
|
|
4
|
-
export type { AnimatedConfig, EditableConfig, GetIndicatorSize, MoreProps, Tab } from './interface';
|
|
4
|
+
export type { AnimatedConfig, EditableConfig, GetIndicatorSize, MoreProps, PopupRender, Tab } from './interface';
|
|
5
5
|
export default Tabs;
|
package/dist/interface.d.ts
CHANGED
|
@@ -62,8 +62,13 @@ export interface Tab extends Omit<TabPaneProps, 'tab'> {
|
|
|
62
62
|
label: VueNode;
|
|
63
63
|
}
|
|
64
64
|
export type moreIcon = VueNode;
|
|
65
|
+
export type PopupRender = (menu: VueNode, info: {
|
|
66
|
+
restTabs: Tab[];
|
|
67
|
+
onClose: () => void;
|
|
68
|
+
}) => VueNode;
|
|
65
69
|
export type MoreProps = {
|
|
66
70
|
icon?: moreIcon;
|
|
71
|
+
popupRender?: PopupRender;
|
|
67
72
|
} & Omit<DropdownProps, 'children'>;
|
|
68
73
|
export interface OperationNodeProps {
|
|
69
74
|
prefixCls: string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@v-c/tabs",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.3.1",
|
|
5
5
|
"description": "tabs ui component for react",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
"vue": "^3.0.0"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@v-c/dropdown": "^1.0
|
|
41
|
-
"@v-c/menu": "^1.
|
|
42
|
-
"@v-c/
|
|
43
|
-
"@v-c/
|
|
44
|
-
"@v-c/overflow": "^1.1.
|
|
40
|
+
"@v-c/dropdown": "^1.1.0",
|
|
41
|
+
"@v-c/menu": "^1.4.0",
|
|
42
|
+
"@v-c/util": "^1.2.0",
|
|
43
|
+
"@v-c/resize-observer": "^1.1.3",
|
|
44
|
+
"@v-c/overflow": "^1.1.2"
|
|
45
45
|
},
|
|
46
46
|
"scripts": {
|
|
47
47
|
"build": "vite build",
|