CN-39 feat: 地图
This commit is contained in:
17
src/utils/cache.js
Normal file
17
src/utils/cache.js
Normal file
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* 缓存
|
||||
* @author 陈劲松
|
||||
* @date 2021/6/30
|
||||
*/
|
||||
|
||||
const cache = {
|
||||
capitalGeo: null
|
||||
}
|
||||
|
||||
export function getCache (key, defaultValue = null) {
|
||||
return cache[key] ? cache[key] : defaultValue
|
||||
}
|
||||
|
||||
export function setCache (key, value) {
|
||||
cache[key] = value
|
||||
}
|
||||
Reference in New Issue
Block a user