【发布时间】:2020-02-07 22:04:55
【问题描述】:
这是我初始化 vuex 的方法:
Vue.use(Vuex);
const store = new Vuex.Store({
plugins: [createLogger({logger: console, collapsed: true})],
strict: true,
state: state,
getters: getters,
mutations: mutations,
actions: actions,
});
Vue.prototype.$store = store;
export default store;
我得到的日志是这样的:
'突变 ADD_VIDEO_CREDIT @ 15:53:13.903'
'%c prev state''颜色:#9E9E9E; font-weight: bold' { profile: // 一大堆文字
'%c 突变''颜色:#03A9F4;字体重量:粗体'{类型:'ADD_CREDIT',有效载荷:{信用:4}}
'%c 下一个状态''颜色:#4CAF50; font-weight: bold' { profile: // 又一大堆文字
在我的梦想中,我只想得到:
类型:'ADD_CREDIT',有效负载:{credit: 4}
什么是 closesd 我的 cat 得到那个?
【问题讨论】:
标签: javascript vue.js vuex