style(名字): 名字列按去掉 ks 前缀后的长度收窄,不再留一大块空
Deploy / deploy (push) Canceled after 0s

原来的定宽是按 ks2312李鑫楠 定的(110~170px),现在名字最长 4 个字(在读的班 423 人里 5 人)。
只放名字的列收到 80px 左右;混着几个班、名字后面还有班号的(全部提交、全服 / 年级排名、
卡点分析没选班时)108px,最宽的「翁鑫叶炫 2312」95px 也放得下。改了提交列表、排名赛道和周榜、
比赛排名和成绩、题单全班情况、数据统计、后台自学情况和卡点分析、请假名单

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
xuyueandClaude Opus 5.5 committed 2026-11-02 23:51:28 +08:00
1 parent dbb265b02f
commit 959c326bc9
14 files changed
+46 -22

No files matched your search

@@ -205,7 +205,7 @@ const links = computed(() => {
<div class="muted small">交得最多的</div>
<div class="names">
<div v-for="row in mostTries" :key="row.username" class="nrow">
<UserName :username="row.username" class="uname" />
<UserName :username="row.username" :class-name="className ? null : row.className" short-class class="uname" :class="{ 'with-class': !className }" />
<span class="num strong ntries">交了 {{ row.tries }} 次</span>
<span class="muted num">{{ gap(row.minutes) }}</span>
<span class="grow" />
@@ -243,7 +243,7 @@ const links = computed(() => {
</div>
<div class="names">
<div v-for="row in stuckStudents" :key="row.username" class="nrow">
<UserName :username="row.username" class="uname" />
<UserName :username="row.username" :class-name="className ? null : row.className" short-class class="uname" :class="{ 'with-class': !className }" />
<span class="muted num ntries">交了 {{ row.tries }} 次</span>
<span class="legend" :style="{ color: resultColor(row.lastResult) }">
<i :style="{ background: resultColor(row.lastResult) }" />{{ resultName(row.lastResult) }}
@@ -450,10 +450,14 @@ const links = computed(() => {
font-size: 13px;
min-width: 0;
}
/* 名字最长 4 个字;没选班(全部班级)时名字后面还有班号(2026-11 去掉 ks 前缀之前是按 ks2312李鑫楠 定的宽) */
.uname {
width: 110px;
width: 80px;
flex-shrink: 0;
}
.uname.with-class {
width: 108px;
}
.ntries {
width: 64px;
flex-shrink: 0;
@@ -22,7 +22,7 @@ const desktopColumns: DataTableColumn<LearnExerciseAttempt>[] = [
{
title: '学生',
key: 'username',
width: 140,
width: 100,
render: (row) => h(UserName, { username: row.username }),
},
{
+1 -1
View File
@@ -49,7 +49,7 @@ const desktopColumns: DataTableColumn<ProblemReader>[] = [
{
title: '学生',
key: 'username',
width: 150,
width: 100,
render: (row) => h(UserName, { username: row.username }),
},
{ title: '结果', key: 'result', width: 150, render: renderResult },
+3 -2
View File
@@ -503,8 +503,9 @@ onMounted(load)
padding-bottom: 6px;
border-top: 0;
}
/* 名字最长 4 个字,表头「每课打开过」5 个小字也放得下(2026-11 去掉 ks 前缀之前是按 ks2312李鑫楠 定的宽) */
.c-name {
width: 110px;
width: 80px;
flex-shrink: 0;
white-space: nowrap;
overflow: hidden;
@@ -756,7 +757,7 @@ onMounted(load)
position: sticky;
left: 0;
z-index: 1;
width: 96px;
width: 72px;
margin-left: -16px;
padding-left: 16px;
background: v-bind('theme.bodyColor');