|
@@ -51,7 +51,7 @@ const router = useRouter()
|
|
|
|
|
|
|
|
function goMyLearning() {
|
|
function goMyLearning() {
|
|
|
router.push('/my-learning')
|
|
router.push('/my-learning')
|
|
|
-}
|
|
|
|
|
|
|
+};
|
|
|
// 将 activeIndex 改为响应式,并根据当前路由动态计算
|
|
// 将 activeIndex 改为响应式,并根据当前路由动态计算
|
|
|
const activeIndex = computed(() => {
|
|
const activeIndex = computed(() => {
|
|
|
switch (route.path) {
|
|
switch (route.path) {
|
|
@@ -62,7 +62,7 @@ const activeIndex = computed(() => {
|
|
|
default:
|
|
default:
|
|
|
return '1' // 默认返回首页
|
|
return '1' // 默认返回首页
|
|
|
}
|
|
}
|
|
|
-})
|
|
|
|
|
|
|
+});
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
<style lang="scss">
|