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,),