refactor(projects)!: refactor route cache & support reset route cache strategy

This commit is contained in:
Soybean
2024-10-25 00:54:17 +08:00
parent 4b3ac11bd5
commit b667eab76a
11 changed files with 76 additions and 65 deletions

View File

@ -20,6 +20,8 @@ declare namespace App {
otherColor: OtherColor;
/** Whether info color is followed by the primary color */
isInfoFollowPrimary: boolean;
/** Reset cache strategy */
resetCacheStrategy?: UnionKey.ResetCacheStrategy;
/** Layout */
layout: {
/** Layout mode */
@ -388,6 +390,7 @@ declare namespace App {
};
themeDrawerTitle: string;
pageFunTitle: string;
resetCacheStrategy: { title: string } & Record<UnionKey.ResetCacheStrategy, string>;
configOperation: {
copyConfig: string;
copySuccessMsg: string;

View File

@ -14,6 +14,14 @@ declare namespace UnionKey {
/** Theme scheme */
type ThemeScheme = 'light' | 'dark' | 'auto';
/**
* Reset cache strategy
*
* - close: re-cache when close page
* - refresh: re-cache when refresh page
*/
type ResetCacheStrategy = 'close' | 'refresh';
/**
* The layout mode
*