naive-ui/demo/store.js
songwanli2025@163.com fd21ab9cee refactor code
2020-03-16 17:38:06 +08:00

9 lines
197 B
JavaScript

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