Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
vue 中动态路由,应该使用那个请求策略?
这样写对吗?
const { data: secondCategoryList, send } = useRequest((id) => getSecondCategoryAPI(id), {
initialData: {}
})
onMounted(() => {
send(route.params.id as string)
})
onBeforeRouteUpdate((to) => {
send(to.params.id as string)
})
Beta Was this translation helpful? Give feedback.
All reactions