Vue I18n (vuex)
Tue Aug 03 2021 09:33:31 GMT+0000 (UTC)
Saved by
@Roy
#javascript
#vue.js
import Vue from "vue";
import Vuex from "vuex";
Vue.use(Vuex);
export default new Vuex.Store({
state: {
lang: null // 存放使用者選用的語系
},
mutations: {
// 切換語系設定
setLang (state, value) {
state.lang = value;
}
},
actions: {},
modules: {}
});
content_copyCOPY
Comments