路由跳转
?
1 2 3 4 5 6 |
|
路由传参
第一种
router.js
?
1 2 3 4 5 6 7 8 |
|
跳转.vue
?
1 2 3 4 5 6 7 8 9 10 11 |
|
接收.vue
?
1 2 3 |
|
第二种
router.js
?
1 2 3 4 5 6 7 8 |
|
跳转.vue
?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
|
接收.vue
?
1 2 3 |
|
可以完成跨组件传参的四种方式
?
1 2 3 4 |
|
vuex仓库插件
store.js配置文件
?
1 2 3 4 5 6 7 8 9 10 11 12 13 |
|
在任意组件中给仓库变量赋值
?
1 2 |
|
在任意组件中取仓库变量的值
?
1 |
|
vue-cookie插件
安装
?
1 |
|
main.js 配置
?
1 2 3 4 5 6 7 8 9 10 11 |
|
使用
?
1 2 3 4 5 6 7 8 9 |
|
注:cookie一般都是用来存储token的
?
1 2 3 4 5 |
|
axios插件
安装
?
1 |
|
main.js配置
?
1 2 |
|
使用
?
1 2 3 4 5 6 |
|
案例
?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
|
跨域问题(同源策略)
?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
|
element-ui插件
安装
?
1 |
|
main.js配置
?
1 2 3 |
|
使用
?
1 |
|
原文地址:https://www.cnblogs.com/yangxinpython/p/11764070.html