fix(projects): fix the incorrect judgment of home by pin tab.
(cherry picked from commit 62a43c39575d978cb86be93fcbff38493a3ffedc)
This commit is contained in:
@ -26,7 +26,7 @@ const props = withDefaults(defineProps<Props>(), {
|
|||||||
|
|
||||||
const visible = defineModel<boolean>('visible');
|
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();
|
const { SvgIconVNode } = useSvgIcon();
|
||||||
|
|
||||||
type DropdownOption = {
|
type DropdownOption = {
|
||||||
@ -65,7 +65,7 @@ const options = computed(() => {
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
if (props.tabId !== '/home') {
|
if (props.tabId !== homeTab?.id) {
|
||||||
if (isTabRetain(props.tabId)) {
|
if (isTabRetain(props.tabId)) {
|
||||||
opts.push({
|
opts.push({
|
||||||
key: 'unpin',
|
key: 'unpin',
|
||||||
|
|||||||
Reference in New Issue
Block a user