码迷,mamicode.com
首页 > 其他好文 > 详细

207、vue-router嵌套命名视图

时间:2020-05-21 11:57:59      阅读:74      评论:0      收藏:0      [点我收藏+]

标签:navbar   out   script   ons   view   outer   rip   use   def   

/settings/emails//此后如有路径,则继续匹配
/settings/profile
以下是UserSettings.vue的定义
<div>
  <h1>UserSettings.vue</h1>
  <NavBar/>
  <router-view/>
  <router-view name="helper"/>
</div>
{
  path: /settings,
  component: UserSettings,
  children: [{
    path: emails,
    component: UserEmailsSubscriptions//正常匹配到<router-view/>
  }, {
    path: profile,
    components: {
      default: UserProfile,//默认匹配到<router-view/>
      helper: UserProfilePreview
    }
  }]
}

 

207、vue-router嵌套命名视图

标签:navbar   out   script   ons   view   outer   rip   use   def   

原文地址:https://www.cnblogs.com/gushixianqiancheng/p/12929578.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!