Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
f790dba
refactor(popup): reimplement `popup`
RSS1102 May 21, 2026
2e5ee23
[autofix.ci] apply automated fixes
autofix-ci[bot] May 21, 2026
f183a4c
feat(popup): enhance TPopup functionality and documentation
RSS1102 May 21, 2026
6bd530b
[autofix.ci] apply automated fixes
autofix-ci[bot] May 21, 2026
e16e6fa
refactor(popup): update TPopup implementation and remove deprecated d…
RSS1102 May 21, 2026
0609d89
[autofix.ci] apply automated fixes
autofix-ci[bot] May 21, 2026
8b68556
refactor(popup): update TPopup usage across multiple components to us…
RSS1102 May 22, 2026
205a450
refactor(popup): improve parameter validation and update title handli…
RSS1102 May 22, 2026
56fab62
refactor(popup): streamline TPopupOptions usage by replacing placemen…
RSS1102 May 22, 2026
9fe6695
docs(popup): update TPopup command to include TPopupHandle and improv…
RSS1102 May 22, 2026
d0854fc
[autofix.ci] apply automated fixes
autofix-ci[bot] May 22, 2026
b6e6206
refactor(popup): replace titleBuilder with titleWidget in TPopup opti…
RSS1102 May 25, 2026
7b026a7
refactor(popup): update TPopupTrigger values for consistency across c…
RSS1102 May 25, 2026
3ecbfe7
refactor(popup): replace margin with inset parameters in TPopup optio…
RSS1102 May 25, 2026
235f250
refactor(popup): update TPopup and _PopupTracker to allow multiple ha…
RSS1102 May 25, 2026
e1f697c
refactor(popup): replace titleBuilder with titleWidget in multiple po…
RSS1102 May 25, 2026
37f5d7f
docs(popup): enhance documentation and improve close behavior in TPop…
RSS1102 May 25, 2026
91a4a39
refactor(popup): rename `duration` to `animationDuration` in TPopup o…
RSS1102 May 26, 2026
0fd36c2
fix(popup): demo error
RSS1102 May 26, 2026
145f9c0
[autofix.ci] apply automated fixes
autofix-ci[bot] May 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,476 changes: 1,354 additions & 1,122 deletions tdesign-component/coverage/lcov.info

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tdesign-component/demo_tool/all_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ dart run tdesign_flutter_tools:main generate --folder "$PARENT_DIR/lib/src/compo
# popover
dart run tdesign_flutter_tools:main generate --folder "$PARENT_DIR/lib/src/components/popover" --name TPopover,TPopoverWidget --folder-name popover --output "$PARENT_DIR/example/assets/api/" --only-api --get-comments
# popup
dart run tdesign_flutter_tools:main generate --folder "$PARENT_DIR/lib/src/components/popup" --name TSlidePopupRoute,TPopupBottomDisplayPanel,TPopupBottomConfirmPanel,TPopupCenterPanel --folder-name popup --output "$PARENT_DIR/example/assets/api/" --only-api --get-comments
dart run tdesign_flutter_tools:main generate --folder "$PARENT_DIR/lib/src/components/popup" --name TPopup,TPopupOptions,TPopupHandle,TPopupPlacement,TPopupTrigger --folder-name popup --output "$PARENT_DIR/example/assets/api/" --only-api --get-comments
# refresh
dart run tdesign_flutter_tools:main generate --file "$PARENT_DIR/lib/src/components/refresh/t_refresh_header.dart" --name TRefreshHeader --folder-name pull-down-refresh --output "$PARENT_DIR/example/assets/api/" --only-api --get-comments
# swipecell
Expand Down
56 changes: 42 additions & 14 deletions tdesign-component/example/assets/api/action-sheet_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,12 @@
| badge | TBadge? | - | 角标 |
| description | String? | - | 描述信息 |
| disabled | bool | false | 是否禁用 |
| group | String? | - | 分组,用于带描述多行滚动宫格 |
| group | String? | - | 分组,用于带描述多行滚动宫格 当[TActionSheet.theme]等于[TActionSheetTheme.group]时有效 有效时,如果该值未配置整个[TActionSheetItem]会被忽略,即不会展示 |
| icon | Widget? | - | 图标 |
| iconSize | double? | - | 图标大小 |
| label | String | - | 标题 |
| textStyle | TextStyle? | - | 标题样式 |

