vue3 监听路由变化
2023-05-18 本文已影响0人
冰落寞成
watch(() => router.currentRoute.value.path, (toPath) => {
checkCurrentRoute(toPath)
}, { immediate: true, deep: true })
watch(() => router.currentRoute.value.path, (toPath) => {
checkCurrentRoute(toPath)
}, { immediate: true, deep: true })