提交 dd68ad2f authored 作者: lihuihui's avatar lihuihui

课程章节.2

上级 9ed68367
......@@ -47,7 +47,15 @@ const video = $computed<{ id: string }>(() => {
return props.data[videoIndex]
})
watch(
() => [videoIndex, route.query.index],
() => videoIndex,
() => {
getResourceData(video.id)
},
{ immediate: true }
)
watch(
() => route.query.index,
() => {
if (route.query.index !== undefined) {
videoIndex = parseInt(route.query.index as '')
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论