为了账号安全,请及时绑定邮箱和手机立即绑定

Add页面console 报错

[vuex] unknown mutation type: addItem 


点添加后vue调试插件 lists:Array[0]


这是什么情况啊 


正在回答

4 回答

ESLint最好是打开,可以参考一下如下的配置:


module.exports = {
  root: true,
  env: {
    node: true
  },
  'extends': [
    'plugin:vue/essential',
    '@vue/standard'
  ],
  rules: {
    'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
    'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
    'quotes': ["error", "single", { "avoidEscape": true }],
    'vue/script-indent': ['error', 2, {'baseIndent': 1, "switchCase": 1}],
    'indent': ["error", 2, { "SwitchCase": 1 }],
    "comma-dangle": ["error", "only-multiline"]
    // 'indent': 'off',
  },
  'overrides': [
    {
      'files': ['*.vue'],
      'rules': {
        'indent': 0
      }
    }
  ],
  parserOptions: {
    parser: 'babel-eslint'
  }
}


1 回复 有任何疑惑可以回复我~

IDe管了ESLint 就好了,真见鬼~耗一下午时间

0 回复 有任何疑惑可以回复我~

vuex.esm.js?358c:376 [vuex] unknown mutation type: addItem

commit @ vuex.esm.js?358c:376

boundCommit @ vuex.esm.js?358c:325

add @ Add.vue?e2ad:25

click @ Add.vue?4187:58

invokeWithErrorHandling @ vue.esm.js?efeb:1863

invoker @ vue.esm.js?efeb:2188

original._wrapper @ vue.esm.js?efeb:7559


0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

Add页面console 报错

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信