```
```

### TActionSheet
#### 简介
Expand All @@ -25,23 +23,23 @@

| 参数 | 类型 | 默认值 | 说明 |
| --- | --- | --- | --- |
| context | BuildContext | - | 上下文 |
| align | TActionSheetAlign | TActionSheetAlign.center | 对齐方式 |
| cancelText | String? | - | 取消按钮的文本 |
| closeOnOverlayClick | bool | true | 点击蒙层时是否关闭 |
| context | BuildContext | context | 上下文 |
| count | int | 8 | 每页显示的项目数 |
| description | String? | - | 描述文本 |
| itemHeight | double | 96.0 | 项目的行高 |
| itemMinWidth | double | 80.0 | 项目的最小宽度 |
| count | int | 8 | 每页显示的项目数 当[theme]等于[TActionSheetTheme.grid]且[showPagination]为true时有效 |
| description | String? | - | 描述文本 当[theme]等于[TActionSheetTheme.grid]或[theme]等于[TActionSheetTheme.list]时有效 |
| itemHeight | double | 96.0 | 项目的行高 当[theme]等于[TActionSheetTheme.grid]或[theme]等于[TActionSheetTheme.group]时有效 |
| itemMinWidth | double | 80.0 | 项目的最小宽度 当[theme]等于[TActionSheetTheme.grid]且[scrollable]为true时有效 或当[theme]等于[TActionSheetTheme.group]时有效 |
| items | List<TActionSheetItem> | - | ActionSheet的项目列表 |
| onCancel | VoidCallback? | - | 取消按钮的回调函数 |
| onClose | VoidCallback? | - | 关闭时的回调函数 |
| onSelected | TActionSheetItemCallback? | - | 选择项目时的回调函数 |
| rows | int | 2 | 显示的行数 |
| scrollable | bool | false | 是否可以横向滚动 |
| rows | int | 2 | 显示的行数 当[theme]等于[TActionSheetTheme.grid]时有效 |
| scrollable | bool | false | 是否可以横向滚动 当[theme]等于[TActionSheetTheme.grid]且[showPagination]为false时有效 |
| showCancel | bool | true | 是否显示取消按钮 |
| showOverlay | bool | true | 是否显示遮罩层 |
| showPagination | bool | false | 是否显示分页 |
| showPagination | bool | false | 是否显示分页 当[theme]等于[TActionSheetTheme.grid]时有效 |
| theme | TActionSheetTheme | TActionSheetTheme.list | 主题样式 |
| useSafeArea | bool | true | 使用安全区域 |
| visible | bool | false | 是否立即显示 |
Expand All @@ -51,6 +49,36 @@

| 名称 | 返回类型 | 参数 | 说明 |
| --- | --- | --- | --- |
| showGridActionSheet | | required BuildContext context, required List<TActionSheetItem> items, TActionSheetAlign align, String? cancelText, bool showCancel, TActionSheetItemCallback? onSelected, bool showOverlay, bool closeOnOverlayClick, int count, int rows, double itemHeight, double itemMinWidth, bool scrollable, bool showPagination, VoidCallback? onCancel, String? description, VoidCallback? onClose, bool useSafeArea, | 显示宫格类型面板 |
| showGroupActionSheet | | required BuildContext context, required List<TActionSheetItem> items, TActionSheetAlign align, String? cancelText, bool showCancel, TActionSheetItemCallback? onSelected, bool showOverlay, bool closeOnOverlayClick, double itemHeight, double itemMinWidth, VoidCallback? onCancel, VoidCallback? onClose, bool useSafeArea, | 显示分组类型面板 |
| showListActionSheet | | required BuildContext context, required List<TActionSheetItem> items, TActionSheetAlign align, String? cancelText, bool showCancel, VoidCallback? onCancel, TActionSheetItemCallback? onSelected, bool showOverlay, bool closeOnOverlayClick, VoidCallback? onClose, bool useSafeArea, | 显示列表类型面板 |
| showGridActionSheet | void | required BuildContext context, required List<TActionSheetItem> items, TActionSheetAlign align, String? cancelText, bool showCancel, TActionSheetItemCallback? onSelected, bool showOverlay, bool closeOnOverlayClick, int count, int rows, double itemHeight, double itemMinWidth, bool scrollable, bool showPagination, VoidCallback? onCancel, String? description, VoidCallback? onClose, bool useSafeArea | 显示宫格类型面板 |
| showGroupActionSheet | void | required BuildContext context, required List<TActionSheetItem> items, TActionSheetAlign align, String? cancelText, bool showCancel, TActionSheetItemCallback? onSelected, bool showOverlay, bool closeOnOverlayClick, double itemHeight, double itemMinWidth, VoidCallback? onCancel, VoidCallback? onClose, bool useSafeArea | 显示分组类型面板 |
| showListActionSheet | void | required BuildContext context, required List<TActionSheetItem> items, TActionSheetAlign align, String? cancelText, bool showCancel, VoidCallback? onCancel, TActionSheetItemCallback? onSelected, bool showOverlay, bool closeOnOverlayClick, VoidCallback? onClose, bool useSafeArea | 显示列表类型面板 |


