diff --git a/components.d.ts b/components.d.ts index 7888117..a7a4dbd 100644 --- a/components.d.ts +++ b/components.d.ts @@ -23,6 +23,7 @@ declare module 'vue' { WdSteps: typeof import('wot-design-uni/components/wd-steps/wd-steps.vue')['default'] WdTabbar: typeof import('wot-design-uni/components/wd-tabbar/wd-tabbar.vue')['default'] WdTabbarItem: typeof import('wot-design-uni/components/wd-tabbar-item/wd-tabbar-item.vue')['default'] + WdTag: typeof import('wot-design-uni/components/wd-tag/wd-tag.vue')['default'] WdToast: typeof import('wot-design-uni/components/wd-toast/wd-toast.vue')['default'] } } diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index 145842a..4dee932 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -6,6 +6,7 @@ import { calcLessonProgress } from '@/utils/lesson'; import { useRouter } from 'uni-mini-router'; import { onMounted, ref } from 'vue'; import { useToast } from 'wot-design-uni'; +import WdTag from 'wot-design-uni/components/wd-tag/wd-tag.vue'; const toast = useToast() const router = useRouter() @@ -36,6 +37,8 @@ onMounted(() => { return acc }, {}) groupedLessons.value = groupData + // auto expand all course + // expandedCourse.value = Object.keys(groupData) }).catch(err => { toast.error({ msg: err.message }) }) @@ -47,12 +50,53 @@ onMounted(() => {
{{ courseName || '无标题课程' }}
+