diff --git a/src/layout/components/lay-tag/index.vue b/src/layout/components/lay-tag/index.vue
index 373ceea44..87f234fda 100644
--- a/src/layout/components/lay-tag/index.vue
+++ b/src/layout/components/lay-tag/index.vue
@@ -37,6 +37,7 @@ const {
buttonLeft,
showModel,
translateX,
+ isFixedTag,
pureSetting,
activeIndex,
getTabStyle,
@@ -578,7 +579,7 @@ onBeforeUnmount(() => {
'scroll-item is-closable',
linkIsActive(item),
showModel === 'chrome' && 'chrome-item',
- !isAllEmpty(item?.meta?.fixedTag) && 'fixed-tag'
+ isFixedTag(item) && 'fixed-tag'
]"
@contextmenu.prevent="openMenu(item, $event)"
@mouseenter.prevent="onMouseenter(index)"
@@ -593,10 +594,10 @@ onBeforeUnmount(() => {
{
{{ transformI18n(item.meta.title) }}
diff --git a/src/layout/hooks/useTag.ts b/src/layout/hooks/useTag.ts
index e82e36ff6..aff70f1cd 100644
--- a/src/layout/hooks/useTag.ts
+++ b/src/layout/hooks/useTag.ts
@@ -125,6 +125,12 @@ export function useTags() {
}
}
+ const isFixedTag = computed(() => {
+ return item => {
+ return isBoolean(item?.meta?.fixedTag) && item?.meta?.fixedTag === true;
+ };
+ });
+
const iconIsActive = computed(() => {
return (item, index) => {
if (index === 0) return;
@@ -221,6 +227,7 @@ export function useTags() {
buttonTop,
buttonLeft,
translateX,
+ isFixedTag,
pureSetting,
activeIndex,
getTabStyle,