### TActionSheetTheme
#### 枚举值


| 名称 | 说明 |
| --- | --- |
| list | - |
| grid | - |
| group | - |


### TActionSheetAlign
#### 枚举值


| 名称 | 说明 |
| --- | --- |
| center | - |
| left | - |
| right | - |


### TActionSheetItemCallback
#### 类型定义

```dart
typedef TActionSheetItemCallback = void Function(TActionSheetItem item, int index);
```
38 changes: 36 additions & 2 deletions tdesign-component/example/assets/api/avatar_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,44 @@
| displayText | String? | - | 纯展示类型末尾文字 |
| fit | BoxFit? | - | 自定义图片对齐方式 |
| icon | IconData? | - | 自定义图标 |
| key | | - | |
| onTap | Function()? | - | 操作点击事件 |
| key | Key? | - | 组件标识,用于区分或保留组件状态。 |
| onTap | Function()? | - | 操作点击事件 |
| radius | double? | - | 自定义圆角 |
| shape | TAvatarShape | TAvatarShape.circle | 头像形状 |
| size | TAvatarSize | TAvatarSize.medium | 头像尺寸 |
| text | String? | - | 自定义文字 |
| type | TAvatarType | TAvatarType.normal | 头像类型 |


### TAvatarSize
#### 枚举值


| 名称 | 说明 |
| --- | --- |
| large | - |
| medium | - |
| small | - |


### TAvatarType
#### 枚举值


| 名称 | 说明 |
| --- | --- |
| icon | - |
| normal | - |
| customText | - |
| display | - |
| operation | - |


### TAvatarShape
#### 枚举值


| 名称 | 说明 |
| --- | --- |
| circle | - |
| square | - |
22 changes: 21 additions & 1 deletion tdesign-component/example/assets/api/back-top_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,28 @@
| 参数 | 类型 | 默认值 | 说明 |
| --- | --- | --- | --- |
| controller | ScrollController? | - | 页面滚动的控制器 |
| key | | - | |
| key | Key? | - | 组件标识,用于区分或保留组件状态。 |
| onClick | VoidCallback? | - | 按钮点击事件 |
| showText | bool | false | 是否展示文字 |
| style | TBackTopStyle | TBackTopStyle.circle | 样式,圆形和半圆 |
| theme | TBackTopTheme | TBackTopTheme.light | 主题 |


### TBackTopTheme
#### 枚举值


| 名称 | 说明 |
| --- | --- |
| light | - |
| dark | - |


### TBackTopStyle
#### 枚举值


| 名称 | 说明 |
| --- | --- |
| circle | - |
| halfCircle | - |
37 changes: 35 additions & 2 deletions tdesign-component/example/assets/api/badge_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,49 @@

| 参数 | 类型 | 默认值 | 说明 |
| --- | --- | --- | --- |
| type | TBadgeType | - | 红点样式 |
| border | TBadgeBorder | TBadgeBorder.large | 红点圆角大小 |
| color | Color? | - | 红点颜色 |
| count | String? | - | 红点数量 |
| key | | - | |
| key | Key? | - | 组件标识,用于区分或保留组件状态。 |
| maxCount | String? | '99' | 最大红点数量 |
| message | String? | - | 消息内容 |
| padding | EdgeInsetsGeometry? | - | 角标自定义padding |
| showZero | bool | true | 值为0是否显示 |
| size | TBadgeSize | TBadgeSize.small | 红点尺寸 |
| textColor | Color? | - | 文字颜色 |
| type | TBadgeType | type | 红点样式 |
| widthLarge | double | 32 | 角标大三角形宽 |
| widthSmall | double | 12 | 角标小三角形宽 |


