1. 程式人生 > >解決iview中</Input>標簽報錯的方法

解決iview中</Input>標簽報錯的方法

html debug 分享 alt .com during ast pac CI

(1)To turn it off, set vetur.validation.template: false.

技術分享圖片

這時錯誤並不會消息。

(2)在git bash中輸入yarn add -D eslint eslint-plugin-vue,若沒有安裝yarn則需要先安裝,安裝可采用npm的安裝方法;

(3)在eslintrc.js中配置,如下:

 1   extends: [
 2     // https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
 3     // consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
4 ‘plugin:vue/recommended‘, //1 5 // https://github.com/standard/standard/blob/master/docs/RULES-en.md 6 ‘recommended‘ //2 7 ], 8 // required to lint *.vue files 9 plugins: [ 10 ‘vue‘ 11 ], 12 // add your custom rules here 13 rules: { 14 // allow async-await 15 ‘generator-star-spacing‘: ‘off‘,
16 // allow debugger during development 17 ‘no-debugger‘: process.env.NODE_ENV === ‘production‘ ? ‘error‘ : ‘off‘, 18 "vue/html-self-closing": "off" //3 19 } 20 }

這樣就可以解決問題了!

參考:https://github.com/vuejs/vetur/blob/master/docs/linting-error.md#linting-for-template

解決iview中</Input>標簽報錯的方法