Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
38 changes: 19 additions & 19 deletions tdesign-component/example/assets/api/action-sheet_api.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,4 @@
## API
### TDActionSheetItem
#### 简介
动作面板项目
#### 默认构造方法

| 参数 | 类型 | 默认值 | 说明 |
| --- | --- | --- | --- |
| badge | TDBadge? | - | 角标 |
| description | String? | - | 描述信息 |
| disabled | bool | false | 是否禁用 |
| group | String? | - | 分组,用于带描述多行滚动宫格 |
| icon | Widget? | - | 图标 |
| iconSize | double? | - | 图标大小 |
| label | String | - | 标题 |
| textStyle | TextStyle? | - | 标题样式 |

```
```

### TDActionSheet
#### 简介
动作面板
Expand Down Expand Up @@ -54,3 +35,22 @@
| showGridActionSheet | | required BuildContext context, required List<TDActionSheetItem> items, TDActionSheetAlign align, String? cancelText, bool showCancel, TDActionSheetItemCallback? 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<TDActionSheetItem> items, TDActionSheetAlign align, String? cancelText, bool showCancel, TDActionSheetItemCallback? onSelected, bool showOverlay, bool closeOnOverlayClick, double itemHeight, double itemMinWidth, VoidCallback? onCancel, VoidCallback? onClose, bool useSafeArea, | 显示分组类型面板 |
| showListActionSheet | | required BuildContext context, required List<TDActionSheetItem> items, TDActionSheetAlign align, String? cancelText, bool showCancel, VoidCallback? onCancel, TDActionSheetItemCallback? onSelected, bool showOverlay, bool closeOnOverlayClick, VoidCallback? onClose, bool useSafeArea, | 显示列表类型面板 |

```
```

### TDActionSheetItem
#### 简介
动作面板项目
#### 默认构造方法

| 参数 | 类型 | 默认值 | 说明 |
| --- | --- | --- | --- |
| badge | TDBadge? | - | 角标 |
| description | String? | - | 描述信息 |
| disabled | bool | false | 是否禁用 |
| group | String? | - | 分组,用于带描述多行滚动宫格 |
| icon | Widget? | - | 图标 |
| iconSize | double? | - | 图标大小 |
| label | String | - | 标题 |
| textStyle | TextStyle? | - | 标题样式 |
82 changes: 41 additions & 41 deletions tdesign-component/example/assets/api/calendar_api.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,18 @@
## API
### TDCalendar
### TDCalendarPopup
#### 默认构造方法

| 参数 | 类型 | 默认值 | 说明 |
| --- | --- | --- | --- |
| anchorDate | DateTime? | - | 锚点日期 |
| animateTo | bool? | false | 动画滚动到指定位置 |
| cellHeight | double? | 60 | 日期高度 |
| cellWidget | Widget? Function(BuildContext context, TDate tdate, DateSelectType selectType)? | - | 自定义日期单元格组件 |
| displayFormat | String? | 'year month' | 年月显示格式,`year`表示年,`month`表示月,如`year month`表示年在前、月在后、中间隔一个空格 |
| firstDayOfWeek | int? | 0 | 第一天从星期几开始,默认 0 = 周日 |
| format | CalendarFormat? | - | 用于格式化日期的函数,可定义日期前后的显示内容和日期样式 |
| height | double? | - | 高度 |
| isTimeUnit | bool? | true | 是否显示时间单位 |
| key | | - | |
| maxDate | int? | - | 最大可选的日期(fromMillisecondsSinceEpoch),不传则默认半年后 |
| minDate | int? | - | 最小可选的日期(fromMillisecondsSinceEpoch),不传则默认今天 |
| monthTitleBuilder | Widget Function(BuildContext context, DateTime monthDate)? | - | 月标题构建器 |
| monthTitleHeight | double? | 22 | 月标题高度 |
| onCellClick | void Function(int value, DateSelectType type, TDate tdate)? | - | 点击日期时触发 |
| onCellLongPress | void Function(int value, DateSelectType type, TDate tdate)? | - | 长安日期时触发 |
| onChange | void Function(List<int> value)? | - | 选中值变化时触发 |
| onHeaderClick | void Function(int index, String week)? | - | 点击周时触发 |
| onMonthChange | ValueChanged<DateTime>? | - | 月份变化时触发 |
| pickerHeight | double? | 178 | 时间选择器List的视窗高度 |
| pickerItemCount | int? | 3 | 选择器List视窗中item个数,pickerHeight / pickerItemCount即item高度 |
| style | TDCalendarStyle? | - | 自定义样式 |
| timePickerModel | List<DatePickerModel>? | - | 自定义时间选择器 |
| title | String? | - | 标题 |
| titleWidget | Widget? | - | 标题组件 |
| type | CalendarType? | CalendarType.single | 日历的选择类型,single = 单选;multiple = 多选;range = 区间选择 |
| useSafeArea | bool? | true | 是否使用安全区域,默认true |
| useTimePicker | bool? | false | 是否显示时间选择器 |
| value | List<int>? | - | 当前选择的日期(fromMillisecondsSinceEpoch),不传则默认今天,当 type = single 时数组长度为1 |
| width | double? | - | 宽度 |
| autoClose | bool? | true | 自动关闭;在点击关闭按钮、确认按钮、遮罩层时自动关闭 |
| builder | CalendarBuilder? | - | 控件构建器,优先级高于[child] |
| child | TDCalendar? | - | 日历控件 |
| confirmBtn | Widget? | - | 自定义确认按钮 |
| context | BuildContext | context | 上下文 |
| onClose | VoidCallback? | - | 关闭时触发 |
| onConfirm | void Function(List<int> value)? | - | 点击确认按钮时触发 |
| top | double? | - | 距离顶部的距离 |
| visible | bool? | - | 默认是否显示日历 |