### TBadgeType
#### 枚举值


| 名称 | 说明 |
| --- | --- |
| redPoint | 红点样式 |
| message | 消息样式 |
| bubble | 气泡样式 |
| square | 方形样式 |
| subscript | 角标样式 |


### TBadgeBorder
#### 枚举值


| 名称 | 说明 |
| --- | --- |
| large | 大圆角 8px |
| small | 小圆角 2px |


### TBadgeSize
#### 枚举值


| 名称 | 说明 |
| --- | --- |
| large | 宽 20px |
| small | 宽 16px |
130 changes: 121 additions & 9 deletions tdesign-component/example/assets/api/button_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
| iconTextSpacing | double? | - | 自定义图标与文本之间距离 |
| iconWidget | Widget? | - | 自定义图标 icon 控件 |
| isBlock | bool | false | 是否为通栏按钮 |
| key | | - | |
| key | Key? | - | 组件标识,用于区分或保留组件状态。 |
| margin | EdgeInsetsGeometry? | - | 自定义 margin |
| onLongPress | TButtonEvent? | - | 长按事件 |
| onTap | TButtonEvent? | - | 点击事件 |
Expand All @@ -30,8 +30,6 @@
| type | TButtonType | TButtonType.fill | 类型:填充,描边,文字 |
| width | double? | - | 自定义宽度 |

```
```

### TButtonStyle
#### 默认构造方法
Expand All @@ -48,9 +46,123 @@

#### 工厂构造方法

| 名称 | 说明 |
| --- | --- |
| TButtonStyle.generateFillStyleByTheme | 生成不同主题的填充按钮样式 |
| TButtonStyle.generateGhostStyleByTheme | 生成不同主题的幽灵按钮样式 |
| TButtonStyle.generateOutlineStyleByTheme | 生成不同主题的描边按钮样式 |
| TButtonStyle.generateTextStyleByTheme | 生成不同主题的文本按钮样式 |
##### TButtonStyle.generateFillStyleByTheme

生成不同主题的填充按钮样式

| 参数 | 类型 | 默认值 | 说明 |
| --- | --- | --- | --- |
| context | BuildContext | - | - |
| theme | TButtonTheme? | - | - |
| status | TButtonStatus | - | - |


##### TButtonStyle.generateGhostStyleByTheme

生成不同主题的幽灵按钮样式

| 参数 | 类型 | 默认值 | 说明 |
| --- | --- | --- | --- |
| context | BuildContext | - | - |
| theme | TButtonTheme? | - | - |
| status | TButtonStatus | - | - |


##### TButtonStyle.generateOutlineStyleByTheme

生成不同主题的描边按钮样式

| 参数 | 类型 | 默认值 | 说明 |
| --- | --- | --- | --- |
| context | BuildContext | - | - |
| theme | TButtonTheme? | - | - |
| status | TButtonStatus | - | - |


##### TButtonStyle.generateTextStyleByTheme

生成不同主题的文本按钮样式

| 参数 | 类型 | 默认值 | 说明 |
| --- | --- | --- | --- |
| context | BuildContext | - | - |
| theme | TButtonTheme? | - | - |
| status | TButtonStatus | - | - |


### TButtonSize
#### 枚举值


| 名称 | 说明 |
| --- | --- |
| large | - |
| medium | - |
| small | - |
| extraSmall | - |


### TButtonType
#### 枚举值


| 名称 | 说明 |
| --- | --- |
| fill | - |
| outline | - |
| text | - |
| ghost | - |


### TButtonShape
#### 枚举值


| 名称 | 说明 |
| --- | --- |
| rectangle | - |
| round | - |
| square | - |
| circle | - |
| filled | - |


### TButtonTheme
#### 枚举值


| 名称 | 说明 |
| --- | --- |
| defaultTheme | - |
| primary | - |
| danger | - |
| light | - |


### TButtonStatus
#### 枚举值


| 名称 | 说明 |
| --- | --- |
| defaultState | - |
| active | - |
| disable | - |


### TButtonIconPosition
#### 枚举值


| 名称 | 说明 |
| --- | --- |
| left | - |
| right | - |


### TButtonEvent
#### 类型定义

```dart
typedef TButtonEvent = void Function();
```
Loading
Loading