瀏覽代碼

Tabbar页面统一嵌套

test
wzl 11 月之前
父節點
當前提交
91ff795ed9
共有 7 個檔案被更改,包括 64 行新增44 行删除
  1. +37
    -29
      src/router/router.config.js
  2. +24
    -0
      src/views/Tabbar.vue
  3. +1
    -3
      src/views/development/index.vue
  4. +1
    -3
      src/views/insight/index.vue
  5. +1
    -3
      src/views/myself/index.vue
  6. +0
    -3
      src/views/optimize/index.vue
  7. +0
    -3
      src/views/today/index.vue

+ 37
- 29
src/router/router.config.js 查看文件

@@ -6,41 +6,49 @@ export const constantRouterMap = [
{
path: '/',
component: () => import('@/views/layouts/index'),
redirect: '/index',
redirect: '/Tabbar',
meta: {
title: '成长',
keepAlive: false
},
children: [
{
path: '/index',
name: 'Development',
component: () => import('@/views/development/index'),
meta: { title: '成长', keepAlive: false }
},
{
path: '/today',
name: 'Today',
component: () => import('@/views/today/index'),
meta: { title: '今日', keepAlive: false }
},
{
path: '/insight',
name: 'Insight',
component: () => import('@/views/insight/index'),
meta: { title: '洞悉', keepAlive: false }
},
{
path: '/optimize',
name: 'Optimize',
component: () => import('@/views/optimize/index'),
meta: { title: '优化', keepAlive: false }
},
{
path: '/myself',
name: 'Myself',
component: () => import('@/views/myself/index'),
meta: { title: '我的', keepAlive: false }
path: '/Tabbar',
name: 'Index',
redirect: '/index',
component: () => import('@/views/Tabbar.vue'),
children: [
{
path: '/index',
name: 'Development',
component: () => import('@/views/development/index'),
meta: { title: '成长', keepAlive: false }
},
{
path: '/today',
name: 'Today',
component: () => import('@/views/today/index'),
meta: { title: '今日', keepAlive: false }
},
{
path: '/insight',
name: 'Insight',
component: () => import('@/views/insight/index'),
meta: { title: '洞悉', keepAlive: false }
},
{
path: '/optimize',
name: 'Optimize',
component: () => import('@/views/optimize/index'),
meta: { title: '优化', keepAlive: false }
},
{
path: '/myself',
name: 'Myself',
component: () => import('@/views/myself/index'),
meta: { title: '我的', keepAlive: false }
}
]
},
{
path: '/familyNumber',


+ 24
- 0
src/views/Tabbar.vue 查看文件

@@ -0,0 +1,24 @@
<!-- -->
<template>
<div>
<div>nav组件</div>
<router-view />
<TabBar />
</div>
</template>

<script>
import TabBar from '@/components/TabBar';
export default {
components: { TabBar },
data() {
return {};
},
created() {},
mounted() {},
methods: {}
};
</script>
<style scoped>
/* @import url(); 引入css类 */
</style>

+ 1
- 3
src/views/development/index.vue 查看文件

@@ -1,14 +1,12 @@
<!-- -->
<template>
<div>
<TabBar />
啊实打实的
</div>
</template>

<script>
import TabBar from '@/components/TabBar';
export default {
components: { TabBar },
data() {
return {};
},


+ 1
- 3
src/views/insight/index.vue 查看文件

@@ -1,14 +1,12 @@
<!-- -->
<template>
<div>
<TabBar />
</div>
</template>

<script>
import TabBar from '@/components/TabBar';
export default {
components: { TabBar },
data() {
return {};
},


+ 1
- 3
src/views/myself/index.vue 查看文件

@@ -53,7 +53,6 @@
<SubmenuList :title="othersSetting.title" :list="othersSetting.list"> </SubmenuList>
</div>
</div>
<TabBar />
</div>
</template>

@@ -64,9 +63,8 @@ import APIUser from '@/api/user';
import APIDevice from '@/api/device';
import ToastService from '@/services/toast-service';
import { isNotNull } from '@/services/utils-service';
import TabBar from '@/components/TabBar';
export default {
components: { /* NavBar, */ SubmenuList, TabBar },
components: { /* NavBar, */ SubmenuList },
data() {
return {
userInfos: {},


+ 0
- 3
src/views/optimize/index.vue 查看文件

@@ -1,14 +1,11 @@
<!-- -->
<template>
<div>
<TabBar />
</div>
</template>

<script>
import TabBar from '@/components/TabBar';
export default {
components: { TabBar },
data() {
return {};
},


+ 0
- 3
src/views/today/index.vue 查看文件

@@ -1,14 +1,11 @@
<!-- -->
<template>
<div>
<TabBar />
</div>
</template>

<script>
import TabBar from '@/components/TabBar';
export default {
components: { TabBar },
data() {
return {};
},


Loading…
取消
儲存