Template
1
0
mirror of https://github.com/un-pany/v3-admin-vite.git synced 2025-04-21 11:29:20 +08:00

perf: 新版 vue 已修复热更新导致的页面白屏问题,项目移除相关的代码

This commit is contained in:
pany 2024-02-06 17:07:07 +08:00
parent 0f1afe1a94
commit 8c7f4184a1
3 changed files with 0 additions and 23 deletions

View File

@ -5,7 +5,6 @@ import { ElMessage } from "element-plus"
import { setRouteChange } from "@/hooks/useRouteListener"
import { useTitle } from "@/hooks/useTitle"
import { getToken } from "@/utils/cache/cookies"
import { fixBlankPage } from "@/utils/fix-blank-page"
import routeSettings from "@/config/route"
import isWhiteList from "@/config/white-list"
import NProgress from "nprogress"
@ -15,7 +14,6 @@ const { setTitle } = useTitle()
NProgress.configure({ showSpinner: false })
router.beforeEach(async (to, _from, next) => {
fixBlankPage()
NProgress.start()
const userStore = useUserStoreHook()
const permissionStore = usePermissionStoreHook()

View File

@ -1,5 +1,4 @@
import { ref, watchEffect } from "vue"
import store from "@/store"
import { defineStore } from "pinia"
import { useSettingsStore } from "./settings"
import { type RouteLocationNormalized } from "vue-router"
@ -94,8 +93,3 @@ export const useTagsViewStore = defineStore("tags-view", () => {
delAllCachedViews
}
})
/** 在 setup 外使用 */
export function useTagsViewStoreHook() {
return useTagsViewStore(store)
}

View File

@ -1,15 +0,0 @@
import { useTagsViewStoreHook } from "@/store/modules/tags-view"
/**
* <transition> <keep-alive> 使
* Vue BUGhttps://github.com/vuejs/core/issues/7121
* 使
* 1.
* 2. TS
* 3.
* 4.
*/
export const fixBlankPage = () => {
const tagsViewStore = useTagsViewStoreHook()
tagsViewStore.cachedViews = [...tagsViewStore.cachedViews]
}