push
This commit is contained in:
17
lib/util/system.ts
Normal file
17
lib/util/system.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
|
||||
import { log } from './log';
|
||||
export const systemInfo = () => {
|
||||
//ver${__APP_INFO__.pkg.version} 暂时不用pack
|
||||
log.info(`The ${import.meta.env.VITE_GLOB_APP_TITLE} compiled at ${__APP_INFO__.buildTime}.`);
|
||||
};
|
||||
export const getLocalSetting = () => {
|
||||
return JSON.parse(localStorage.getItem(import.meta.env.VITE_GLOB_APP_TITLE)) || {};
|
||||
};
|
||||
export const setLocalSetting = (setting) => {
|
||||
const _setting = getLocalSetting() || {};
|
||||
return localStorage.setItem(
|
||||
import.meta.env.VITE_GLOB_APP_TITLE,
|
||||
JSON.stringify(Object.assign(_setting, setting)),
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user