mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-12-26 15:00:16 +08:00
refactor(projects): new storage system [新的本地数据存储系统]
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
export * from './typeof';
|
||||
export * from './color';
|
||||
export * from './number';
|
||||
export * from './object';
|
||||
export * from './pattern';
|
||||
export * from './theme';
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
/** 设置对象数据 */
|
||||
export function objectAssign<T extends Record<string, any>>(target: T, source: Partial<T>) {
|
||||
Object.assign(target, source);
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
import { EnumStorageKey } from '@/enum';
|
||||
|
||||
/**
|
||||
* 缓存主题颜色
|
||||
* @param color
|
||||
*/
|
||||
export function setThemeColor(color: string) {
|
||||
window.localStorage.setItem(EnumStorageKey['theme-color'], color);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取缓存的主题颜色
|
||||
*/
|
||||
export function getThemeColor() {
|
||||
return window.localStorage.getItem(EnumStorageKey['theme-color']);
|
||||
}
|
||||
Reference in New Issue
Block a user