```
```
Expand Down Expand Up @@ -66,17 +45,38 @@
```
```

### TDCalendarPopup
### TDCalendar
#### 默认构造方法

| 参数 | 类型 | 默认值 | 说明 |
| --- | --- | --- | --- |
| autoClose | bool? | true | 自动关闭;在点击关闭按钮、确认按钮、遮罩层时自动关闭 |
| builder | CalendarBuilder? | - | 控件构建器,优先级高于[child] |
| child | TDCalendar? | - | 日历控件 |
| confirmBtn | Widget? | - | 自定义确认按钮 |
| context | BuildContext | context | 上下文 |
| onClose | VoidCallback? | - | 关闭时触发 |
| onConfirm | void Function(List<int> value)? | - | 点击确认按钮时触发 |
| top | double? | - | 距离顶部的距离 |
| visible | bool? | - | 默认是否显示日历 |
| anchorDate | DateTime? | - | 锚点日期 |
| animateTo | bool? | false | 动画滚动到指定位置 |
| cellHeight | double? | 60 | 日期高度 |
| cellWidget | Widget? Function(BuildContext context, TDate tdate, DateSelectType selectType)? | - | 自定义日期单元格组件 |
| displayFormat | String? | 'year month' | 年月显示格式,`year`表示年,`month`表示月,如`year month`表示年在前、月在后、中间隔一个空格 |
| firstDayOfWeek | int? | 0 | 第一天从星期几开始,默认 0 = 周日 |
| format | CalendarFormat? | - | 用于格式化日期的函数,可定义日期前后的显示内容和日期样式 |
| height | double? | - | 高度 |
| isTimeUnit | bool? | true | 是否显示时间单位 |
| key | | - | |
| maxDate | int? | - | 最大可选的日期(fromMillisecondsSinceEpoch),不传则默认半年后 |
| minDate | int? | - | 最小可选的日期(fromMillisecondsSinceEpoch),不传则默认今天 |
| monthTitleBuilder | Widget Function(BuildContext context, DateTime monthDate)? | - | 月标题构建器 |
| monthTitleHeight | double? | 22 | 月标题高度 |
| onCellClick | void Function(int value, DateSelectType type, TDate tdate)? | - | 点击日期时触发 |
| onCellLongPress | void Function(int value, DateSelectType type, TDate tdate)? | - | 长安日期时触发 |
| onChange | void Function(List<int> value)? | - | 选中值变化时触发 |
| onHeaderClick | void Function(int index, String week)? | - | 点击周时触发 |
| onMonthChange | ValueChanged<DateTime>? | - | 月份变化时触发 |
| pickerHeight | double? | 178 | 时间选择器List的视窗高度 |
| pickerItemCount | int? | 3 | 选择器List视窗中item个数,pickerHeight / pickerItemCount即item高度 |
| style | TDCalendarStyle? | - | 自定义样式 |
| timePickerModel | List<DatePickerModel>? | - | 自定义时间选择器 |
| title | String? | - | 标题 |
| titleWidget | Widget? | - | 标题组件 |
| type | CalendarType? | CalendarType.single | 日历的选择类型,single = 单选;multiple = 多选;range = 区间选择 |
| useSafeArea | bool? | true | 是否使用安全区域,默认true |
| useTimePicker | bool? | false | 是否显示时间选择器 |
| value | List<int>? | - | 当前选择的日期(fromMillisecondsSinceEpoch),不传则默认今天,当 type = single 时数组长度为1 |
| width | double? | - | 宽度 |
44 changes: 22 additions & 22 deletions tdesign-component/example/assets/api/checkbox_api.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,26 @@
## API
### TDCheckboxGroup
#### 默认构造方法

