@v-c/tabs 1.2.0 → 1.2.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.
|
@@ -12,11 +12,13 @@ var index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
12
12
|
animated: {},
|
|
13
13
|
tabPosition: {},
|
|
14
14
|
destroyOnHidden: { type: Boolean },
|
|
15
|
+
bodyStyle: {},
|
|
16
|
+
bodyClassName: {},
|
|
15
17
|
contentStyle: {},
|
|
16
18
|
contentClassName: {}
|
|
17
19
|
},
|
|
18
20
|
setup(__props) {
|
|
19
|
-
const { id, activeKey, animated, tabPosition, destroyOnHidden, contentStyle, contentClassName } = toRefs(__props);
|
|
21
|
+
const { id, activeKey, animated, tabPosition, destroyOnHidden, bodyStyle, bodyClassName, contentStyle, contentClassName } = toRefs(__props);
|
|
20
22
|
const ctx = useTabContext();
|
|
21
23
|
const tabs = computed(() => ctx?.value.tabs || []);
|
|
22
24
|
const prefixCls = computed(() => ctx?.value.prefixCls || "");
|
|
@@ -41,11 +43,15 @@ var index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
41
43
|
return visitedKeys.has(item.key);
|
|
42
44
|
}
|
|
43
45
|
return (_ctx, _cache) => {
|
|
44
|
-
return openBlock(), createElementBlock("div", { class: normalizeClass([`${prefixCls.value}-body-holder`]) }, [createElementVNode("div", {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
return openBlock(), createElementBlock("div", { class: normalizeClass([`${prefixCls.value}-body-holder`]) }, [createElementVNode("div", {
|
|
47
|
+
class: normalizeClass([
|
|
48
|
+
`${prefixCls.value}-body`,
|
|
49
|
+
`${prefixCls.value}-body-${unref(tabPosition)}`,
|
|
50
|
+
{ [`${prefixCls.value}-body-animated`]: tabPaneAnimated.value },
|
|
51
|
+
unref(bodyClassName)
|
|
52
|
+
]),
|
|
53
|
+
style: normalizeStyle(unref(bodyStyle))
|
|
54
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(tabs.value, (item) => {
|
|
49
55
|
return openBlock(), createElementBlock(Fragment, { key: item.key }, [tabPaneAnimated.value ? (openBlock(), createBlock(Transition, mergeProps({
|
|
50
56
|
key: 0,
|
|
51
57
|
ref_for: true
|
|
@@ -107,7 +113,7 @@ var index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
107
113
|
"style",
|
|
108
114
|
"class-name"
|
|
109
115
|
])), [[vShow, shouldDestroyOnHidden(item) ? true : item.key === unref(activeKey) || item.forceRender]]) : createCommentVNode("", true)], 64);
|
|
110
|
-
}), 128))],
|
|
116
|
+
}), 128))], 6)], 2);
|
|
111
117
|
};
|
|
112
118
|
}
|
|
113
119
|
});
|
|
@@ -175,11 +175,15 @@ var Tabs_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCom
|
|
|
175
175
|
unref(className)
|
|
176
176
|
]
|
|
177
177
|
}, restProps.value), [createVNode(Wrapper_default, mergeProps(tabNavBarProps.value, { "render-tab-bar": unref(renderTabBar) }), null, 16, ["render-tab-bar"]), createVNode(TabPanelList_default, mergeProps({ "destroy-on-hidden": unref(destroyOnHidden) }, sharedProps.value, {
|
|
178
|
+
"body-style": unref(styles)?.body,
|
|
179
|
+
"body-class-name": unref(tabsClassNames)?.body,
|
|
178
180
|
"content-style": unref(styles)?.content,
|
|
179
181
|
"content-class-name": unref(tabsClassNames)?.content,
|
|
180
182
|
animated: mergedAnimated.value
|
|
181
183
|
}), null, 16, [
|
|
182
184
|
"destroy-on-hidden",
|
|
185
|
+
"body-style",
|
|
186
|
+
"body-class-name",
|
|
183
187
|
"content-style",
|
|
184
188
|
"content-class-name",
|
|
185
189
|
"animated"
|
package/dist/interface.d.ts
CHANGED
|
@@ -114,7 +114,7 @@ export interface TabNodeProps {
|
|
|
114
114
|
}
|
|
115
115
|
export type TabPosition = 'left' | 'right' | 'top' | 'bottom';
|
|
116
116
|
export type GetIndicatorSize = number | ((origin: number) => number);
|
|
117
|
-
export type SemanticName = 'popup' | 'item' | 'indicator' | 'content' | 'header' | 'remove';
|
|
117
|
+
export type SemanticName = 'popup' | 'item' | 'indicator' | 'body' | 'content' | 'header' | 'remove';
|
|
118
118
|
export type RenderTabBar = (props: Record<string, any>, TabNavListComponent: any) => VueNode;
|
|
119
119
|
export interface IndicatorConfig {
|
|
120
120
|
size?: GetIndicatorSize;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@v-c/tabs",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.1",
|
|
5
5
|
"description": "tabs ui component for react",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@v-c/dropdown": "^1.0.2",
|
|
41
41
|
"@v-c/menu": "^1.2.1",
|
|
42
|
-
"@v-c/overflow": "^1.1.0",
|
|
43
42
|
"@v-c/resize-observer": "^1.1.2",
|
|
44
|
-
"@v-c/util": "^1.0.19"
|
|
43
|
+
"@v-c/util": "^1.0.19",
|
|
44
|
+
"@v-c/overflow": "^1.1.0"
|
|
45
45
|
},
|
|
46
46
|
"scripts": {
|
|
47
47
|
"build": "vite build",
|