@minilo/utils 0.0.4 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/dist/config/config.d.ts +3 -3
  2. package/dist/config/config.js +20 -20
  3. package/dist/config/guider.d.ts +51 -67
  4. package/dist/config/guider.js +55 -52
  5. package/dist/config/index.d.ts +6 -6
  6. package/dist/config/index.js +6 -6
  7. package/dist/config/storageManager.d.ts +41 -41
  8. package/dist/config/storageManager.js +100 -92
  9. package/dist/config/types.d.ts +18 -18
  10. package/dist/config/types.js +2 -2
  11. package/dist/config/updateCssVariables.d.ts +11 -14
  12. package/dist/config/updateCssVariables.js +77 -79
  13. package/dist/constrant/index.d.ts +5 -5
  14. package/dist/constrant/index.js +11 -11
  15. package/dist/func/color.d.ts +5 -5
  16. package/dist/func/color.js +10 -10
  17. package/dist/func/common.d.ts +8 -15
  18. package/dist/func/common.js +58 -54
  19. package/dist/func/index.d.ts +4 -4
  20. package/dist/func/index.js +4 -4
  21. package/dist/func/merge.d.ts +2 -2
  22. package/dist/func/merge.js +2 -2
  23. package/dist/hooks/helper.d.ts +6 -0
  24. package/dist/hooks/helper.d.ts.map +1 -0
  25. package/dist/hooks/helper.js +45 -0
  26. package/dist/hooks/helper.js.map +1 -0
  27. package/dist/hooks/index.d.ts +4 -4
  28. package/dist/hooks/index.d.ts.map +1 -1
  29. package/dist/hooks/index.js +4 -4
  30. package/dist/hooks/index.js.map +1 -1
  31. package/dist/hooks/useChartResize.d.ts +20 -0
  32. package/dist/hooks/useChartResize.d.ts.map +1 -0
  33. package/dist/hooks/useChartResize.js +67 -0
  34. package/dist/hooks/useChartResize.js.map +1 -0
  35. package/dist/hooks/useCountDown.d.ts +9 -0
  36. package/dist/hooks/useCountDown.d.ts.map +1 -0
  37. package/dist/hooks/useCountDown.js +42 -0
  38. package/dist/hooks/useCountDown.js.map +1 -0
  39. package/dist/hooks/useFormAutoSave.d.ts +2 -0
  40. package/dist/hooks/useFormAutoSave.d.ts.map +1 -0
  41. package/dist/hooks/useFormAutoSave.js +73 -0
  42. package/dist/hooks/useFormAutoSave.js.map +1 -0
  43. package/dist/hooks/useRouteCache.d.ts +2 -0
  44. package/dist/hooks/useRouteCache.d.ts.map +1 -0
  45. package/dist/hooks/useRouteCache.js +92 -0
  46. package/dist/hooks/useRouteCache.js.map +1 -0
  47. package/dist/hooks/useScroll.d.ts +15 -0
  48. package/dist/hooks/useScroll.d.ts.map +1 -0
  49. package/dist/hooks/useScroll.js +71 -0
  50. package/dist/hooks/useScroll.js.map +1 -0
  51. package/dist/hooks/useUpload.d.ts +17 -0
  52. package/dist/hooks/useUpload.d.ts.map +1 -0
  53. package/dist/hooks/useUpload.js +87 -0
  54. package/dist/hooks/useUpload.js.map +1 -0
  55. package/dist/index.d.ts +6 -6
  56. package/dist/index.js +6 -6
  57. package/dist/request/index.d.ts +34 -16
  58. package/dist/request/index.d.ts.map +1 -1
  59. package/dist/request/index.js +131 -132
  60. package/dist/request/index.js.map +1 -1
  61. package/dist/tsconfig.tsbuildinfo +1 -1
  62. package/package.json +8 -3
  63. package/dist/hooks/useButtonPermission.d.ts +0 -9
  64. package/dist/hooks/useButtonPermission.d.ts.map +0 -1
  65. package/dist/hooks/useButtonPermission.js +0 -38
  66. package/dist/hooks/useButtonPermission.js.map +0 -1
  67. package/dist/hooks/useGuider.d.ts +0 -2
  68. package/dist/hooks/useGuider.d.ts.map +0 -1
  69. package/dist/hooks/useGuider.js +0 -5
  70. package/dist/hooks/useGuider.js.map +0 -1
  71. package/dist/hooks/useInitGlobalStyle.d.ts +0 -2
  72. package/dist/hooks/useInitGlobalStyle.d.ts.map +0 -1
  73. package/dist/hooks/useInitGlobalStyle.js +0 -80
  74. package/dist/hooks/useInitGlobalStyle.js.map +0 -1
