Skip to content

Commit 9a95b73

Browse files
jflin19990707jackjflin
andauthored
fix:TDDialog按钮文案溢出问题 (Tencent#772)
Co-authored-by: jackjflin <[email protected]>
1 parent cbc37cf commit 9a95b73

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tdesign-component/lib/src/components/button/td_button.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,9 @@ class _TDButtonState extends State<TDButton> {
250250
textColor: style.textColor ?? TDTheme.of(context).textColorPrimary,
251251
style: _textStyle,
252252
forceVerticalCenter: true,
253+
overflow: TextOverflow.ellipsis,
253254
);
254-
children.add(text);
255+
children.add(Flexible(child: text));
255256
}
256257
if (icon != null && widget.iconPosition == TDButtonIconPosition.right) {
257258
children.add(icon);

0 commit comments

Comments
 (0)