亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

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 回復 有任何疑惑可以回復我~

能提供代碼嗎?

包括且不限于:

1. webpack版本,vue版本,node版本,npm版本。

2. webpack配置;

3. package.json

4. 本課程中的哪個實例操作出如上的錯誤,操作的流程是什么?!

5. 代碼截圖,console錯誤截圖,終端錯誤截圖。


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

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下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號