Browse Source

修改样式

lex 2 năm trước cách đây
mục cha
commit
d3074c5544

+ 21 - 4
src/views/courseware-record/index.tsx

@@ -198,7 +198,13 @@ export default defineComponent({
 
     return () => (
       <div class={[!showContact.value ? 'emptyRootContainer' : '', styles.exerciseRecord]}>
-        <OSticky position="top" background="#F8F8F8">
+        <OSticky
+          position="top"
+          background="#F8F8F8"
+          onGetHeight={(height: any) => {
+            document.documentElement.style.setProperty('--header-height', height + 'px')
+          }}
+        >
           <OHeader border={false}>
             {{
               right: () => (
@@ -380,7 +386,9 @@ export default defineComponent({
           <OFullRefresh
             v-model:modelValue={refreshing.value}
             onRefresh={onRefresh}
-            style="min-height: 100vh;"
+            style={{
+              minHeight: `calc(100vh - var(--header-height))`
+            }}
           >
             <List
               loading-text=" "
@@ -420,8 +428,17 @@ export default defineComponent({
                       value: () => (
                         <div class={styles.courseCount}>
                           <p class={styles.courseRange}>
-                            <span>{formatTime2Mins(item.coursewarePlayTime)}</span>/
-                            {formatTime2Mins(item.adviseStudyTimeSecond)}
+                            <span
+                              style={{
+                                color:
+                                  item.coursewarePlayTime >= item.adviseStudyTimeSecond
+                                    ? '#333'
+                                    : '#f44541'
+                              }}
+                            >
+                              {formatTime2Mins(item.coursewarePlayTime)}
+                            </span>
+                            /{formatTime2Mins(item.adviseStudyTimeSecond)}
                           </p>
                           <p class={styles.courseRangeTips}>使用时长/标准时长</p>
                         </div>

+ 1 - 1
src/views/exercise-record/modals/student-item.module.less

@@ -180,7 +180,7 @@
 
 .recordItem {
   width: auto;
-  margin: 0 13px;
+  margin: 0 13px 12px;
   padding: 20px 12px;
   border-radius: 10px;
   .imgContainer {