fix(projects): fix the incorrect judgment of home by pin tab.

(cherry picked from commit 62a43c39575d978cb86be93fcbff38493a3ffedc)
This commit is contained in:
Azir-11
2025-12-04 16:03:02 +08:00
committed by 姜永春
parent 77e9ed7450
commit 0943818fec

View File

@ -26,7 +26,7 @@ const props = withDefaults(defineProps<Props>(), {
const visible = defineModel<boolean>('visible');
const { removeTab, clearTabs, clearLeftTabs, clearRightTabs, fixTab, unfixTab, isTabRetain } = useTabStore();
const { removeTab, clearTabs, clearLeftTabs, clearRightTabs, fixTab, unfixTab, isTabRetain, homeTab } = useTabStore();
const { SvgIconVNode } = useSvgIcon();
type DropdownOption = {
@ -65,7 +65,7 @@ const options = computed(() => {
}
];
if (props.tabId !== '/home') {
if (props.tabId !== homeTab?.id) {
if (isTabRetain(props.tabId)) {
opts.push({
key: 'unpin',