From 476563377b721b02640061381deccf190f161844 Mon Sep 17 00:00:00 2001 From: HoshinoSuzumi Date: Fri, 20 Sep 2024 20:53:47 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=87=8D=E5=86=99=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=A0=B7=E5=BC=8F=EF=BC=8C=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=8C=87=E7=A4=BA=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components.d.ts | 1 + src/pages/index/index.vue | 58 +++++++++++++++++++++++++++++++++++---- 2 files changed, 54 insertions(+), 5 deletions(-) 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(() => {
- + +
+ class="w-full py-2 flex justify-between items-center gap-20 border-b border-b-solid border-neutral-100 last:border-b-0 first:pt-0 last:pb-0">
{ {{ lesson.course_name || '无标题视频' }}
- +
@@ -71,4 +115,8 @@ onMounted(() => { - +