Skip to content

Commit

Permalink
perf(score): 删除多余css
Browse files Browse the repository at this point in the history
  • Loading branch information
xixiIBN5100 committed Jan 21, 2025
1 parent c0986da commit 40b84f1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 29 deletions.
29 changes: 1 addition & 28 deletions src/pages/score/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -163,33 +163,6 @@ checkbox .wx-checkbox-input {
color: var(--wjh-color-week);
}

.score-bottom-panel {
.col {
text-align: center;
flex: auto;
}
.col-picker{
text-align: center;
flex: auto;
margin: 0 auto;
}

.col:first-child {
flex: 0 0 10%;
text-align: end;
}

.col:last-child {
flex: 0 0 20%;
text-align: start;
}

.sort-button {
padding: 5Px;
}

}

.score-bottom-panel {
.col {
text-align: center;
Expand All @@ -211,7 +184,7 @@ checkbox .wx-checkbox-input {
justify-content: center; /* 垂直居中对齐 */
gap: 8px; /* 可选,控制图标和文本之间的间距 */
}

.col:first-child {
flex: 0 0 20%;
text-align: end;
Expand Down
2 changes: 1 addition & 1 deletion src/pages/score/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,7 @@ const averageScorePoint = computed(() => {
validCourse.forEach((item: Score) => {
const scorePoint = parseFloat(item.scorePoint);
const credits = parseFloat(item.credits);
// 以 "1/1000 分" 为单位计算绩点,避免浮点数加法导致的精度问题
totalScorePoint += (scorePoint * credits * 1000);
totalCredits += credits;
});
Expand Down Expand Up @@ -808,5 +809,4 @@ async function termChanged(e) {
isRefreshing.value = false;
}
</script>

0 comments on commit 40b84f1

Please sign in to comment.