Skip to content

Commit

Permalink
🌸 Release v1.4.3.
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangcong committed Jun 11, 2020
1 parent 4af71dc commit fbbe505
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions src/config/global.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,30 @@
/*
* @Github: https://github.com/Geek-James
* @掘金: https://juejin.im/user/5c4ebc72e51d4511dc7306ce
* @Date: 2020-05-25 09:57:34
* @LastEditors: James
* @LastEditTime: 2020-06-11 09:35:57
*/
// 本地化存储
export const setLocalStore = (name, content) => {
if (!name) return
if (typeof content !== 'string') {
content = JSON.stringify(content)
}
window.localStorage.setItem(name, content)
if (!name) return
if (typeof content !== 'string') {
content = JSON.stringify(content)
}
window.localStorage.setItem(name, content)
}

// 本地化获取
export const getLocalStore = (name) => {
if (!name) return
return window.localStorage.getItem(name)
if (!name) return
return window.localStorage.getItem(name)
}

// 本地化删除
export const removeLocalStore = (name) => {
if (!name) return
return window.localStorage.removeItem(name)
if (!name) return
return window.localStorage.removeItem(name)
}

// 版本信息
export const _VERSION_ = '1.4.2'
export const _VERSION_ = '1.4.3'

0 comments on commit fbbe505

Please sign in to comment.