vue-router 嵌套路由空白

照着官方文档配完发现怎么弄还是空白

{
    path: '/address',
    component: () => import('@/views/address/address.vue'),
    name: 'Address',
    children: [
      {
        path: 'edit',
        component: () => import('@/views/address/edit.vue')
      }
    ],
    meta: {
      isHideTabbar: true
    }
  },
const onAdd = () => {
      router.push({path: '/address/edit', query: {
        type: 'add'
      }})
    }

排查发现是父路由组件需要添加router-view


你可能感兴趣的:(vue-router 嵌套路由空白)