vue router 常用操作
2024-09-03 10:23:48
1. 普通路由
const routes = [
{ path: '/index', component: index }
]
2. 重定向 redirect
const routes = [
{ path: '/', redirect: '/index'},
{ path: '/index', component: index }
]
3. 嵌套路由
const routes = [
{ path: '/index', component: index,
children: [
{ path: 'info', component: info}
]
}
]
4. 懒加载
const routes = [
{ path: '/index', component: () => import('@/views/index.vue')},
{ path: '/hello', component: () => import('@/views/hello.vue') }
]
最新文章
- ipad和iphone的适配
- python2.6.6安装Image模块
- 图解NodeJS【基于事件、回调的单线程高性能服务器】原理
- Nginx+Tomcat+Memcached负载均衡集群服务搭建
- EXTJS4.2 控件之Grid 行点击事件
- matlab vs python
- jquery图片播放插件Fancybox(灯箱)
- js深入研究之函数内的函数
- python之模块:decimal
- MySQL库表状态查询
- ORACLE-EXP和IMP方法介绍
- java 多线程(总结)
- Android 开发之v4库冲突问题解决方案说明
- Spring之bean的生命周期
- 20165223 学习基础和C语言基础调查
- mybatis 转义
- ZooKeeper是什么
- Python 语言之 map/reduce
- kubernetes集群搭建(3):master节点安装
- Android 手动调用 返回键
热门文章
- itextpdf5设置页眉页脚、生成页码
- 【Mysql】初识MySQL
- Swagger从入门到放弃
- git使用笔记(第一次)
- bert剪枝系列——Are Sixteen Heads Really Better than One?
- yield_from
- 接口测试Post和Get区别(面试题)
- window-Mysql下载安装
- LeetCode3-Longest_Substring_Without_Repeating_Characters
- LeetCode 120. Triangle三角形最小路径和 (C++)