@@ -1,3 +1,3 @@
1
- import type { Config } from './types'
2
- export declare const config: Config
3
- //# sourceMappingURL=config.d.ts.map
1
+ import type { Config } from './types';
2
+ export declare const config: Config;
3
+ //# sourceMappingURL=config.d.ts.map
@@ -1,21 +1,21 @@
1
1
  export const config = {
2
- theme: {
3
- colorDestructive: 'hsl(348 100% 61%)',
4
- colorPrimary: 'hsl(212 100% 45%)',
5
- colorSuccess: 'hsl(144 57% 58%)',
6
- colorWarning: 'hsl(42 84% 61%)'
7
- },
8
- sidebar: {
9
- collapse: false
10
- },
11
- app: {
12
- locale: 'zh-CN',
13
- name: 'Minilo Adminss',
14
- logo: '',
15
- defaultHomePath: '/'
16
- },
17
- transition: {
18
- progress: true
19
- }
20
- }
21
- //# sourceMappingURL=config.js.map
2
+ theme: {
3
+ colorDestructive: 'hsl(348 100% 61%)',
4
+ colorPrimary: 'hsl(212 100% 45%)',
5
+ colorSuccess: 'hsl(144 57% 58%)',
6
+ colorWarning: 'hsl(42 84% 61%)'
7
+ },
8
+ sidebar: {
9
+ collapse: false
10
+ },
11
+ app: {
12
+ locale: 'zh-CN',
13
+ name: 'Minilo Adminss',
14
+ logo: '',
15
+ defaultHomePath: '/'
16
+ },
17
+ transition: {
18
+ progress: true
19
+ }
20
+ };
21
+ //# sourceMappingURL=config.js.map
@@ -1,70 +1,54 @@
1
- import type { Config, InitialOptions } from './types'
1
+ import type { Config, InitialOptions } from './types';
2
2
  declare class Guider {
3
- private cache
4
- private isInitialized
5
- private state
6
- constructor()
7
- initConfig({ config, namespace }: InitialOptions): void
8
- updateConfig(config?: Partial<Config>): void
9
- saveConfig(config: Config): void
10
- private loadConfig
11
- getConfig(): {
12
- readonly app?:
13
- | {
14
- readonly locale?: string | undefined
15
- readonly name?: string | undefined
16
- readonly defaultHomePath?: string | undefined
17
- readonly logo?: string | undefined
18
- }
19
- | undefined
20
- readonly theme?:
21
- | {
22
- readonly colorDestructive?: string | undefined
23
- readonly colorPrimary?: string | undefined
24
- readonly colorSuccess?: string | undefined
25
- readonly colorWarning?: string | undefined
26
- }
27
- | undefined
28
- readonly sidebar?:
29
- | {
30
- readonly collapse: boolean
31
- }
32
- | undefined
33
- readonly transition?:
34
- | {
35
- readonly progress: boolean
36
- }
37
- | undefined
38
- }
3
+ private cache;
4
+ private isInitialized;
5
+ private state;
6
+ constructor();
7
+ initConfig({ config, namespace }: InitialOptions): void;
8
+ updateConfig(config?: Partial<Config>): void;
9
+ saveConfig(config: Config): void;
10
+ private loadConfig;
11
+ getConfig(): {
12
+ readonly app?: {
13
+ readonly locale?: string | undefined;
14
+ readonly name?: string | undefined;
15
+ readonly defaultHomePath?: string | undefined;
16
+ readonly logo?: string | undefined;
17
+ } | undefined;
18
+ readonly theme?: {
19
+ readonly colorDestructive?: string | undefined;
20
+ readonly colorPrimary?: string | undefined;
21
+ readonly colorSuccess?: string | undefined;
22
+ readonly colorWarning?: string | undefined;
23
+ } | undefined;
24
+ readonly sidebar?: {
25
+ readonly collapse: boolean;
26
+ } | undefined;
27
+ readonly transition?: {
28
+ readonly progress: boolean;
29
+ } | undefined;
30
+ };
39
31
  }
