Commit 54eeaee7 authored by “yiyousong”'s avatar “yiyousong”

perf: 取消vuex状态持久化

parent 00ee80ab
......@@ -598,22 +598,22 @@ export default {
// box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.1);
position: relative;
overflow: hidden;
// &::before {
// content: "";
// position: absolute;
// width: 200px;
// height: 300%;
// left: -200px;
// transform: rotateZ(-45deg);
// background: linear-gradient(
// to right,
// transparent 1%,
// rgba(255, 255, 255, 0.2) 30%,
// rgba(255, 255, 255, 0.5) 60%,
// transparent 100%
// );
// animation: shadow 6s infinite;
// }
&::before {
content: "";
position: absolute;
width: 200px;
height: 300%;
left: -200px;
transform: rotateZ(-45deg);
background: linear-gradient(
to right,
transparent 1%,
rgba(255, 255, 255, 0.2) 30%,
rgba(255, 255, 255, 0.5) 60%,
transparent 100%
);
animation: shadow 6s infinite;
}
// .fill-btn-text1 {
// animation: ring 6s 20ms infinite;
......
......@@ -8,10 +8,12 @@
import { mapMutations, mapGetters } from "vuex";
export default {
data() {
return {};
return {
defaultTimes: 300,
};
},
computed: {
...mapGetters(["times", "defaultTimes"]),
...mapGetters(["times"]),
},
created() {
this.isTimeOut();
......
import Vue from "vue";
import Vuex from "vuex";
import createPersistedState from "vuex-persistedstate";
import SecureLS from "secure-ls";
var ls = new SecureLS({ isCompression: false });
// import createPersistedState from "vuex-persistedstate";
// import SecureLS from "secure-ls";
// var ls = new SecureLS({ isCompression: false });
Vue.use(Vuex);
export default new Vuex.Store({
......@@ -12,8 +12,7 @@ export default new Vuex.Store({
datumList: [], // 首页材料
matterList: [], // 首页事项
deviceCode: "", // 设备编码
times: 300, // 倒计时时间
defaultTimes: 300, // 倒计时时间
times: 0, // 倒计时时间
operTime: "", // 样表打开时间
},
getters: {
......@@ -23,9 +22,6 @@ export default new Vuex.Store({
times(state) {
return state.times;
},
defaultTimes(state) {
return state.defaultTimes;
},
operTime(state) {
return state.operTime;
},
......@@ -60,13 +56,13 @@ export default new Vuex.Store({
// createPersistedState({
// storage: window.sessionStorage,
// }),
createPersistedState({
key: "info",
storage: {
getItem: (key) => ls.get(key),
setItem: (key, value) => ls.set(key, value),
removeItem: (key) => ls.remove(key),
},
}),
// createPersistedState({
// key: "info",
// storage: {
// getItem: (key) => ls.get(key),
// setItem: (key, value) => ls.set(key, value),
// removeItem: (key) => ls.remove(key),
// },
// }),
],
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment