Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 优化了绩点计算器在计算状态下课程按钮的显示 #179

Merged
merged 4 commits into from
Jan 20, 2025

Conversation

luolananDR
Copy link
Contributor

No description provided.

@@ -109,7 +109,7 @@

<w-collapse-panel
v-for="item in unSelectedLessonsList"
:key="item.lessonID"
:key="item.className"
Copy link
Collaborator

@j10ccc j10ccc Jan 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里没有写明白。对于大学这么多节体育课,他们的 lessonID 都是一样的,并且 lessonName 也一样。你选了 className 作为 key,大部分场景下体育课确实不一样,但不保证有人两个学期都选了同一天的,同老师的体育课,className 还是会相同。根本原因就是 key 不唯一。

key 最好是 submitTimelessonID 组成,前者大概率保证唯一性,后者是拿 ID 字段让代码更可读。

代码里面顺便加个注释吧,把这个 key 的取值讲清楚

@j10ccc j10ccc changed the title pref:优化了绩点计算器在计算状态下课程按钮的显示 pref: 优化了绩点计算器在计算状态下课程按钮的显示 Jan 20, 2025
@j10ccc j10ccc changed the title pref: 优化了绩点计算器在计算状态下课程按钮的显示 fix: 优化了绩点计算器在计算状态下课程按钮的显示 Jan 20, 2025
@j10ccc j10ccc merged commit 8d4f119 into zjutjh:release/feat/score-calculator Jan 20, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants