From 1c841ea4da9e2b24b76d3df39c7f061ddbb171cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AD=90=E8=B4=A4?= Date: Wed, 26 Nov 2025 18:33:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=BA=A2=E5=A8=98=E7=AD=89?= =?UTF-8?q?=E7=BA=A7=EF=BC=8C=E5=A2=9E=E5=8A=A0=E6=98=B5=E7=A7=B0=E6=9C=80?= =?UTF-8?q?=E5=A4=A7=E5=AE=BD=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/mine/mine_page.dart | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/lib/pages/mine/mine_page.dart b/lib/pages/mine/mine_page.dart index 9ff3512..cbfa843 100644 --- a/lib/pages/mine/mine_page.dart +++ b/lib/pages/mine/mine_page.dart @@ -99,12 +99,19 @@ class _MinePageState extends State with AutomaticKeepAliveClientMixin{ children: [ Row( children: [ - Text( - "${controller.userData.value?.nickName ?? ""}", - style: TextStyle( - fontSize: 18.w, - color: const Color.fromRGBO(51, 51, 51, 1), - fontWeight: FontWeight.w700 + ConstrainedBox( + constraints: BoxConstraints( + maxWidth: 120.w, // 最大宽度 + ), + child: Text( + "${controller.userData.value?.nickName ?? ""}", + maxLines: 1, + overflow: TextOverflow.ellipsis, + style: TextStyle( + fontSize: 18.w, + color: const Color.fromRGBO(51, 51, 51, 1), + fontWeight: FontWeight.w700 + ), ), ), SizedBox(width: 8.w,),