| 参数 | 类型 | 默认值 | 说明 |
| --- | --- | --- | --- |
| checkedIds | List<String>? | - | 勾选的CheckBox id列表 |
| child | | - | |
| contentDirection | TDContentDirection? | - | 文字相对icon的方位 |
| controller | TDCheckboxGroupController? | - | 可以通过控制器操作勾选状态 |
| customContentBuilder | ContentBuilder? | - | CheckBox完全自定义内容 |
| customIconBuilder | IconBuilder? | - | 自定义选择icon的样式 |
| key | | - | |
| maxChecked | int? | - | 最多可以勾选多少 |
| onChangeGroup | OnGroupChange? | - | 状态变化监听器 |
| onOverloadChecked | VoidCallback? | - | 超过最大可勾选的个数 |
| spacing | double? | - | CheckBoxicon和文字的距离 |
| style | TDCheckboxStyle? | - | CheckBox复选框样式:圆形或方形 |
| titleMaxLine | int? | - | CheckBox标题的行数 |

```
```

### TDCheckbox
#### 默认构造方法

Expand Down Expand Up @@ -31,25 +53,3 @@
| titleColor | Color? | - | 标题文字颜色 |
| titleFont | Font? | - | 标题字体大小 |
| titleMaxLine | int? | - | 标题的行数 |

```
```

### TDCheckboxGroup
#### 默认构造方法

| 参数 | 类型 | 默认值 | 说明 |
| --- | --- | --- | --- |
| checkedIds | List<String>? | - | 勾选的CheckBox id列表 |
| child | | - | |
| contentDirection | TDContentDirection? | - | 文字相对icon的方位 |
| controller | TDCheckboxGroupController? | - | 可以通过控制器操作勾选状态 |
| customContentBuilder | ContentBuilder? | - | CheckBox完全自定义内容 |
| customIconBuilder | IconBuilder? | - | 自定义选择icon的样式 |
| key | | - | |
| maxChecked | int? | - | 最多可以勾选多少 |
| onChangeGroup | OnGroupChange? | - | 状态变化监听器 |
| onOverloadChecked | VoidCallback? | - | 超过最大可勾选的个数 |
| spacing | double? | - | CheckBoxicon和文字的距离 |
| style | TDCheckboxStyle? | - | CheckBox复选框样式:圆形或方形 |
| titleMaxLine | int? | - | CheckBox标题的行数 |
26 changes: 13 additions & 13 deletions tdesign-component/example/assets/api/date-time-picker_api.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
## API
### TDPicker

#### 静态方法

