Pārlūkot izejas kodu

Tabbar页面统一嵌套

test
wzl pirms 1 gada
vecāks
revīzija
91ff795ed9
7 mainītis faili ar 64 papildinājumiem un 44 dzēšanām
  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 Parādīt failu

@@ -6,41 +6,49 @@ export const constantRouterMap = [
{ {
path: '/', path: '/',
component: () => import('@/views/layouts/index'), component: () => import('@/views/layouts/index'),
redirect: '/index',
redirect: '/Tabbar',
meta: { meta: {
title: '成长', title: '成长',
keepAlive: false keepAlive: false
}, },
children: [ 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', path: '/familyNumber',


+ 24
- 0
src/views/Tabbar.vue Parādīt failu

@@ -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 Parādīt failu

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


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


+ 1
- 3
src/views/insight/index.vue Parādīt failu

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


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


+ 1
- 3
src/views/myself/index.vue Parādīt failu

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


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


+ 0
- 3
src/views/optimize/index.vue Parādīt failu

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


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


+ 0
- 3
src/views/today/index.vue Parādīt failu

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


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


Notiek ielāde…
Atcelt
Saglabāt