首页 > Web开发 > 详细

store---index.js

时间:2020-04-28 23:53:29      阅读:126      评论:0      收藏:0      [点我收藏+]
import Vue from ‘vue‘
import Vuex from ‘vuex‘
import Api from ‘../lib/api/api‘
import Utils from ‘../lib/utils/utils‘

Vue.use(Vuex);

let store = new Vuex.Store({
state: {
platformName: ‘‘
},
mutations: {
// 网站基本信息
baseConfig(state, data) {
state.baseConfig = data;
},
},
actions: {
// 网站基本信息
baseConfig({state, commit }) {
// Api.baseConfig().then( response => {
// if (response[‘success‘]) {
// commit(‘baseConfig‘, response.data);
// }
// })
},
}
});

export default store;

store---index.js

原文:https://www.cnblogs.com/zhaofeis/p/12797962.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!