当前位置:网站首页>router---Programmatic navigation
router---Programmatic navigation
2022-08-04 13:02:00 【monstkl】
One, programmatic navigation and declarative navigation
Declarative: Programmatically: router.push('')
Second, the method of programmatic navigation
1, push to navigate to different locations2. replace3. The parameter of go(n) is an integer, which can be positive or negativeThe navigation method will return a promise to tell if the navigation was successful
Three, the parameters of the programmatic navigation method (push, replace): string | object
1, stringrouter.push('/detail')2. Object (path is provided, params will be ignored)router.push({path: '/detail'})router.push({path: '/detail', query:{}})router.push({name: 'detail', params:{}}) // The name here corresponds to the name in the routing configuration, case sensitive
Fourth, accept the parameters passed when navigating in the component
route.query.xxroute.params.xx
5. The params parameter will not be displayed in the address bar unless the path parameter is configured in the route
边栏推荐
猜你喜欢
并发刺客(False Sharing)——并发程序的隐藏杀手
技术分享| 小程序实现音视频通话
redis未授权访问漏洞【vulhub靶场】复现
手搓一个“七夕限定”,用3D Engine 5分钟实现烟花绽放效果
Focus!2022 interview must brush 461 interview questions summary + interview + resume template
【PHP实现微信公众平台开发—基础篇】第2章 微信公众账号及申请流程详解
封装、继承、多态的联合使用实现不同等级学生分数信息的统计
Chinese valentine's day of young people crazy to make money, earn 140000 a week
Motion Rule (16)-Union Check Basic Questions-Grid Game
“蔚来杯“2022牛客暑期多校训练营5 B、C、F、G、H、K
随机推荐
SSRF-服务器端请求伪造-相关知识
rpm安装提示error: XXX: not an rpm package (or package manifest):
拥有一台服务器,程序猿装X的开始
FHQ-Treap 简介
The head module of the yolo series
Arduino框架下I2S控制ADC采样以及PWM输出示例解析
Geoffrey Hinton:深度学习的下一个大事件
用VbScript控制光驱
router---编程式导航
两年独立开发经验程序员告诉我们赚钱的经验(听听真正赚到钱的高手做法)
17种正则表达式
PMP每日一练 | 考试不迷路-8.4(包含敏捷+多选)
他是“中台”之父,凭一个概念为阿里狂赚百亿
GeoAO:一种快速的环境光遮蔽方案
Motion Regulations (18) - and check the basic questions - gang
8/3 训练日志 (树状数组+区间覆盖+思维+01字典树)
干货丨数学规划视角下的分货优化解题思路
Diffusion Models:生成扩散模型
双目立体视觉笔记(三)三角测量、极线校正
Systemui qsSetting添加新图标