UNPKG

vuexlog

Version:
23 lines (20 loc) 629 B
# vuexlog > vuex插件,能够记录变化的路径和变化的值 在每次commit的时候,会比较现在的状态和之前的状态,找出变化的路径和值,在终端用表格的形式打印出来,方便开发调试. ### 使用方法 npm install vuexlog ``` const log = require('vuexlog'); Vue.use(Vuex); const debug = process.env.NODE_ENV !== 'production'; const Store = new Vuex.Store({ state: store, mutations, actions, getters, strict: debug, plugins: debug ? [createLogger(), log] : [] }) ``` ### 实际使用效果 ![使用效果截图](https://github.com/xiaojiezhou2017/images/blob/master/vuexlog.png)