当前位置:网站首页>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 successfulThree, 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 sensitiveFourth, accept the parameters passed when navigating in the component
route.query.xxroute.params.xx5. The params parameter will not be displayed in the address bar unless the path parameter is configured in the route
边栏推荐
猜你喜欢
随机推荐
新SCADA 系统:集成边缘计算、MQTT 和云平台
基于双层共识控制的直流微电网优化调度(Matlab代码实现)
Script to get local IP address
从零开始配置 vim(6)——缩写
CLS-PEG-DBCO,胆固醇-聚乙二醇-二苯基环辛炔,可用于改善循环时间
Geoffrey Hinton:深度学习的下一个大事件
持续交付(二)PipeLine基本使用
双目立体视觉笔记(三)三角测量、极线校正
牛客网刷题记录 || 链表
odoo13笔记点
Systemui qsSetting添加新图标
【黑马早报】尚乘数科上市13天,市值超阿里;北大终止陈春花聘用合同;新东方花近200亿退学费和遣散费;张小泉75%产品贴牌代工...
A comprehensive understanding of MOS tubes, an article is enough
17种正则表达式
router---编程式导航
MogDB/openGauss 3.0 扩容及缩容
代码越写越乱?那是因为你没用责任链!
Opencv学习之ORB特征提取和匹配
封装、继承、多态的联合使用实现不同等级学生分数信息的统计
Ceres库运行,模板内报内存冲突问题。(已解决)









