naive-ui/demo/store.js
songwanli2025@163.com 4fafbb39dd refactor mode
2020-03-17 16:48:36 +08:00

9 lines
196 B
JavaScript

export const state = {
mode: localStorage.getItem('mode') ? localStorage.getItem('mode') : 'debug'
}
export function setMode (mode) {
state.mode = mode
localStorage.setItem('mode', mode)
}