This commit is contained in:
clay
2022-01-15 20:55:38 +08:00
parent 5356c8b948
commit 8e9cf7b833
15 changed files with 782 additions and 563 deletions

View File

@@ -1,4 +1,5 @@
import Vue from 'vue'
import Vuex from 'vuex'
import App from './App.vue'
import router from './router'
import i18n from './i18n/i18n'
@@ -9,8 +10,31 @@ import 'element-ui/lib/theme-chalk/display.css';
Vue.config.productionTip = false
Vue.use(ElementUI)
Vue.use(Vuex)
const store = new Vuex.Store({
state: {
isEnglish: false,
menuList :{},
},
mutations: {
increment (state) {
state.count++
}
},
computed:{
setEnglish(isEnglish){
this.store.isEnglish = isEnglish
},
},
getters:{
getEnglish(){
return this.store.isEnglish
}
}
})
new Vue({
i18n,
router,
store: store,
render: h => h(App)
}).$mount('#app')