217 Star 14.8K Fork 663

卓源软件/JeeSite Vue3

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
.gitee
.vscode
bin
build
packages
public
src
api
assets
components
design
directives
enums
hooks
layouts
locales
logics
router
settings
store
utils
auth
cache
index.ts
memory.ts
persistent.ts
storageCache.ts
event
factory
file
helper
http/axios
lib
cipher.ts
color.ts
dateUtil.ts
domUtils.ts
env.ts
index.ts
is.ts
log.ts
mitt.ts
propTypes.ts
uuid.ts
views
App.vue
main.ts
types
.editorconfig
.env
.env.development
.env.production
.env.tomcat
.gitignore
.npmrc
.prettierignore
.prettierrc.mjs
.stylelintignore
LICENSE
README.md
eslint.config.mjs
index.html
package.json
pnpm-lock.yaml
stylelint.config.mjs
terms.md
tsconfig.json
uno.config.ts
vite.config.ts
克隆/下载
index.ts 1.08 KB
一键复制 编辑 原始数据 按行查看 历史
import { getStorageShortName } from '/@/utils/env';
import { createStorage as create, CreateStorageParams } from './storageCache';
import { enableStorageEncryption } from '/@/settings/encryptionSetting';
import { DEFAULT_CACHE_TIME } from '/@/settings/encryptionSetting';
export type Options = Partial<CreateStorageParams>;
const createOptions = (storage: Storage, options: Options = {}): Options => {
return {
// No encryption in debug mode
hasEncrypt: enableStorageEncryption,
storage,
prefixKey: getStorageShortName(),
...options,
};
};
export const WebStorage = create(createOptions(sessionStorage));
export const createStorage = (storage: Storage = sessionStorage, options: Options = {}) => {
return create(createOptions(storage, options));
};
export const createSessionStorage = (options: Options = {}) => {
return createStorage(sessionStorage, { ...options, timeout: DEFAULT_CACHE_TIME });
};
export const createLocalStorage = (options: Options = {}) => {
return createStorage(localStorage, { ...options, timeout: DEFAULT_CACHE_TIME });
};
export default WebStorage;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
TypeScript
1
https://gitee.com/thinkgem/jeesite-vue.git
git@gitee.com:thinkgem/jeesite-vue.git
thinkgem
jeesite-vue
JeeSite Vue3
next

搜索帮助