feat: app功能基本实现
This commit is contained in:
@@ -49,7 +49,6 @@ const containerDom = ref();
|
||||
const scrollbarDom = ref();
|
||||
const isShowArrow = ref(false);
|
||||
const topPath = getTopMenu()?.path;
|
||||
const { VITE_HIDE_HOME } = import.meta.env;
|
||||
const { isFullscreen, toggle } = useFullscreen();
|
||||
|
||||
const dynamicTagView = async () => {
|
||||
@@ -188,10 +187,7 @@ function deleteDynamicTag(obj: any, current: any, tag?: string) {
|
||||
other?: boolean
|
||||
): void => {
|
||||
if (other) {
|
||||
useMultiTagsStoreHook().handleTags("equal", [
|
||||
VITE_HIDE_HOME === "false" ? routerArrays[0] : toRaw(getTopMenu()),
|
||||
obj
|
||||
]);
|
||||
useMultiTagsStoreHook().handleTags("equal", getPinnedTags(obj));
|
||||
} else {
|
||||
useMultiTagsStoreHook().handleTags("splice", "", {
|
||||
startIndex,
|
||||
@@ -235,6 +231,11 @@ function deleteDynamicTag(obj: any, current: any, tag?: string) {
|
||||
}
|
||||
}
|
||||
|
||||
function getPinnedTags(obj: RouteConfigs) {
|
||||
const pinnedTag = routerArrays[0] ?? toRaw(getTopMenu());
|
||||
return pinnedTag ? [pinnedTag, obj] : [obj];
|
||||
}
|
||||
|
||||
function deleteMenu(item, tag?: string) {
|
||||
deleteDynamicTag(item, item.path, tag);
|
||||
handleAliveRoute(route as ToRouteType);
|
||||
|
||||
Reference in New Issue
Block a user