From 329ebd863357ea335d1412a0472894eedbcaa12e Mon Sep 17 00:00:00 2001 From: AoXuan Date: Tue, 2 Sep 2025 00:54:30 +0800 Subject: [PATCH] =?UTF-8?q?refactor(Scripts,=20ScriptTable,=20UserEdit):?= =?UTF-8?q?=20=E6=B8=85=E7=90=86=E4=B8=80=E4=B8=8B=E6=97=A0=E7=94=A8css?= =?UTF-8?q?=EF=BC=8C=E8=B0=83=E6=95=B4=E9=83=A8=E5=88=86=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/ScriptTable.vue | 14 ++++- frontend/src/views/Scripts.vue | 49 ----------------- frontend/src/views/UserEdit.vue | 72 +++++++++++++------------ 3 files changed, 50 insertions(+), 85 deletions(-) diff --git a/frontend/src/components/ScriptTable.vue b/frontend/src/components/ScriptTable.vue index ad5769c..e202d88 100644 --- a/frontend/src/components/ScriptTable.vue +++ b/frontend/src/components/ScriptTable.vue @@ -146,7 +146,7 @@ : 'orange' " > - 剩余: + 剩余天数: {{ user.Info.RemainedDay < 1 ? '长期有效' : user.Info.RemainedDay + '天' }} @@ -210,6 +210,13 @@ > 剩余关卡: {{ user.Info.Stage_Remain }} + + + 备注: {{ truncateText(user.Info.Notes) }} + @@ -374,6 +381,11 @@ function get_annihilation_name(annihilation_name) { } return '未开启' } + +const truncateText = (text: string, maxLength: number = 20): string => { + if (!text) return '' + return text.length > maxLength ? text.substring(0, maxLength) + '...' : text +}