mirror of
				https://github.com/pure-admin/vue-pure-admin.git
				synced 2025-11-03 13:44:47 +08:00 
			
		
		
		
	refactor: tabs
This commit is contained in:
		
							parent
							
								
									d79e63f673
								
							
						
					
					
						commit
						aca6a667f3
					
				@ -3,6 +3,7 @@
 | 
			
		||||
  "Title": "PureAdmin",
 | 
			
		||||
  "FixedHeader": true,
 | 
			
		||||
  "HiddenSideBar": false,
 | 
			
		||||
  "MultiTabsCache": false,
 | 
			
		||||
  "KeepAlive": true,
 | 
			
		||||
  "Locale": "zh",
 | 
			
		||||
  "Layout": "vertical",
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										20
									
								
								src/store/modules/multiTabs.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								src/store/modules/multiTabs.ts
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,20 @@
 | 
			
		||||
import { defineStore } from "pinia";
 | 
			
		||||
import { store } from "/@/store";
 | 
			
		||||
import { getConfig } from "/@/config";
 | 
			
		||||
 | 
			
		||||
export const useMultiTabsStore = defineStore({
 | 
			
		||||
  id: "pure-multiTabs",
 | 
			
		||||
  state: () => ({
 | 
			
		||||
    multiTabsCache: getConfig().MultiTabsCache
 | 
			
		||||
  }),
 | 
			
		||||
  getters: {
 | 
			
		||||
    getMultiTabsCache() {
 | 
			
		||||
      return this.multiTabsCache;
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  actions: {}
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
export function useMultiTabsStoreHook() {
 | 
			
		||||
  return useMultiTabsStore(store);
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										1
									
								
								types/global.d.ts
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								types/global.d.ts
									
									
									
									
										vendored
									
									
								
							@ -87,6 +87,7 @@ declare global {
 | 
			
		||||
    Title?: string;
 | 
			
		||||
    FixedHeader?: boolean;
 | 
			
		||||
    HiddenSideBar?: boolean;
 | 
			
		||||
    MultiTabsCache?: boolean;
 | 
			
		||||
    KeepAlive?: boolean;
 | 
			
		||||
    Locale?: string;
 | 
			
		||||
    Layout?: string;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user