warning: Require self-closing on Vue.js custom components

小灰灰 2022-01-26 10:11 549阅读 0赞

错误提示:

  1. 2 warnings found.
  2. 2 warnings potentially fixable with the `--fix` option.
  3. Module Warning (from ./node_modules/eslint-loader/index.js):
  4. warning: Require self-closing on Vue.js custom components (<simple-input>) (vue/html-self-closing) at src\views\components-demo\json-editor.vue:3:5:
  5. 1 | <template>
  6. 2 | <div class="components-container">
  7. > 3 | <simple-input file-name-title="请输入数据表目录名称:" @confirm="confirm"></simple-input>
  8. | ^
  9. 4 | </div>
  10. 5 | </template>
  11. 6 |

解决办法:

错误代码:

  1. <simple-input file-name-title="请输入数据表目录名称:" @confirm="confirm"></simple-input>

正确代码:

  1. <simple-input file-name-title="请输入数据表目录名称:" @confirm="confirm"/>

发表评论

表情:
评论列表 (有 0 条评论,549人围观)

还没有评论,来说两句吧...

相关阅读