Ver Fonte

Merge branch 'iteration-20240109'

lex há 1 ano atrás
pai
commit
4a235f3db3
2 ficheiros alterados com 12 adições e 11 exclusões
  1. 4 6
      src/views/home/component/Attendance.tsx
  2. 8 5
      src/views/home/contentItem.tsx

+ 4 - 6
src/views/home/component/Attendance.tsx

@@ -98,7 +98,7 @@ export default defineComponent({
           left: '48%',
           top: '34%',
           textStyle: {
-            fontSize: '22px',
+            fontSize: '18px',
             fontWeight: 'bold',
             color: '#333',
             fontFamily: 'DINAlternate-Bold, DINAlternate'
@@ -113,10 +113,10 @@ export default defineComponent({
           confine: true,
           borderWidth: 0,
           borderRadius: 6,
-          formatter: function(item: any){      
+          formatter: function (item: any) {
             return `<span style="display: inline-block;    vertical-align: middle;margin-right:4px;border-radius:50%;width:6px;height:6px;background:linear-gradient(${item.color.colorStops[0].color} 0%, ${item.color.colorStops[1].color} 100%);"></span>
             <span style="margin-right:10px; font-size:12px;color: #777;">${item.name}</span>
-            <span style="font-size:14px;color: #333;font-weight: bold;font-family: DINAlternate-Bold, DINAlternate;">${item.value}</span>`;       
+            <span style="font-size:14px;color: #333;font-weight: bold;font-family: DINAlternate-Bold, DINAlternate;">${item.value}</span>`;
           }
         },
         series: [
@@ -194,9 +194,7 @@ export default defineComponent({
           class={styles.attendanceContainer}>
           <div class={styles.attendanceEcharts} ref={echratsRef}></div>
           <div class={styles.tags}>
-            <div class={styles.unitTitle}>
-              (单位:  人次)
-            </div>
+            <div class={styles.unitTitle}>(单位: 人次)</div>
             {colors.map((item, index) => (
               <div class={styles.tag}>
                 <div

+ 8 - 5
src/views/home/contentItem.tsx

@@ -26,7 +26,7 @@ export default defineComponent({
       type: String,
       default: ''
     },
-    reloadTotal:{
+    reloadTotal: {
       type: Number,
       default: 0
     }
@@ -57,7 +57,7 @@ export default defineComponent({
           musicGradeDistributions,
           subjectGradeDistributions
         } = res.data;
-        data.gradeDistributions = gradeDistributions || []
+        data.gradeDistributions = gradeDistributions || [];
         data.subjectDistributions = subjectDistributions || [];
         data.musicGradeDistributions = musicGradeDistributions || [];
         data.subjectGradeDistributions = subjectGradeDistributions || [];
@@ -91,9 +91,12 @@ export default defineComponent({
       init();
     });
 
-    watch(() => reloadTotal.value, () => {
-      init();
-    })
+    watch(
+      () => reloadTotal.value,
+      () => {
+        init();
+      }
+    );
     return () => (
       <div>
         <CurrentStudent list={data.gradeDistributions} />