naive-ui/demo/store.js

9 lines
196 B
JavaScript
Raw Normal View History

export const state = {
2020-03-16 17:38:06 +08:00
mode: localStorage.getItem('mode') ? localStorage.getItem('mode') : 'debug'
}
2020-03-17 16:48:36 +08:00
export function setMode (mode) {
state.mode = mode
2020-03-16 17:38:06 +08:00
localStorage.setItem('mode', mode)
}