master
parent
4854f3b59c
commit
6f413aba50
@ -1,37 +1,37 @@
|
||||
// // 1. localStorage
|
||||
// // 设置永久缓存
|
||||
// export function setLocal(key, val) {
|
||||
// window.localStorage.setItem(key, JSON.stringify(val));
|
||||
// }
|
||||
// // 获取永久缓存
|
||||
// export function getLocal(key) {
|
||||
// let json = window.localStorage.getItem(key);
|
||||
// return JSON.parse(json);
|
||||
// }
|
||||
// // 移除永久缓存
|
||||
// export function removeLocal(key) {
|
||||
// window.localStorage.removeItem(key);
|
||||
// }
|
||||
// // 移除全部永久缓存
|
||||
// export function clearLocal() {
|
||||
// window.localStorage.clear();
|
||||
// }
|
||||
// 1. localStorage
|
||||
// 设置永久缓存
|
||||
export function setLocal(key, val) {
|
||||
window.localStorage.setItem(key, JSON.stringify(val));
|
||||
}
|
||||
// 获取永久缓存
|
||||
export function getLocal(key) {
|
||||
let json = window.localStorage.getItem(key);
|
||||
return JSON.parse(json);
|
||||
}
|
||||
// 移除永久缓存
|
||||
export function removeLocal(key) {
|
||||
window.localStorage.removeItem(key);
|
||||
}
|
||||
// 移除全部永久缓存
|
||||
export function clearLocal() {
|
||||
window.localStorage.clear();
|
||||
}
|
||||
|
||||
// // 2. sessionStorage
|
||||
// // 设置临时缓存
|
||||
// export function setSession(key, val) {
|
||||
// window.sessionStorage.setItem(key, JSON.stringify(val));
|
||||
// }
|
||||
// // 获取临时缓存
|
||||
// export function getSession(key) {
|
||||
// let json = window.sessionStorage.getItem(key);
|
||||
// return json==null?'':JSON.parse(json);
|
||||
// }
|
||||
// // 移除临时缓存
|
||||
// export function removeSession(key) {
|
||||
// window.sessionStorage.removeItem(key);
|
||||
// }
|
||||
// // 移除全部临时缓存
|
||||
// export function clearSession() {
|
||||
// window.sessionStorage.clear();
|
||||
// }
|
||||
// 2. sessionStorage
|
||||
// 设置临时缓存
|
||||
export function setSession(key, val) {
|
||||
window.sessionStorage.setItem(key, JSON.stringify(val));
|
||||
}
|
||||
// 获取临时缓存
|
||||
export function getSession(key) {
|
||||
let json = window.sessionStorage.getItem(key);
|
||||
return json==null?'':JSON.parse(json);
|
||||
}
|
||||
// 移除临时缓存
|
||||
export function removeSession(key) {
|
||||
window.sessionStorage.removeItem(key);
|
||||
}
|
||||
// 移除全部临时缓存
|
||||
export function clearSession() {
|
||||
window.sessionStorage.clear();
|
||||
}
|
||||
|
@ -0,0 +1,29 @@
|
||||
<template>
|
||||
<div>
|
||||
404
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'DocusEchartsIndex',
|
||||
|
||||
data() {
|
||||
return {
|
||||
|
||||
};
|
||||
},
|
||||
|
||||
mounted() {
|
||||
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
Loading…
Reference in New Issue