【发布时间】:2021-09-02 22:13:58
【问题描述】:
您好,我有一些问题我想将 url 中的参数推送到 NuxtJs 中的另一个页面
props: {
idPending: {
type: Number,
required: true
}
},
methods: {
fetchpage() {
const orderId = this.idPending;
this.$router.push(
this.localePath({
name: 'Checkout-Confirmation-orderId', // page with params orderId
params: { orderId: orderId }
})
);
}
}
当我这样做时,我遇到了这个错误,我不明白为什么
Argument type {name: string, params: {orderId: Number}} is not assignable to parameter type RawLocation Type Number is not assignable to type string
请帮忙谢谢
【问题讨论】:
标签: javascript vue.js nuxt.js