完善页面切换
(cherry picked from commit 6d4c41f8952b931cf098a4f1add6c6044d40edc4)
This commit is contained in:
+10
-11
@@ -26,17 +26,16 @@ const routes = [
|
||||
},
|
||||
{
|
||||
path: '/',
|
||||
// name: 'home',
|
||||
// component: () => import('@/views/Home'),
|
||||
// meta: {
|
||||
// // 是否显示头部导航
|
||||
// hasNavBar: true,
|
||||
// // 当前页标题(国际化的标题,对应$t('pageTitle.home')中的home,如果为空则不显示
|
||||
// pageTitle: 'home',
|
||||
// // 是否显示返回
|
||||
// hasBack: false
|
||||
// }
|
||||
redirect: 'NoMobile'
|
||||
name: 'home',
|
||||
component: () => import('@/views/Home'),
|
||||
meta: {
|
||||
// 是否显示头部导航
|
||||
hasNavBar: true,
|
||||
// 当前页标题(国际化的标题,对应$t('pageTitle.home')中的home,如果为空则不显示
|
||||
pageTitle: 'home',
|
||||
// 是否显示返回
|
||||
hasBack: false
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
|
||||
+5
-1
@@ -2,8 +2,9 @@
|
||||
<div class="home">
|
||||
首页
|
||||
<br>
|
||||
<van-button type="info" @click="logout">退出登录</van-button>
|
||||
<van-button type="info" @click="toSearch" style="margin-left: 0.1rem">标准检索</van-button>
|
||||
<van-button type="info" @click="toMyTodo" style="margin-left: 0.1rem">我的待办</van-button>
|
||||
<van-button type="info" @click="logout" style="margin-left: 0.1rem">退出登录</van-button>
|
||||
<br>
|
||||
</div>
|
||||
</template>
|
||||
@@ -14,6 +15,9 @@ import { mapActions } from 'vuex'
|
||||
export default {
|
||||
name: 'Home',
|
||||
methods: {
|
||||
toSearch () {
|
||||
this.$router.push({ path: '/search/generalSearch' })
|
||||
},
|
||||
toMyTodo () {
|
||||
this.$router.push({ path: '/myTodo' })
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user