mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-25 05:09:19 +08:00
feat: 菜单侧栏标题与标签标题拆分并支持 tab_title 回退
This commit is contained in:
@@ -41,7 +41,8 @@ const style = computed(() => {
|
||||
const tabsView = computed(() => {
|
||||
return props.tabs.map((tab) => {
|
||||
const { fullPath, meta, name, path, key } = tab || {};
|
||||
const { affixTab, icon, newTabTitle, tabClosable, title } = meta || {};
|
||||
const { affixTab, icon, newTabTitle, tabClosable, tabTitle, title } =
|
||||
meta || {};
|
||||
return {
|
||||
affixTab: !!affixTab,
|
||||
closable: Reflect.has(meta, 'tabClosable') ? !!tabClosable : true,
|
||||
@@ -51,7 +52,8 @@ const tabsView = computed(() => {
|
||||
meta,
|
||||
name,
|
||||
path,
|
||||
title: (newTabTitle || title || name) as string,
|
||||
// 运行时覆盖 > 配置 tabTitle > 侧栏 title
|
||||
title: (newTabTitle || tabTitle || title || name) as string,
|
||||
} as TabConfig;
|
||||
});
|
||||
});
|
||||
|
||||
@@ -48,7 +48,8 @@ const typeWithClass = computed(() => {
|
||||
const tabsView = computed(() => {
|
||||
return props.tabs.map((tab) => {
|
||||
const { fullPath, meta, name, path, key } = tab || {};
|
||||
const { affixTab, icon, newTabTitle, tabClosable, title } = meta || {};
|
||||
const { affixTab, icon, newTabTitle, tabClosable, tabTitle, title } =
|
||||
meta || {};
|
||||
return {
|
||||
affixTab: !!affixTab,
|
||||
closable: Reflect.has(meta, 'tabClosable') ? !!tabClosable : true,
|
||||
@@ -58,7 +59,8 @@ const tabsView = computed(() => {
|
||||
meta,
|
||||
name,
|
||||
path,
|
||||
title: (newTabTitle || title || name) as string,
|
||||
// 运行时覆盖 > 配置 tabTitle > 侧栏 title
|
||||
title: (newTabTitle || tabTitle || title || name) as string,
|
||||
} as TabConfig;
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user