From 6b7214909fc4b80c4768041da42bb504479d553d Mon Sep 17 00:00:00 2001 From: george Date: Thu, 8 Jan 2026 01:43:42 +0800 Subject: [PATCH 1/9] =?UTF-8?q?feat:=E4=BC=98=E5=8C=96=E6=A0=87=E9=A2=98?= =?UTF-8?q?=E6=A0=8F=E8=BF=94=E5=9B=9E=E5=9B=BE=E6=A0=87=20=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E6=9A=97=E9=BB=91=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tdesign-component/lib/src/components/navbar/td_nav_bar.dart | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tdesign-component/lib/src/components/navbar/td_nav_bar.dart b/tdesign-component/lib/src/components/navbar/td_nav_bar.dart index 9c5cfcf7c..b97790320 100644 --- a/tdesign-component/lib/src/components/navbar/td_nav_bar.dart +++ b/tdesign-component/lib/src/components/navbar/td_nav_bar.dart @@ -11,6 +11,7 @@ class TDNavBar extends StatefulWidget implements PreferredSizeWidget { this.titleWidget, this.title, this.titleColor, + this.backIconColor, this.titleFont, this.titleFontFamily, this.titleFontWeight = FontWeight.w500, @@ -30,6 +31,9 @@ class TDNavBar extends StatefulWidget implements PreferredSizeWidget { this.flexibleSpace, }) : super(key: key); + /// 左边返回图标颜色 + final Color? backIconColor; + /// 左边操作项 final List? leftBarItems; @@ -139,9 +143,11 @@ class _TDNavBarState extends State { } Widget get backButton { + var iconColor = widget.backIconColor ?? TDTheme.of(context).textColorPrimary; return TDNavBarItem( icon: TDIcons.chevron_left, iconSize: 28.0, + iconColor: iconColor, action: () { widget.onBack?.call(); Navigator.maybePop(context); From d4e4dae26585a94f82be3288c3de8c98ea18e729 Mon Sep 17 00:00:00 2001 From: george Date: Sun, 18 Jan 2026 01:02:20 +0800 Subject: [PATCH 2/9] =?UTF-8?q?feat=EF=BC=9A=E6=9B=B4=E6=8D=A2=E4=B8=BB?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/src/theme/td_default_theme.dart | 60 +++++++++---------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/tdesign-component/lib/src/theme/td_default_theme.dart b/tdesign-component/lib/src/theme/td_default_theme.dart index c69dcebf0..5dd9153f1 100644 --- a/tdesign-component/lib/src/theme/td_default_theme.dart +++ b/tdesign-component/lib/src/theme/td_default_theme.dart @@ -55,16 +55,16 @@ class TDDefaultTheme { "componentBorderColor": "grayColor4" }, "color": { - "brandColor1": "#f2f3ff", - "brandColor2": "#d9e1ff", - "brandColor3": "#b5c7ff", - "brandColor4": "#8eabff", - "brandColor5": "#618dff", - "brandColor6": "#366ef4", - "brandColor7": "#0052d9", - "brandColor8": "#003cab", - "brandColor9": "#002a7c", - "brandColor10": "#001a57", + "brandColor1": "#F5F5F5", + "brandColor2": "#E0E0E0", + "brandColor3": "#BDBDBD", + "brandColor4": "#9E9E9E", + "brandColor5": "#757575", + "brandColor6": "#616161", + "brandColor7": "#424242", + "brandColor8": "#212121", + "brandColor9": "#1A1A1A", + "brandColor10": "#000000", "warningColor1": "#fff1e9", "warningColor2": "#ffd9c2", "warningColor3": "#ffb98c", @@ -392,16 +392,16 @@ class TDDefaultTheme { "componentBorderColor": "grayColor9" }, "color": { - "brandColor1": "#1b2f51", - "brandColor2": "#173463", - "brandColor3": "#143975", - "brandColor4": "#103d88", - "brandColor5": "#0d429a", - "brandColor6": "#054bbe", - "brandColor7": "#2667d4", - "brandColor8": "#4582e6", - "brandColor9": "#699ef5", - "brandColor10": "#96bbf8", + "brandColor1": "#1A1A1A", + "brandColor2": "#2A2A2A", + "brandColor3": "#3A3A3A", + "brandColor4": "#4A4A4A", + "brandColor5": "#6A6A6A", + "brandColor6": "#8A8A8A", + "brandColor7": "#A0A0A0", + "brandColor8": "#B0B0B0", + "brandColor9": "#CFCFCF", + "brandColor10": "#E5E5E5", "warningColor1": "#4f2a1d", "warningColor2": "#582f21", "warningColor3": "#733c23", @@ -571,7 +571,7 @@ class TDDefaultTheme { "shadow": { "shadowsBase": [ { - "color": "#0D000000", + "color": "#1A000000", "blurRadius": 10, "spreadRadius": 1, "offset": { @@ -580,7 +580,7 @@ class TDDefaultTheme { } }, { - "color": "#14000000", + "color": "#1F000000", "blurRadius": 5, "spreadRadius": 1, "offset": { @@ -589,7 +589,7 @@ class TDDefaultTheme { } }, { - "color": "#1F000000", + "color": "#29000000", "blurRadius": 4, "spreadRadius": -1, "offset": { @@ -600,7 +600,7 @@ class TDDefaultTheme { ], "shadowsMiddle": [ { - "color": "#0D000000", + "color": "#1A000000", "blurRadius": 14, "spreadRadius": 2, "offset": { @@ -609,7 +609,7 @@ class TDDefaultTheme { } }, { - "color": "#0F000000", + "color": "#1F000000", "blurRadius": 10, "spreadRadius": 1, "offset": { @@ -618,7 +618,7 @@ class TDDefaultTheme { } }, { - "color": "#1A000000", + "color": "#24000000", "blurRadius": 5, "spreadRadius": -3, "offset": { @@ -629,7 +629,7 @@ class TDDefaultTheme { ], "shadowsTop": [ { - "color": "#0D000000", + "color": "#1A000000", "blurRadius": 30, "spreadRadius": 5, "offset": { @@ -638,7 +638,7 @@ class TDDefaultTheme { } }, { - "color": "#0A000000", + "color": "#14000000", "blurRadius": 24, "spreadRadius": 2, "offset": { @@ -647,7 +647,7 @@ class TDDefaultTheme { } }, { - "color": "#14000000", + "color": "#1F000000", "blurRadius": 10, "spreadRadius": -5, "offset": { @@ -673,4 +673,4 @@ class TDDefaultTheme { } } '''; -} +} \ No newline at end of file From 05171967c36932d26b1f3ce8de2840b584f630f3 Mon Sep 17 00:00:00 2001 From: george Date: Sun, 18 Jan 2026 02:00:13 +0800 Subject: [PATCH 3/9] =?UTF-8?q?feat=EF=BC=9A=E6=9B=B4=E6=8D=A2=E4=B8=BB?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tdesign-component/lib/src/theme/td_default_theme.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tdesign-component/lib/src/theme/td_default_theme.dart b/tdesign-component/lib/src/theme/td_default_theme.dart index 5dd9153f1..52997bf0b 100644 --- a/tdesign-component/lib/src/theme/td_default_theme.dart +++ b/tdesign-component/lib/src/theme/td_default_theme.dart @@ -61,8 +61,8 @@ class TDDefaultTheme { "brandColor4": "#9E9E9E", "brandColor5": "#757575", "brandColor6": "#616161", - "brandColor7": "#424242", - "brandColor8": "#212121", + "brandColor7": "#1A1A1A", + "brandColor8": "#000000", "brandColor9": "#1A1A1A", "brandColor10": "#000000", "warningColor1": "#fff1e9", @@ -95,8 +95,8 @@ class TDDefaultTheme { "successColor8": "#005334", "successColor9": "#003b23", "successColor10": "#002515", - "grayColor1": "#f3f3f3", - "grayColor2": "#eeeeee", + "grayColor1": "#FAFAFA", + "grayColor2": "#F5F5F5", "grayColor3": "#e8e8e8", "grayColor4": "#dddddd", "grayColor5": "#c6c6c6", From 72fb24fa65702b01e4d4c0a302a7fac9d222d8dd Mon Sep 17 00:00:00 2001 From: george Date: Sun, 18 Jan 2026 02:02:45 +0800 Subject: [PATCH 4/9] =?UTF-8?q?feat=EF=BC=9A=E6=9B=B4=E6=8D=A2=E4=B8=BB?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tdesign-component/lib/src/theme/td_default_theme.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tdesign-component/lib/src/theme/td_default_theme.dart b/tdesign-component/lib/src/theme/td_default_theme.dart index 52997bf0b..ea5715cb2 100644 --- a/tdesign-component/lib/src/theme/td_default_theme.dart +++ b/tdesign-component/lib/src/theme/td_default_theme.dart @@ -95,8 +95,8 @@ class TDDefaultTheme { "successColor8": "#005334", "successColor9": "#003b23", "successColor10": "#002515", - "grayColor1": "#FAFAFA", - "grayColor2": "#F5F5F5", + "grayColor1": "#FFFFFF", + "grayColor2": "#FAFAFA", "grayColor3": "#e8e8e8", "grayColor4": "#dddddd", "grayColor5": "#c6c6c6", From 49089d4ddbfc9f26d8c5d6d4a0372c1d2a67ef00 Mon Sep 17 00:00:00 2001 From: george Date: Sun, 18 Jan 2026 03:22:58 +0800 Subject: [PATCH 5/9] =?UTF-8?q?feat=EF=BC=9A=E6=9B=B4=E6=8D=A2=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E7=9A=84=E4=B8=BB=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/src/components/button/td_button_style.dart | 6 +++--- tdesign-component/lib/src/theme/td_colors.dart | 11 +++++++++++ tdesign-component/lib/src/theme/td_default_theme.dart | 10 ++++++++-- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/tdesign-component/lib/src/components/button/td_button_style.dart b/tdesign-component/lib/src/components/button/td_button_style.dart index 70c949bdd..5d852689e 100644 --- a/tdesign-component/lib/src/components/button/td_button_style.dart +++ b/tdesign-component/lib/src/components/button/td_button_style.dart @@ -30,7 +30,7 @@ class TDButtonStyle { BuildContext context, TDButtonTheme? theme, TDButtonStatus status) { switch (theme) { case TDButtonTheme.primary: - textColor = TDTheme.of(context).textColorAnti; + textColor = TDTheme.of(context).primaryBtnTextColor; backgroundColor = _getBrandColor(context, status); break; case TDButtonTheme.danger: @@ -176,7 +176,7 @@ class TDButtonStyle { Color _getDefaultBgColor(BuildContext context, TDButtonStatus status) { switch (status) { case TDButtonStatus.defaultState: - return TDTheme.of(context).bgColorComponent; + return TDTheme.of(context).defaultBtnBgColor; case TDButtonStatus.active: return TDTheme.of(context).bgColorComponentHover; case TDButtonStatus.disable: @@ -188,7 +188,7 @@ class TDButtonStyle { switch (status) { case TDButtonStatus.defaultState: case TDButtonStatus.active: - return TDTheme.of(context).textColorPrimary; + return TDTheme.of(context).defaultBtnTextColor; case TDButtonStatus.disable: return TDTheme.of(context).textDisabledColor; } diff --git a/tdesign-component/lib/src/theme/td_colors.dart b/tdesign-component/lib/src/theme/td_colors.dart index 6c8dcdaef..391e6ed52 100644 --- a/tdesign-component/lib/src/theme/td_colors.dart +++ b/tdesign-component/lib/src/theme/td_colors.dart @@ -332,4 +332,15 @@ extension TDColors on TDThemeData { Color get textColorBrand => colorMap['textColorBrand'] ?? brandNormalColor; Color get textColorLink => colorMap['textColorLink'] ?? brandNormalColor; + + /// DefaultTheme 按钮专用颜色-------------------------------------------- + + /// 默认按钮背景色:日间模式深色(#E8E8E8),暗黑模式更亮(#5E5E5E) + Color get defaultBtnBgColor => colorMap['defaultBtnBgColor'] ?? grayColor3; + + /// 默认按钮文字色:日间模式白色,暗黑模式黑色 + Color get defaultBtnTextColor => colorMap['defaultBtnTextColor'] ?? fontGyColor1; + + /// Primary 按钮文字色:日间模式白色,暗黑模式黑色 + Color get primaryBtnTextColor => colorMap['primaryBtnTextColor'] ?? whiteColor1; } diff --git a/tdesign-component/lib/src/theme/td_default_theme.dart b/tdesign-component/lib/src/theme/td_default_theme.dart index ea5715cb2..d92f45e22 100644 --- a/tdesign-component/lib/src/theme/td_default_theme.dart +++ b/tdesign-component/lib/src/theme/td_default_theme.dart @@ -120,7 +120,10 @@ class TDDefaultTheme { "bgColorContainer": "#ffffff", "bgColorContainerSelect": "#ffffff", "bgColorSpecialComponent": "#ffffff", - "textColorAnti": "#ffffff" + "textColorAnti": "#ffffff", + "defaultBtnBgColor": "#E8E8E8", + "defaultBtnTextColor": "#000000", + "primaryBtnTextColor": "#FFFFFF" }, "font": { "fontDisplayLarge": { @@ -454,7 +457,10 @@ class TDDefaultTheme { "fontGyColor2": "#99000000", "fontGyColor3": "#66000000", "fontGyColor4": "#42000000", - "textColorAnti": "#ffffff" + "textColorAnti": "#ffffff", + "defaultBtnBgColor": "#5E5E5E", + "defaultBtnTextColor": "#000000", + "primaryBtnTextColor": "#000000" }, "font": { "fontDisplayLarge": { From e08f7bdbbf9fb13b0fad69d52b5940b991a639cf Mon Sep 17 00:00:00 2001 From: george Date: Sun, 18 Jan 2026 03:28:14 +0800 Subject: [PATCH 6/9] =?UTF-8?q?feat=EF=BC=9A=E6=9B=B4=E6=8D=A2=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E7=9A=84=E4=B8=BB=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/src/components/button/td_button_style.dart | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tdesign-component/lib/src/components/button/td_button_style.dart b/tdesign-component/lib/src/components/button/td_button_style.dart index 5d852689e..bb5707c7b 100644 --- a/tdesign-component/lib/src/components/button/td_button_style.dart +++ b/tdesign-component/lib/src/components/button/td_button_style.dart @@ -31,7 +31,7 @@ class TDButtonStyle { switch (theme) { case TDButtonTheme.primary: textColor = TDTheme.of(context).primaryBtnTextColor; - backgroundColor = _getBrandColor(context, status); + backgroundColor = _getFillBrandColor(context, status); break; case TDButtonTheme.danger: textColor = TDTheme.of(context).textColorAnti; @@ -152,6 +152,17 @@ class TDButtonStyle { } } + Color _getFillBrandColor(BuildContext context, TDButtonStatus status) { + switch (status) { + case TDButtonStatus.defaultState: + return TDTheme.of(context).defaultBtnBgColor; + case TDButtonStatus.active: + return TDTheme.of(context).brandClickColor; + case TDButtonStatus.disable: + return TDTheme.of(context).brandDisabledColor; + } + } + Color _getLightColor(BuildContext context, TDButtonStatus status) { switch (status) { case TDButtonStatus.defaultState: From c3c2b4164bb7df4f969a09f9268b76ef5132e7e9 Mon Sep 17 00:00:00 2001 From: george Date: Sun, 18 Jan 2026 03:33:25 +0800 Subject: [PATCH 7/9] =?UTF-8?q?feat=EF=BC=9A=E6=9B=B4=E6=8D=A2=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E7=9A=84=E4=B8=BB=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/src/components/button/td_button_style.dart | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/tdesign-component/lib/src/components/button/td_button_style.dart b/tdesign-component/lib/src/components/button/td_button_style.dart index bb5707c7b..ef103ff3d 100644 --- a/tdesign-component/lib/src/components/button/td_button_style.dart +++ b/tdesign-component/lib/src/components/button/td_button_style.dart @@ -31,7 +31,7 @@ class TDButtonStyle { switch (theme) { case TDButtonTheme.primary: textColor = TDTheme.of(context).primaryBtnTextColor; - backgroundColor = _getFillBrandColor(context, status); + backgroundColor = _getBrandColor(context, status); break; case TDButtonTheme.danger: textColor = TDTheme.of(context).textColorAnti; @@ -152,16 +152,6 @@ class TDButtonStyle { } } - Color _getFillBrandColor(BuildContext context, TDButtonStatus status) { - switch (status) { - case TDButtonStatus.defaultState: - return TDTheme.of(context).defaultBtnBgColor; - case TDButtonStatus.active: - return TDTheme.of(context).brandClickColor; - case TDButtonStatus.disable: - return TDTheme.of(context).brandDisabledColor; - } - } Color _getLightColor(BuildContext context, TDButtonStatus status) { switch (status) { From 5f9c5a54c0a1e301c3a7ef6e67deba46f411eb04 Mon Sep 17 00:00:00 2001 From: george Date: Fri, 27 Feb 2026 21:25:41 +0800 Subject: [PATCH 8/9] =?UTF-8?q?feat=EF=BC=9Ainput=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20minLines=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tdesign-component/example/lib/page/td_input_page.dart | 1 + tdesign-component/lib/src/components/input/td_input.dart | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/tdesign-component/example/lib/page/td_input_page.dart b/tdesign-component/example/lib/page/td_input_page.dart index a1677427f..0d3b1ba88 100644 --- a/tdesign-component/example/lib/page/td_input_page.dart +++ b/tdesign-component/example/lib/page/td_input_page.dart @@ -641,6 +641,7 @@ class _TDInputViewPageState extends State { color: TDTheme.of(context).textColorPrimary, ), maxLines: 2, + minLines: 1, ); } diff --git a/tdesign-component/lib/src/components/input/td_input.dart b/tdesign-component/lib/src/components/input/td_input.dart index ec4ed5418..e492b6c50 100644 --- a/tdesign-component/lib/src/components/input/td_input.dart +++ b/tdesign-component/lib/src/components/input/td_input.dart @@ -41,6 +41,7 @@ class TDInput extends StatelessWidget { this.inputFormatters, this.inputDecoration, this.maxLines = 1, + this.minLines = 1, this.focusNode, this.controller, this.cursorColor, @@ -121,6 +122,9 @@ class TDInput extends StatelessWidget { /// 最大输入行数 final int maxLines; + /// 最小输入行数 + final int minLines; + /// 获取或者取消焦点使用 final FocusNode? focusNode; @@ -410,6 +414,7 @@ class TDInput extends StatelessWidget { inputFormatters: inputFormatters, inputDecoration: inputDecoration, maxLines: maxLines, + minLines: minLines, maxLength: maxLength, focusNode: focusNode, isCollapsed: true, @@ -646,6 +651,7 @@ class TDInput extends StatelessWidget { inputDecoration: inputDecoration, isCollapsed: true, maxLines: maxLines, + minLines: minLines, focusNode: focusNode, hintTextStyle: hintTextStyle ?? TextStyle( @@ -770,6 +776,7 @@ class TDInput extends StatelessWidget { [LengthLimitingTextInputFormatter(maxLength)], inputDecoration: inputDecoration, maxLines: maxLines, + minLines: minLines, focusNode: focusNode, hintTextStyle: hintTextStyle ?? TextStyle(color: TDTheme.of(context).textColorPlaceholder), @@ -856,6 +863,7 @@ class TDInput extends StatelessWidget { inputFormatters: inputFormatters, inputDecoration: inputDecoration, maxLines: maxLines, + minLines: minLines, focusNode: focusNode, isCollapsed: true, hintTextStyle: hintTextStyle ?? From 01e0271b5359dd7ef75b26a92e7089eb7cf18a01 Mon Sep 17 00:00:00 2001 From: george Date: Sun, 1 Mar 2026 16:19:27 +0800 Subject: [PATCH 9/9] =?UTF-8?q?feat=EF=BC=9A=E4=BF=AE=E6=94=B9=E5=A4=B4?= =?UTF-8?q?=E5=83=8F=E5=A4=A7=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tdesign-component/lib/src/components/avatar/td_avatar.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tdesign-component/lib/src/components/avatar/td_avatar.dart b/tdesign-component/lib/src/components/avatar/td_avatar.dart index 5a61b0137..bd59da21c 100644 --- a/tdesign-component/lib/src/components/avatar/td_avatar.dart +++ b/tdesign-component/lib/src/components/avatar/td_avatar.dart @@ -85,13 +85,13 @@ class TDAvatar extends StatelessWidget { double width; switch (size) { case TDAvatarSize.large: - width = 64; + width = 48; break; case TDAvatarSize.medium: - width = 48; + width = 36; break; case TDAvatarSize.small: - width = 40; + width = 24; break; } return avatarSize ?? width;