1.配置路由

const routes = [
{
path: '/User',
component: User,
children: [{ path: 'OP1', component: OP1 },//注意子路由的路径写法这里不加/
{ path: 'OP2', component: OP2 }
]
}
 
]

2.父路由里配置子路由显示的地方<router-view></router-view>

Vue 路由的嵌套的更多相关文章

  1. Vue 路由的嵌套使用

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  2. Vue中使用children实现路由的嵌套

    Vue中使用children实现路由的嵌套 相关Html: <!DOCTYPE html> <html lang="en"> <head> &l ...

  3. Vue中路由的嵌套

    import Vue from 'vue'; import App from './App.vue'; //引入公共的scss 注意:创建项目的时候必须用scss import './assets/c ...

  4. Vue路由嵌套

    Vue路由嵌套 <!DOCTYPE html> <html lang="en"> <head> <meta charset="U ...

  5. vue 路由嵌套 及 router-view vue-router --》children

    vue 路由嵌套 vue-router -->children   在项目的很多子页面中,我们往往需要在同一个页面做一个组件的切换,同时保存这个页面的部分数据(比如树形菜单),进而显示不同的数据 ...

  6. Vue学习笔记【28】——Vue路由(使用 children 属性实现路由嵌套)

    使用 children 属性实现路由嵌套   <div id="app">    <router-link to="/account"> ...

  7. vue.js_11_路由的2中参数传递和路由的嵌套

    1.以?的形式传递参数   <router-link to="/login?id=10&name=zs">登录</router-link> 发送参数 ...

  8. vue 路由缓存 路由嵌套 路由守卫 监听物理返回

    最近开发vue项目,遇到的一些问题,这里整合一下,看到一些博客已经有写相关知识,然后自己再次记录一下. 这是关于vue路由相关比较常见的问题,以后遇到相关路由的问题,会不断更新这篇博客. 需求1:从填 ...

  9. vue路由-动态路由和嵌套路由

    一.动态路由 我们经常需要把某种模式匹配到的所有路由,全都映射到同个组件.例如,我们有一个 User 组件,对于所有 ID 各不相同的用户,都要使用这个组件来渲染.那么,我们可以在 vue-route ...

随机推荐

  1. 【论文阅读】Wing Loss for Robust Facial Landmark Localisation with Convolutional Neural Networks

    Wing Loss for Robust Facial Landmark Localisation with Convolutional Neural Networks 参考 1. 人脸关键点: 2. ...

  2. 垃圾回收(GC Garbage collection)

    JS有自动垃圾清理机制, 如果有不需要用的对象,只需要设置对象=null即可 Var a = new object() a = null

  3. flask 数据库迁移的简单操作

    1.目的:修改现有数据库的表结构,不改变数据库中现有的数据. 2.导包:from flask_migrate import Migrate, MigrateCommandfrom flask_scri ...

  4. SQLI DUMB SERIES-18

    (1)对username和password无论怎么输入,都没有回显,再看题目,POST - Header Injection - Uagent field - Error based (基于错误的用户 ...

  5. python 读fnl数据

    (1) FNL 数据介绍 FNL((Final Operational Global Analysis)数据是美国国家环境预报中心(NECP)/美国国家大气研究中心(NCAR)提供的全球再分析资料,空 ...

  6. js 计算浮点数

    JS的浮点计算 最近遇到了数值计算的时候,计算结果出现了类似于199.9999999999999999999的情况,但是被用来计算的两个数值都只是两位数. 就像这样      --------> ...

  7. 30天代码day4 Class vs. Instance

    Class A blueprint defining the charactaristics and behaviors of an object of that class type. Class ...

  8. hello.java分析

    如下图源码所示: 该段代码声明了一个entity实体类,该类有一个变量name,对该变量写了对应的get和set方法.类中还有一个空的构造方法hello(). @RequestScoped用于指定一个 ...

  9. p132程序代码解析

    1.  long before = System.currentTimeMillis(); ...... long after = System.currentTimeMillis(); 解析:该两句 ...

  10. expdp之include参数——实现表级别的expdp操作

    需求是这样的:想将A库的某schema中的一部分表导入到B库的某schema中. 第一可以想到的是使用expdp工具,但是如何只挑选某些表呢,通过查看官方文档,include参数可以实现该需求. in ...