当前位置:网站首页>router---dynamic route matching
router---dynamic route matching
2022-08-04 13:03:00 【monstkl】
1. Dynamic routing usage scenarios or path parameter usage scenarios
We need to map the routes of the given matching pattern to the same component, we need to use the path parameterOr the same component, the path parameters are the same, the display is different
Second, matching mode, matching path, parameter acquisition
Match Pattern | match path | Parameter acquisition |
/users/:username | /users/jim | $router.params.username |
/users/:username/:userid | /users/jim/123 | $router.params.username $router.params.userid |
Three, how to respond to this routing change
1, monitor $router.params2. beforeRouteUpdate(to, from, next){to.params.id}
边栏推荐
猜你喜欢
随机推荐
JSX使用
未来已来,只是尚未流行
Programmer Qixi Gift - How to quickly build an exclusive chat room for your girlfriend in 30 minutes
LeetCode_3_无重复字符的最长子串
情人节浪漫3D照片墙【附源码】
8/3 训练日志 (树状数组+区间覆盖+思维+01字典树)
项目里的各种配置,你都了解吗?
漏洞复现 - - - Alibaba Nacos权限认证绕过
永磁同步电机FOC驱动代码讲解
牛客网刷题记录 || 链表
Script to get local IP address
PMP每日一练 | 考试不迷路-8.4(包含敏捷+多选)
技术分享| 小程序实现音视频通话
双目立体视觉笔记(三)三角测量、极线校正
做项目管理有且有必要了解并学习的重要知识--PMP项目管理
Focus!2022 interview must brush 461 interview questions summary + interview + resume template
k8s上安装mysql
21天学习挑战赛--第二天打卡(setSystemUiVisibility、导航栏、状态栏)
正确使用Impala的invalidate metadata与refresh语句
干货丨数学规划视角下的分货优化解题思路