diff --git a/tdesign-component/example/assets/code/bottomTabBar._iconTextTypeTabBarOverflow.txt b/tdesign-component/example/assets/code/bottomTabBar._iconTextTypeTabBarOverflow.txt new file mode 100644 index 000000000..fc7f5675e --- /dev/null +++ b/tdesign-component/example/assets/code/bottomTabBar._iconTextTypeTabBarOverflow.txt @@ -0,0 +1,37 @@ + + Widget _iconTextTypeTabBarOverflow(BuildContext context) { + final selectedIcon = Icon( + TDIcons.app, + color: TDTheme.of(context).brandNormalColor, + ); + final unSelectedIcon = Icon( + TDIcons.app, + color: TDTheme.of(context).brandNormalColor, + ); + return TDBottomTabBar(TDBottomTabBarBasicType.iconText, useVerticalDivider: false, navigationTabs: [ + TDBottomTabBarTabConfig( + tabText: '标签', + selectedIcon: selectedIcon, + unselectedIcon: unSelectedIcon, + onTap: () { + onTapTab(context, '标签1'); + }, + ), + TDBottomTabBarTabConfig( + tabText: '标签', + selectedIcon: selectedIcon, + unselectedIcon: unSelectedIcon, + onTap: () { + onTapTab(context, '标签2'); + }, + ), + TDBottomTabBarTabConfig( + tabText: '标签', + selectedIcon: selectedIcon, + unselectedIcon: unSelectedIcon, + onTap: () { + onTapTab(context, '标签3'); + }, + ), + ]); + } \ No newline at end of file diff --git a/tdesign-component/example/assets/code/toast._preventTapToast.txt b/tdesign-component/example/assets/code/toast._preventTapToast.txt index 755b3ccae..ec34e51f7 100644 --- a/tdesign-component/example/assets/code/toast._preventTapToast.txt +++ b/tdesign-component/example/assets/code/toast._preventTapToast.txt @@ -3,7 +3,9 @@ return TDButton( onTap: () { TDToast.showText('轻提示文字内容', - context: context, preventTap: true); + context: context, + preventTap: true, + backgroundColor: Colors.black.withOpacity(0.7)); }, size: TDButtonSize.large, type: TDButtonType.outline, diff --git a/tdesign-site/src/toast/README.md b/tdesign-site/src/toast/README.md index 4d36098d0..6b6a37ae0 100644 --- a/tdesign-site/src/toast/README.md +++ b/tdesign-site/src/toast/README.md @@ -309,13 +309,13 @@ import 'package:tdesign_flutter/tdesign_flutter.dart'; | 名称 | 返回类型 | 参数 | 说明 | | --- | --- | --- | --- | -| showText | | required String? text, required BuildContext context, Duration duration, int? maxLines, BoxConstraints? constraints, bool? preventTap, | 普通文本Toast | -| showIconText | | required String? text, IconData? icon, IconTextDirection direction, required BuildContext context, Duration duration, bool? preventTap, | 带图标的Toast | -| showSuccess | | required String? text, IconTextDirection direction, required BuildContext context, Duration duration, bool? preventTap, | 成功提示Toast | -| showWarning | | required String? text, IconTextDirection direction, required BuildContext context, Duration duration, bool? preventTap, | 警告Toast | -| showFail | | required String? text, IconTextDirection direction, required BuildContext context, Duration duration, bool? preventTap, | 失败提示Toast | -| showLoading | | required BuildContext context, String? text, Duration duration, bool? preventTap, | 带文案的加载Toast | -| showLoadingWithoutText | | required BuildContext context, String? text, Duration duration, bool? preventTap, | 不带文案的加载Toast | +| showText | | required String? text, required BuildContext context, Duration duration, int? maxLines, BoxConstraints? constraints, bool? preventTap, Color? backgroundColor, | 普通文本Toast | +| showIconText | | required String? text, IconData? icon, IconTextDirection direction, required BuildContext context, Duration duration, bool? preventTap, Color? backgroundColor, | 带图标的Toast | +| showSuccess | | required String? text, IconTextDirection direction, required BuildContext context, Duration duration, bool? preventTap, Color? backgroundColor, | 成功提示Toast | +| showWarning | | required String? text, IconTextDirection direction, required BuildContext context, Duration duration, bool? preventTap, Color? backgroundColor, | 警告Toast | +| showFail | | required String? text, IconTextDirection direction, required BuildContext context, Duration duration, bool? preventTap, Color? backgroundColor, | 失败提示Toast | +| showLoading | | required BuildContext context, String? text, Duration duration, bool? preventTap, Color? backgroundColor, | 带文案的加载Toast | +| showLoadingWithoutText | | required BuildContext context, String? text, Duration duration, bool? preventTap, Color? backgroundColor, | 不带文案的加载Toast | | dismissLoading | | | 关闭加载Toast |