增加回到首页

develoop
JayChou 3 months ago
parent 2879cb58a1
commit 6fab091312
  1. 11
      src/Layout/tabbar/index.vue

@ -12,12 +12,13 @@
v-show="!item.meta.hidden" :key="item.path" @click="goToRouter(item, index)">
<div>{{ item.meta.title }}</div>
</li>
<li v-if="$route.path != '/home'" @click="$router.push('/')">回到首页</li>
</ul>
<div class="entry">
<!-- <div>企业入口</div>
<div>教师入口</div>
<div>学生入口</div> -->
<div>登录注册入口</div>
<!-- <div>登录注册入口</div> -->
</div>
</div>
</div>
@ -26,12 +27,16 @@
<script lang="ts" setup>
import { constRouter } from '@/router/module/constRouter'
import { useRouter } from 'vue-router'
import { useRouter,useRoute } from 'vue-router'
import { onMounted, ref } from 'vue'
import useSettingStore from '@/store/module/setting'
const $router = useRouter()
const $route = useRoute()
const settingStore = useSettingStore()
const goToRouter = (item: any, index: number) => {
console.log( $route);
settingStore.setuseIndex(index)
$router.push({ path: `${item.path}` })
}
@ -145,7 +150,7 @@ onMounted(() => {
}
li:hover {
color: #7aa4ff;
color: #0033f7;
transform: translateY(-5px);
}

Loading…
Cancel
Save