40
- declare const guider: Guider
32
+ declare const guider: Guider;
41
33
  declare const userConfig: {
42
- readonly app?:
43
- | {
44
- readonly locale?: string | undefined
45
- readonly name?: string | undefined
46
- readonly defaultHomePath?: string | undefined
47
- readonly logo?: string | undefined
48
- }
49
- | undefined
50
- readonly theme?:
51
- | {
52
- readonly colorDestructive?: string | undefined
53
- readonly colorPrimary?: string | undefined
54
- readonly colorSuccess?: string | undefined
55
- readonly colorWarning?: string | undefined
56
- }
57
- | undefined
58
- readonly sidebar?:
59
- | {
60
- readonly collapse: boolean
61
- }
62
- | undefined
63
- readonly transition?:
64
- | {
65
- readonly progress: boolean
66
- }
67
- | undefined
68
- }
69
- export { Guider, userConfig, guider }
70
- //# sourceMappingURL=guider.d.ts.map
34
+ readonly app?: {
35
+ readonly locale?: string | undefined;
36
+ readonly name?: string | undefined;
37
+ readonly defaultHomePath?: string | undefined;
38
+ readonly logo?: string | undefined;
39
+ } | undefined;
40
+ readonly theme?: {
41
+ readonly colorDestructive?: string | undefined;
42
+ readonly colorPrimary?: string | undefined;
43
+ readonly colorSuccess?: string | undefined;
44
+ readonly colorWarning?: string | undefined;
45
+ } | undefined;
46
+ readonly sidebar?: {
47
+ readonly collapse: boolean;
48
+ } | undefined;
49
+ readonly transition?: {
50
+ readonly progress: boolean;
51
+ } | undefined;
52
+ };
53
+ export { Guider, userConfig, guider };
54
+ //# sourceMappingURL=guider.d.ts.map
@@ -1,57 +1,60 @@
1
- import { markRaw, reactive, readonly } from 'vue'
2
- import { StorageManager } from './storageManager'
3
- import { config as defaultConfig } from './config'
4
- import { merge } from '../func'
5
- import { updateCSSVariables } from './updateCssVariables'
6
- const STORAGE_KEY = 'config'
1
+ import { markRaw, reactive, readonly } from 'vue';
2
+ import { StorageManager } from './storageManager';
3
+ import { config as defaultConfig } from './config';
4
+ import { merge } from '../func';
5
+ import { updateCSSVariables } from './updateCssVariables';
6
+ const STORAGE_KEY = 'config';
7
7
  // 用户配置引导类
