关闭tab
This commit is contained in:
parent
66b8ad0ca6
commit
b4d43d7d4b
@ -82,6 +82,7 @@
|
||||
import { computed, ref, watch, inject } from 'vue';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { storage } from '@/utils/Storage';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { RouteItem } from '@/store/modules/tabsView';
|
||||
import { TABS_ROUTES,FIRST_ROUTE } from '@/store/mutation-types';
|
||||
import { useGo, useRedo } from '@/hooks/web/usePage';
|
||||
@ -224,6 +225,9 @@
|
||||
|
||||
// 关闭当前页面
|
||||
function removeTab(route) {
|
||||
if (tabsList.value.length === 1) {
|
||||
return message.warning('这已经是最后一页,不能再关闭了!');
|
||||
}
|
||||
tabsViewStore.closeCurrentTab(route);
|
||||
// 如果关闭的是当前页
|
||||
if (activeKey.value === route.value.fullPath) {
|
||||
|
Loading…
Reference in New Issue
Block a user