feat: add device recognition
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
import Vue from 'vue'
|
||||
import Vuex from 'vuex'
|
||||
import account from './modules/account'
|
||||
import setting from './modules/setting'
|
||||
|
||||
Vue.use(Vuex)
|
||||
|
||||
export default new Vuex.Store({
|
||||
modules: {
|
||||
account
|
||||
account,
|
||||
setting
|
||||
}
|
||||
})
|
||||
|
||||
11
src/store/modules/setting.js
Normal file
11
src/store/modules/setting.js
Normal file
@@ -0,0 +1,11 @@
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
isMobile: false
|
||||
},
|
||||
mutations: {
|
||||
setDevice (state, isMobile) {
|
||||
state.isMobile = isMobile
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user