修改错误的标签

This commit is contained in:
flykhan 2023-03-09 21:05:48 +08:00
parent dc2a352719
commit 848443fb08
1 changed files with 15 additions and 36 deletions

View File

@ -6,50 +6,37 @@
<ul class="navbar-nav me-auto mb-2 mb-lg-0"> <ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item"> <li class="nav-item">
<!-- :class v-bind:class 的简写 --> <!-- :class v-bind:class 的简写 -->
<router-link <router-link :class="route_name == 'pk_index' ? 'nav-link active' : 'nav-link'"
:class="route_name == 'pk_index' ? 'nav-link active' : 'nav-link'" :to="{ name: 'pk_index' }">对战</router-link>
:to="{ name: 'pk_index' }"
>对战</router-link
>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<router-link <router-link :class="route_name == 'record_index' ? 'nav-link active' : 'nav-link'"
:class="route_name == 'ranklist_index' ? 'nav-link active' : 'nav-link'" :to="{ name: 'record_index' }">对局列表</router-link>
:to="{ name: 'ranklist_index' }"
>对局列表</router-link
>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<router-link <router-link :class="route_name == 'ranklist_index' ? 'nav-link active' : 'nav-link'"
:class="route_name == 'record_index' ? 'nav-link active' : 'nav-link'" :to="{ name: 'ranklist_index' }">排行榜</router-link>
:to="{ name: 'record_index' }"
>排行榜</router-link
>
</li> </li>
</ul> </ul>
<!-- 判断是否登录成功:如果登录成功,则修改导航栏这部分内容 --> <!-- 判断是否登录成功:如果登录成功,则修改导航栏这部分内容 -->
<ul class="navbar-nav" v-if="$store.state.user.is_login"> <ul class="navbar-nav" v-if="$store.state.user.is_login">
<!-- 下拉菜单样式 --> <!-- 下拉菜单样式 -->
<li class="nav-item dropdown"> <li class="nav-item dropdown">
<a <a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
class="nav-link dropdown-toggle"
href="#"
role="button"
data-bs-toggle="dropdown"
aria-expanded="false"
>
<img class="user_photo" :src="$store.state.user.photo" alt="" /> <img class="user_photo" :src="$store.state.user.photo" alt="" />
<!-- {{ $store.state.user.username }} --> <!-- {{ $store.state.user.username }} -->
</a> </a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li> <li>
<router-link class="dropdown-item" :to="{ name: 'user_bot_index' }" <router-link class="dropdown-item" :to="{ name: 'user_bot_index' }">我的Bot</router-link>
>我的Bot</router-link
>
</li> </li>
<!-- 下拉菜单分割线 --> <!-- 下拉菜单分割线 -->
<li><hr class="dropdown-divider" /></li> <li>
<hr class="dropdown-divider" />
</li>
<!-- v-on:click 也可以写为 @click ; 给退出按钮加上手形状按钮样式 style="cursor: pointer"--> <!-- v-on:click 也可以写为 @click ; 给退出按钮加上手形状按钮样式 style="cursor: pointer"-->
<li> <li>
<a class="dropdown-item" style="cursor: pointer" @click="logout">退出</a> <a class="dropdown-item" style="cursor: pointer" @click="logout">退出</a>
@ -62,21 +49,13 @@
<ul class="navbar-nav" v-else-if="!$store.state.user.pulling_info"> <ul class="navbar-nav" v-else-if="!$store.state.user.pulling_info">
<!-- 下拉菜单样式 --> <!-- 下拉菜单样式 -->
<li class="nav-item"> <li class="nav-item">
<router-link <router-link class="nav-link" :to="{ name: 'user_account_login' }" role="button">
class="nav-link"
:to="{ name: 'user_account_login' }"
role="button"
>
登录 登录
</router-link> </router-link>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<router-link <router-link class="nav-link" :to="{ name: 'user_account_register' }" role="button">
class="nav-link"
:to="{ name: 'user_account_register' }"
role="button"
>
注册 注册
</router-link> </router-link>
</li> </li>