<template> <nav class="mui-bar mui-bar-tab"> <router-link class="mui-tab-item-lib" :to="{name: 'home'}"> <span class="mui-icon mui-icon-home"></span> <span class="mui-tab-label">首页</span> </router-link> <router-link class="mui-tab-item-lib" :to="{name: 'category'}"> <span class="mui-icon mui-icon-personadd"></span> <span class="mui-tab-label">分类</span> </router-link> <router-link class="mui-tab-item-lib" :to="{name: 'shopcart'}"> <span class="mui-icon mui-icon-extra mui-icon-extra-cart"> <span class="mui-badge">2</span> </span> <span class="mui-tab-label">购物车</span> </router-link> <router-link class="mui-tab-item-lib" :to="{name: 'user'}"> <span class="mui-icon mui-icon-gear"></span> <span class="mui-tab-label">我的</span> </router-link> </nav> </template>报错:D:\Vue\cli\vue_shop\src\components\tabbar.vue 1:1 error Component name "tabbar" should always be multi-word vue/multi-word-component-names
时间: 2023-08-13 13:31:03 浏览: 195
react-mui-kit:定制React组件
这个错误是Lint提示的,它认为你的组件名 "tabbar" 只有一个单词,不符合Vue的组件命名规范,建议你将组件名改成 "TabBar" 或者 "TabBarView" 等多个单词组成的名称,以解决这个错误。如果你不想修改组件名,可以在ESLint配置文件中添加 "vue/multi-word-component-names": "off" 以禁用这个规则。
阅读全文