8
8
  class Guider {
9
- constructor() {
10
- this.isInitialized = false
11
- this.state = reactive({
12
- ...this.loadConfig()
13
- })
14
- // SSR 兼容性检查:仅在浏览器中创建 StorageManager
15
- if (typeof window !== 'undefined') {
16
- this.cache = new StorageManager()
17
- } else {
18
- this.cache = null
9
+ constructor() {
10
+ this.isInitialized = false;
11
+ this.state = reactive({
12
+ ...this.loadConfig()
13
+ });
14
+ // SSR 兼容性检查:仅在浏览器中创建 StorageManager
15
+ if (typeof window !== 'undefined') {
16
+ this.cache = new StorageManager();
17
+ }
18
+ else {
19
+ this.cache = null;
20
+ }
19
21
  }
20
- }
21
- // 初始化配置
22
- initConfig({ config, namespace }) {
23
- if (this.isInitialized) {
24
- return
22
+ // 初始化配置
23
+ initConfig({ config, namespace }) {
24
+ if (this.isInitialized) {
25
+ return;
26
+ }
27
+ this.cache = new StorageManager({ prefix: namespace });
28
+ const mergeDefaultConfig = merge({}, config, defaultConfig);
29
+ const state = merge({}, this.loadConfig(), mergeDefaultConfig);
30
+ this.updateConfig(state);
31
+ this.isInitialized = true;
32
+ }
33
+ // 更新配置
34
+ updateConfig(config) {
35
+ const cacheState = merge({}, config, markRaw(this.state));
36
+ Object.assign(this.state, cacheState);
37
+ updateCSSVariables(this.state);
38
+ this.saveConfig(this.state);
39
+ }
40
+ // 保存配置
41
+ saveConfig(config) {
42
+ if (!this.cache)
43
+ return;
44
+ this.cache.setItem(STORAGE_KEY, config);
45
+ }
46
+ // 加载配置
47
+ loadConfig() {
48
+ if (!this.cache)
49
+ return undefined;
50
+ return this.cache.getItem(STORAGE_KEY);
51
+ }
52
+ // 获取配置
53
+ getConfig() {
54
+ return readonly(this.state);
25
55
  }
26
- this.cache = new StorageManager({ prefix: namespace })
27
- const mergeDefaultConfig = merge({}, config, defaultConfig)
28
- const state = merge({}, this.loadConfig(), mergeDefaultConfig)
29
- this.updateConfig(state)
30
- this.isInitialized = true
31
- }
32
- // 更新配置
33
- updateConfig(config) {
34
- const cacheState = merge({}, config, markRaw(this.state))
35
- Object.assign(this.state, cacheState)
36
- updateCSSVariables(this.state)
37
- this.saveConfig(this.state)
38
- }
39
- // 保存配置
40
- saveConfig(config) {
41
- if (!this.cache) return
42
- this.cache.setItem(STORAGE_KEY, config)
43
- }
44
- // 加载配置
45
- loadConfig() {
46
- if (!this.cache) return undefined
47
- return this.cache.getItem(STORAGE_KEY)
48
- }
49
- // 获取配置
50
- getConfig() {
51
- return readonly(this.state)
52
- }
53
56
  }
54
- const guider = new Guider()
55
- const userConfig = guider.getConfig()
56
- export { Guider, userConfig, guider }
57
- //# sourceMappingURL=guider.js.map
57
+ const guider = new Guider();
58
+ const userConfig = guider.getConfig();
59
+ export { Guider, userConfig, guider };
60
+ //# sourceMappingURL=guider.js.map
@@ -1,6 +1,6 @@
1
- export * from './config'
2
- export * from './guider'
3
- export * from './updateCssVariables'
4
- export * from './storageManager'
5
- export * from './types'
6
- //# sourceMappingURL=index.d.ts.map
1
+ export * from './config';
2
+ export * from './guider';
3
+ export * from './updateCssVariables';
4
+ export * from './storageManager';
5
+ export * from './types';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -1,6 +1,6 @@
1
- export * from './config'
2
- export * from './guider'
3
- export * from './updateCssVariables'
4
- export * from './storageManager'
5
- export * from './types'
6
- //# sourceMappingURL=index.js.map
1
+ export * from './config';
2
+ export * from './guider';
3
+ export * from './updateCssVariables';
4
+ export * from './storageManager';
5
+ export * from './types';
6
+ //# sourceMappingURL=index.js.map
@@ -1,45 +1,45 @@
1
- type StorageType = 'localStorage' | 'sessionStorage'
1
+ type StorageType = 'localStorage' | 'sessionStorage';
2
2
  interface StorageManagerOptions {
3
- prefix?: string
4
- storageType?: StorageType
3
+ prefix?: string;
4
+ storageType?: StorageType;
5
5
  }
6
6
  declare class StorageManager {
7
- private prefix
8
- private storage
9
- constructor({ prefix, storageType }?: StorageManagerOptions)
10
- /**
11
- * 清除所有带前缀的存储项
12
- */
13
- clear(): void
14
- /**
15
- * 清除所有过期的存储项
16
- */
17
- clearExpiredItems(): void
18
- /**
19
- * 获取存储项
20
- * @param key 键
21
- * @param defaultValue 当项不存在或已过期时返回的默认值
22
- * @returns 值,如果项已过期或解析错误则返回默认值
23
- */
24
- getItem<T>(key: string, defaultValue?: null | T): null | T
25
- /**
26
- * 移除存储项
27
- * @param key 键
28
- */
29
- removeItem(key: string): void
30
- /**
31
- * 设置存储项
32
- * @param key 键
33
- * @param value 值
34
- * @param ttl 存活时间(毫秒)
35
- */
36
- setItem<T>(key: string, value: T, ttl?: number): void
37
- /**
38
- * 获取完整的存储键
39
- * @param key 原始键
40
- * @returns 带前缀的完整键
41
- */
42
- private getFullKey
7
+ private prefix;
8
+ private storage;
9
+ constructor({ prefix, storageType }?: StorageManagerOptions);
10
+ /**
11
+ * 清除所有带前缀的存储项
12
+ */
13
+ clear(): void;
14
+ /**
15
+ * 清除所有过期的存储项
16
+ */
17
+ clearExpiredItems(): void;
18
+ /**
19
+ * 获取存储项
20
+ * @param key 键
21
+ * @param defaultValue 当项不存在或已过期时返回的默认值
22
+ * @returns 值,如果项已过期或解析错误则返回默认值
23
+ */
24
+ getItem<T>(key: string, defaultValue?: null | T): null | T;
25
+ /**
26
+ * 移除存储项
27
+ * @param key 键
28
+ */
29
+ removeItem(key: string): void;
30
+ /**
31
+ * 设置存储项
32
+ * @param key 键
33
+ * @param value 值
34
+ * @param ttl 存活时间(毫秒)
35
+ */
36
+ setItem<T>(key: string, value: T, ttl?: number): void;
37
+ /**
38
+ * 获取完整的存储键
39
+ * @param key 原始键
40
+ * @returns 带前缀的完整键
41
+ */
42
+ private getFullKey;
43
43
  }
44
- export { StorageManager }
45
- //# sourceMappingURL=storageManager.d.ts.map
44
+ export { StorageManager };
45
+ //# sourceMappingURL=storageManager.d.ts.map
@@ -1,100 +1,108 @@
1
1
  class StorageManager {
2
- constructor({ prefix = '', storageType = 'localStorage' } = {}) {
3
- this.prefix = prefix
4
- // SSR 兼容性检查
5
- if (typeof window !== 'undefined') {
6
- this.storage = storageType === 'localStorage' ? window.localStorage : window.sessionStorage
7
- } else {
8
- this.storage = null
2
+ constructor({ prefix = '', storageType = 'localStorage' } = {}) {
3
+ this.prefix = prefix;
4
+ // SSR 兼容性检查
5
+ if (typeof window !== 'undefined') {
6
+ this.storage = storageType === 'localStorage' ? window.localStorage : window.sessionStorage;
7
+ }
8
+ else {
9
+ this.storage = null;
10
+ }
9
11
  }
10
- }
11
- /**
12
- * 清除所有带前缀的存储项
13
- */
14
- clear() {
15
- if (!this.storage) return
16
- const keysToRemove = []
17
- for (let i = 0; i < this.storage.length; i++) {
18
- const key = this.storage.key(i)
19
- if (key && key.startsWith(this.prefix)) {
20
- keysToRemove.push(key)
21
- }
12
+ /**
13
+ * 清除所有带前缀的存储项
14
+ */
15
+ clear() {
16
+ if (!this.storage)
17
+ return;
18
+ const keysToRemove = [];
19
+ for (let i = 0; i < this.storage.length; i++) {
20
+ const key = this.storage.key(i);
21
+ if (key && key.startsWith(this.prefix)) {
22
+ keysToRemove.push(key);
23
+ }
24
+ }
25
+ keysToRemove.forEach((key) => this.storage?.removeItem(key));
22
26
  }
23
- keysToRemove.forEach((key) => this.storage?.removeItem(key))
24
- }
25
- /**
26
- * 清除所有过期的存储项
27
- */
28
- clearExpiredItems() {
29
- if (!this.storage) return
30
- for (let i = 0; i < this.storage.length; i++) {
31
- const key = this.storage.key(i)
32
- if (key && key.startsWith(this.prefix)) {
33
- const shortKey = key.replace(this.prefix, '')
34
- this.getItem(shortKey) // 调用 getItem 方法检查并移除过期项
35
- }
27
+ /**
28
+ * 清除所有过期的存储项
29
+ */
30
+ clearExpiredItems() {
31
+ if (!this.storage)
32
+ return;
33
+ for (let i = 0; i < this.storage.length; i++) {
34
+ const key = this.storage.key(i);
35
+ if (key && key.startsWith(this.prefix)) {
36
+ const shortKey = key.replace(this.prefix, '');
37
+ this.getItem(shortKey); // 调用 getItem 方法检查并移除过期项
38
+ }
39
+ }
36
40
  }
37
- }
38
- /**
39
- * 获取存储项
40
- * @param key
41
- * @param defaultValue 当项不存在或已过期时返回的默认值
42
- * @returns 值,如果项已过期或解析错误则返回默认值
43
- */
44
- getItem(key, defaultValue = null) {
45
- if (!this.storage) return defaultValue
46
- const fullKey = this.getFullKey(key)
47
- const itemStr = this.storage.getItem(fullKey)
48
- if (!itemStr) {
49
- return defaultValue
41
+ /**
42
+ * 获取存储项
43
+ * @param key 键
44
+ * @param defaultValue 当项不存在或已过期时返回的默认值
45
+ * @returns 值,如果项已过期或解析错误则返回默认值
46
+ */
47
+ getItem(key, defaultValue = null) {
48
+ if (!this.storage)
49
+ return defaultValue;
50
+ const fullKey = this.getFullKey(key);
51
+ const itemStr = this.storage.getItem(fullKey);
52
+ if (!itemStr) {
53
+ return defaultValue;
54
+ }
55
+ try {
56
+ const item = JSON.parse(itemStr);
57
+ if (item.expiry && Date.now() > item.expiry) {
58
+ this.storage.removeItem(fullKey);
59
+ return defaultValue;
60
+ }
61
+ return item.value;
62
+ }
63
+ catch (error) {
64
+ console.error(`Error parsing item with key "${fullKey}":`, error);
65
+ this.storage.removeItem(fullKey); // 如果解析失败,删除该项
66
+ return defaultValue;
67
+ }
50
68
  }
51
- try {
52
- const item = JSON.parse(itemStr)
53
- if (item.expiry && Date.now() > item.expiry) {
54
- this.storage.removeItem(fullKey)
55
- return defaultValue
56
- }
57
- return item.value
58
- } catch (error) {
59
- console.error(`Error parsing item with key "${fullKey}":`, error)
60
- this.storage.removeItem(fullKey) // 如果解析失败,删除该项
61
- return defaultValue
69
+ /**
70
+ * 移除存储项
71
+ * @param key
72
+ */
73
+ removeItem(key) {
74
+ if (!this.storage)
75
+ return;
76
+ const fullKey = this.getFullKey(key);
77
+ this.storage.removeItem(fullKey);
62
78
  }
63
- }
64
- /**
65
- * 移除存储项
66
- * @param key
67
- */
68
- removeItem(key) {
69
- if (!this.storage) return
70
- const fullKey = this.getFullKey(key)
71
- this.storage.removeItem(fullKey)
72
- }
73
- /**
74
- * 设置存储项
75
- * @param key 键
76
- * @param value 值
77
- * @param ttl 存活时间(毫秒)
78
- */
79
- setItem(key, value, ttl) {
80
- if (!this.storage) return
81
- const fullKey = this.getFullKey(key)
82
- const expiry = ttl ? Date.now() + ttl : undefined
83
- const item = { expiry, value }
84
- try {
85
- this.storage.setItem(fullKey, JSON.stringify(item))
86
- } catch (error) {
87
- console.error(`Error setting item with key "${fullKey}":`, error)
79
+ /**
80
+ * 设置存储项
81
+ * @param key 键
82
+ * @param value
83
+ * @param ttl 存活时间(毫秒)
84
+ */
85
+ setItem(key, value, ttl) {
86
+ if (!this.storage)
87
+ return;
88
+ const fullKey = this.getFullKey(key);
89
+ const expiry = ttl ? Date.now() + ttl : undefined;
90
+ const item = { expiry, value };
91
+ try {
92
+ this.storage.setItem(fullKey, JSON.stringify(item));
93
+ }
94
+ catch (error) {
95
+ console.error(`Error setting item with key "${fullKey}":`, error);
96
+ }
97
+ }
98
+ /**
99
+ * 获取完整的存储键
100
+ * @param key 原始键
101
+ * @returns 带前缀的完整键
102
+ */
103
+ getFullKey(key) {
104
+ return `${this.prefix}-${key}`;
88
105
  }
89
- }
90
- /**
91
- * 获取完整的存储键
92
- * @param key 原始键
93
- * @returns 带前缀的完整键
94
- */
95
- getFullKey(key) {
96
- return `${this.prefix}-${key}`
97
- }
98
106
  }
99
- export { StorageManager }
100
- //# sourceMappingURL=storageManager.js.map
107
+ export { StorageManager };
108
+ //# sourceMappingURL=storageManager.js.map
@@ -1,30 +1,30 @@
1
1
  interface InitialOptions {
2
- namespace: string
3
- config?: Partial<Config>
2
+ namespace: string;
3
+ config?: Partial<Config>;
4
4
  }
5
5
  interface ThemeConfig {
6
- colorDestructive?: string
7
- colorPrimary?: string
8
- colorSuccess?: string
9
- colorWarning?: string
6
+ colorDestructive?: string;
7
+ colorPrimary?: string;
8
+ colorSuccess?: string;
9
+ colorWarning?: string;
10
10
  }
11
11
  interface SidebarConfig {
12
- collapse: boolean
12
+ collapse: boolean;
13
13
  }
14
14
  interface TransitionConfig {
15
- progress: boolean
15
+ progress: boolean;
16
16
  }
17
17
  interface AppConfig {
18
- locale?: string
19
- name?: string
20
- defaultHomePath?: string
21
- logo?: string
18
+ locale?: string;
19
+ name?: string;
20
+ defaultHomePath?: string;
21
+ logo?: string;
22
22
  }
23
23
  interface Config {
24
- app?: AppConfig
25
- theme?: ThemeConfig
26
- sidebar?: SidebarConfig
27
- transition?: TransitionConfig
24
+ app?: AppConfig;
25
+ theme?: ThemeConfig;
26
+ sidebar?: SidebarConfig;
27
+ transition?: TransitionConfig;
28
28
  }
29
- export type { Config, InitialOptions }
30
- //# sourceMappingURL=types.d.ts.map
29
+ export type { Config, InitialOptions };
30
+ //# sourceMappingURL=types.d.ts.map
@@ -1,2 +1,2 @@
1
- export {}
2
- //# sourceMappingURL=types.js.map
1
+ export {};
2
+ //# sourceMappingURL=types.js.map