mirror of
				https://github.com/pure-admin/vue-pure-admin.git
				synced 2025-11-03 13:44:47 +08:00 
			
		
		
		
	fix: 修复升级到V4.4.0版本后,页面开启keepAlive缓存后第一次加载并未缓存页面的问题
				
					
				
			This commit is contained in:
		
							parent
							
								
									2a8cd7affe
								
							
						
					
					
						commit
						2a2a3ee478
					
				@ -2,8 +2,8 @@ import { defineStore } from "pinia";
 | 
				
			|||||||
import { store } from "@/store";
 | 
					import { store } from "@/store";
 | 
				
			||||||
import { cacheType } from "./types";
 | 
					import { cacheType } from "./types";
 | 
				
			||||||
import { constantMenus } from "@/router";
 | 
					import { constantMenus } from "@/router";
 | 
				
			||||||
import { getKeyList } from "@pureadmin/utils";
 | 
					 | 
				
			||||||
import { useMultiTagsStoreHook } from "./multiTags";
 | 
					import { useMultiTagsStoreHook } from "./multiTags";
 | 
				
			||||||
 | 
					import { debounce, getKeyList } from "@pureadmin/utils";
 | 
				
			||||||
import { ascending, filterTree, filterNoPermissionTree } from "@/router/utils";
 | 
					import { ascending, filterTree, filterNoPermissionTree } from "@/router/utils";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const usePermissionStore = defineStore({
 | 
					export const usePermissionStore = defineStore({
 | 
				
			||||||
@ -37,7 +37,7 @@ export const usePermissionStore = defineStore({
 | 
				
			|||||||
          break;
 | 
					          break;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      /** 监听缓存页面是否存在于标签页,不存在则删除 */
 | 
					      /** 监听缓存页面是否存在于标签页,不存在则删除 */
 | 
				
			||||||
      (() => {
 | 
					      debounce(() => {
 | 
				
			||||||
        let cacheLength = this.cachePageList.length;
 | 
					        let cacheLength = this.cachePageList.length;
 | 
				
			||||||
        const nameList = getKeyList(useMultiTagsStoreHook().multiTags, "name");
 | 
					        const nameList = getKeyList(useMultiTagsStoreHook().multiTags, "name");
 | 
				
			||||||
        while (cacheLength > 0) {
 | 
					        while (cacheLength > 0) {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user