【发布时间】:2023-01-17 00:44:49
【问题描述】:
home.vue
onChange(event) {
this.$router.push({
name: this.$router.currentRoute.value.name,
params: { id: event.value.value }
});
}
},
api.service.js
return axios.get(API_URL+'/product/all?id='+id, { headers: authHeader() })
.then((res) => res.data);
如何获取外部js文件中的params id
【问题讨论】:
标签: javascript vue.js