| 名称 | 返回类型 | 参数 | 说明 |
| --- | --- | --- | --- |
| showDatePicker | | required null context, String? title, double? titleHeight, Color? titleDividerColor, required DatePickerCallback? onConfirm, DatePickerCallback? onCancel, DatePickerCallback? onChange, Function(int wheelIndex, int index)? onSelectedItemChanged, String? leftText, TextStyle? leftTextStyle, TextStyle? centerTextStyle, String? rightText, TextStyle? rightTextStyle, EdgeInsets? padding, double? leftPadding, double? topPadding, double? rightPadding, double? topRadius, Color? backgroundColor, Widget? customSelectWidget, bool useYear, bool useMonth, bool useDay, bool useHour, bool useMinute, bool useSecond, bool useWeekDay, List<int> dateStart, List<int>? dateEnd, List<int>? initialDate, List<int> Function(DateTypeKey key, List<int> nums)? filterItems, double pickerHeight, int pickerItemCount, bool isTimeUnit, ItemBuilderType? itemBuilder, Color? barrierColor, Duration duration, | 显示时间选择器 |
| showMultiLinkedPicker | | required null context, String? title, required MultiPickerCallback? onConfirm, MultiPickerCallback? onCancel, required List initialData, required Map data, required int columnNum, double pickerHeight, int pickerItemCount, Widget? customSelectWidget, String? rightText, String? leftText, TextStyle? leftTextStyle, TextStyle? centerTextStyle, TextStyle? rightTextStyle, double? titleHeight, double? topPadding, double? leftPadding, double? rightPadding, Color? titleDividerColor, Color? backgroundColor, double? topRadius, EdgeInsets? padding, ItemBuilderType? itemBuilder, bool keepSameSelection, Color? barrierColor, Duration duration, | 显示多级联动选择器 |
| showMultiPicker | | required null context, String? title, required MultiPickerCallback? onConfirm, MultiPickerCallback? onCancel, required List<List<String>> data, double pickerHeight, int pickerItemCount, List<int>? initialIndexes, String? rightText, String? leftText, TextStyle? leftTextStyle, TextStyle? centerTextStyle, TextStyle? rightTextStyle, double? titleHeight, double? topPadding, double? leftPadding, double? rightPadding, Color? titleDividerColor, Color? backgroundColor, double? topRadius, EdgeInsets? padding, Widget? customSelectWidget, ItemBuilderType? itemBuilder, Duration duration, Color? barrierColor, | 显示多级选择器 |

```
```

### TDDatePicker
#### 默认构造方法

Expand Down Expand Up @@ -31,16 +44,3 @@
| titleHeight | double? | - | 标题高度 |
| topPadding | double? | - | 顶部填充 |
| topRadius | double? | - | 顶部圆角 |

```
```

### TDPicker

#### 静态方法

| 名称 | 返回类型 | 参数 | 说明 |
| --- | --- | --- | --- |
| showDatePicker | | required null context, String? title, double? titleHeight, Color? titleDividerColor, required DatePickerCallback? onConfirm, DatePickerCallback? onCancel, DatePickerCallback? onChange, Function(int wheelIndex, int index)? onSelectedItemChanged, String? leftText, TextStyle? leftTextStyle, TextStyle? centerTextStyle, String? rightText, TextStyle? rightTextStyle, EdgeInsets? padding, double? leftPadding, double? topPadding, double? rightPadding, double? topRadius, Color? backgroundColor, Widget? customSelectWidget, bool useYear, bool useMonth, bool useDay, bool useHour, bool useMinute, bool useSecond, bool useWeekDay, List<int> dateStart, List<int>? dateEnd, List<int>? initialDate, List<int> Function(DateTypeKey key, List<int> nums)? filterItems, double pickerHeight, int pickerItemCount, bool isTimeUnit, ItemBuilderType? itemBuilder, Color? barrierColor, Duration duration, | 显示时间选择器 |
| showMultiLinkedPicker | | required null context, String? title, required MultiPickerCallback? onConfirm, MultiPickerCallback? onCancel, required List initialData, required Map data, required int columnNum, double pickerHeight, int pickerItemCount, Widget? customSelectWidget, String? rightText, String? leftText, TextStyle? leftTextStyle, TextStyle? centerTextStyle, TextStyle? rightTextStyle, double? titleHeight, double? topPadding, double? leftPadding, double? rightPadding, Color? titleDividerColor, Color? backgroundColor, double? topRadius, EdgeInsets? padding, ItemBuilderType? itemBuilder, bool keepSameSelection, Color? barrierColor, Duration duration, | 显示多级联动选择器 |
| showMultiPicker | | required null context, String? title, required MultiPickerCallback? onConfirm, MultiPickerCallback? onCancel, required List<List<String>> data, double pickerHeight, int pickerItemCount, List<int>? initialIndexes, String? rightText, String? leftText, TextStyle? leftTextStyle, TextStyle? centerTextStyle, TextStyle? rightTextStyle, double? titleHeight, double? topPadding, double? leftPadding, double? rightPadding, Color? titleDividerColor, Color? backgroundColor, double? topRadius, EdgeInsets? padding, Widget? customSelectWidget, ItemBuilderType? itemBuilder, Duration duration, Color? barrierColor, | 显示多级选择器 |
Loading
Loading