0
  1. 父组件截图如下图片描述
    子组件截图如下图片描述

  2. 浏览器控制台报错如下vue.esm.js?7a34:434 [Vue warn]: Error in callback for watcher "function () { return this._data.$$state }": "Error: [vuex] Do not mutate vuex store state outside mutation handlers."
    (found in <Root>)vue.esm.js?7a34:523 Error: [vuex] Do not mutate vuex store state outside mutation handlers.
    at assert (eval at <anonymous> (app.js:997), <anonymous>:101:27)
    at Vue$3.store._vm.$watch.deep (eval at <anonymous> (app.js:997), <anonymous>:642:5)
    at Watcher.run (eval at <anonymous> (app.js:717), <anonymous>:2863:19)
    at Watcher.update (eval at <anonymous> (app.js:717), <anonymous>:2837:10)
    at Dep.notify (eval at <anonymous> (app.js:717), <anonymous>:733:13)
    at Object.reactiveSetter [as props] (eval at <anonymous> (app.js:717), <anonymous>:963:11)
    at normalizeProps (eval at <anonymous> (app.js:717), <anonymous>:1268:17)
    at mergeOptions (eval at <anonymous> (app.js:717), <anonymous>:1303:3)
    at resolveConstructorOptions (eval at <anonymous> (app.js:717), <anonymous>:4048:32)
    at createComponent (eval at <anonymous> (app.js:717), <anonymous>:3453:3)

  3. 如上所示,没有在父子组件中使用vuex管理状态,但是总是报vuex的错误,实在是找不到原因所在,求各位帮忙看看怎么回事

2017-07-03 提问

查看全部 8 个回答

0

麻烦问下,怎么解决的,能贴一部分代码么?感谢 你们的 深拷贝方法能贴出来看看么

你可能感兴趣的

推广链接