Selaa lähdekoodia

Tabbar页面统一嵌套

test
wzl 11 kuukautta sitten
vanhempi
commit
91ff795ed9
7 muutettua tiedostoa jossa 64 lisäystä ja 44 poistoa
  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 Näytä tiedosto

@@ -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 Näytä tiedosto

@@ -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 Näytä tiedosto

@@ -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 Näytä tiedosto

@@ -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 Näytä tiedosto

@@ -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 Näytä tiedosto

@@ -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 Näytä tiedosto

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

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


Loading…
Peruuta
Tallenna