• vue-router 嵌套命名视图


    vue-router 嵌套命名视图

    <!-- UserSettings.v<!-- UserSettings.vue -->
    <div>
      <h1>User Settings</h1>
      <NavBar/>
      <router-view/>
      <router-view name="helper"/>
    </div>ue -->
    <div>
      <h1>User Settings</h1>
      <NavBar/>
      <router-view/>
      <router-view name="helper"/>
    </div>
    

    路由代码:

    {
      path: '/settings',
      // 你也可以在顶级路由就配置命名视图
      component: UserSettings,
      children: [{
        path: 'emails',
        component: UserEmailsSubscriptions
      }, {
        path: 'profile',
        components: {
          default: UserProfile,
          helper: UserProfilePreview
        }
      }]
    }
    

    确保正确使用 components 配置 (带上 s)。

  • 相关阅读:
    决策树
    训练/测试
    机器学习 标准差
    pandas01
    提交参数说明
    pandas_series02
    Yarn 模式
    词云图
    软件需求与分析课堂综合测试
    课堂测试10
  • 原文地址:https://www.cnblogs.com/mengfangui/p/12296988.html
Copyright © 2020-2023  润新知