文件2可以通过路由的query对象来接收这个值。在文件2中,可以使用$route对象的query属性来获取传递过来的orderId值。

例如,在文件2的mounted钩子函数中可以这样获取orderId值:

mounted() { const orderId = this.$route.query.odId; // 使用orderId进行后续操作 }

文件1 span style=colorblue; click=toGoodsOrderrefundInforefundorderId refundInforefundorderId spanfunction toGoodsOrderorderId string routerpush name OrderList query odId orderId

原文地址: http://www.cveoy.top/t/topic/iZtX 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录