mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-12-06 00:06:01 +08:00
fix(projects): fix the incorrect judgment of home by pin tab.
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -361,6 +361,7 @@ export const useTabStore = defineStore(SetupStoreId.Tab, () => {
|
||||
/** All tabs */
|
||||
tabs: allTabs,
|
||||
activeTabId,
|
||||
homeTab,
|
||||
initHomeTab,
|
||||
initTabStore,
|
||||
addTab,
|
||||
|
||||
Reference in New Issue
Block a user