解决Vue-Router报错:vue-router.esm.js:17 [vue-router] <router-link>‘s tag prop is deprecated and has been
在中使用了tag属性就报错:[vue-router] 's tag prop is deprecated and has been removed in Vue Router 4. Use the v-slot API to remove this warning: https://next.router.vuejs.org/guide/migration/#removal-of-event-an
·
在router-link标签中使用了tag属性就报错:
[vue-router] 's tag prop is deprecated and has been removed in Vue Router 4. Use the v-slot API to remove this warning: https://next.router.vuejs.org/guide/migration/#removal-of-event-and-tag-props-in-router-link.
<router-link tag="span" v-if="!isLogin" to="/login" class="right">登录</router-link>
<router-link tag="span" v-else to="/me" class="right"><i class="iconfont iconfont-shouye1" /></router-link>
解决方法:去除tag属性
<router-link v-if="!isLogin" to="/login" class="right">登录</router-link>
<router-link v-else to="/me" class="right"><i class="iconfont iconfont-shouye1" /></router-link>
更多推荐
已为社区贡献4条内容
所有评论(0)