在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>
Logo

前往低代码交流专区

更多推荐