1、报错:

'v-model' directives require no argument 

截图

Vue脚手架报错:‘v-model‘ directives require no argument 解决方案

 2、原因:

ESLint对vetur进行了eslint检查

Vue脚手架报错:‘v-model‘ directives require no argument 解决方案 

3、解决方法

① 修改模板中使用v-show

v-model:show="show" 改为 v-model="show"

Vue脚手架报错:‘v-model‘ directives require no argument 解决方案

② vetur插件的作者给出了解决办法

 我们可以把eslint对该插件的检查关闭

在VScode中,打开“ 文件 > 首选项 > 设置 ”,搜索 Vetur › Validation: Template ,关闭语法检查

Vue脚手架报错:‘v-model‘ directives require no argument 解决方案

 保存,再看项目,正常运行!!!

问题解决

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。