当前位置:网站首页>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}
边栏推荐
猜你喜欢
Hit the interview!The latest interview booklet of Ali Jin, nine silver and ten is stable!
Cool and efficient data visualization big screen, it's really not that difficult to do!丨Geek Planet
LeetCode 1403 非递增顺序的最小子序列[贪心] HERODING的LeetCode之路
SCA兼容性分析工具(ORACLE/MySQL/DB2--->MogDB/openGauss/PostgreSQL)
MySQL-数据类型
【PHP实现微信公众平台开发—基础篇】第2章 微信公众账号及申请流程详解
LeetCode_424_替换后的最长重复字符
封装、继承、多态的联合使用实现不同等级学生分数信息的统计
【VSCode】一文详解vscode下安装vim后无法使用Ctrl+CV复制粘贴 使用Vim插件的配置记录
Diffusion Models:生成扩散模型
随机推荐
座舱人机交互「暗潮汹涌」,语音「下」,多模态「上」
“蔚来杯“2022牛客暑期多校训练营2 G、J、K
Why is Luo Zhenyu's A-share dream so difficult to fulfill?
Django使用腾讯云发送短信并存入redis
【WeChat Mini Program】Social Internship Production Project for Information Management and Information System Major--Trash Fingerprint
判断密码是否包含键盘连续字母
LeetCode 1403 非递增顺序的最小子序列[贪心] HERODING的LeetCode之路
广告电商系统开发
String is a reference type
k8s上安装mysql
云原生Devops 的实现方法
情人节浪漫3D照片墙【附源码】
手搓一个“七夕限定”,用3D Engine 5分钟实现烟花绽放效果
正确使用Impala的invalidate metadata与refresh语句
跨链桥已成行业最大安全隐患 为什么和怎么办
FHQ-Treap 简介
漏洞复现 - - - Alibaba Nacos权限认证绕过
Cool and efficient data visualization big screen, it's really not that difficult to do!丨Geek Planet
sqlserver删除重复数据
PMP每日一练 | 考试不迷路-8.4(包含敏捷+多选)