From 7f4a08f7a41827a75ae9566a9afe296003795988 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A6=BA=E7=8B=A8?= <18119604035@163.com> Date: Tue, 28 Mar 2023 18:13:07 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E6=82=AC=E6=B5=AE=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/course/compenents/hour.module.scss | 8 ++ src/pages/course/compenents/hour.tsx | 78 ++++++++------------ 2 files changed, 38 insertions(+), 48 deletions(-) diff --git a/src/pages/course/compenents/hour.module.scss b/src/pages/course/compenents/hour.module.scss index 001af9e..c98ea78 100644 --- a/src/pages/course/compenents/hour.module.scss +++ b/src/pages/course/compenents/hour.module.scss @@ -11,6 +11,14 @@ cursor: pointer; &:hover { background: rgba(255, 77, 79, 0.05); + .left-item { + i { + color: #ff4d4f; + } + .title { + color: #ff4d4f; + } + } } .left-item { diff --git a/src/pages/course/compenents/hour.tsx b/src/pages/course/compenents/hour.tsx index 7bcbe15..4deaadd 100644 --- a/src/pages/course/compenents/hour.tsx +++ b/src/pages/course/compenents/hour.tsx @@ -57,7 +57,7 @@ export const HourCompenent: React.FC = ({ }; return ( -
+ <> = ({ goNextVideo(); }} > -
- -
- {title}({durationFormat(Number(duration))}) +
{ + setVisible(true); + }} + > +
+ +
+ {title}({durationFormat(Number(duration))}) +
+
+
+ {progress >= 0 && progress < 100 && ( + <> + {progress === 0 &&
开始学习
} + {progress !== 0 && ( + <> +
+ 上次学习到 + {durationFormat(Number(record.finished_duration || 0))} +
+
继续学习
+ + )} + + )} + {progress >= 100 &&
已学完
}
-
- {progress >= 0 && progress < 100 && ( - <> - {progress === 0 && ( -
{ - setVisible(true); - }} - > - 开始学习 -
- )} - {progress !== 0 && ( - <> -
- 上次学习到 - {durationFormat(Number(record.finished_duration || 0))} -
-
{ - setVisible(true); - }} - > - 继续学习 -
- - )} - - )} - {progress >= 100 && ( -
{ - setVisible(true); - }} - > - 已学完 -
- )} -
-
+ ); };