Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Td search fix #417

Merged
merged 5 commits into from
Dec 23, 2024
Merged
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
1 change: 1 addition & 0 deletions tdesign-component/demo_tool/all_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
./bin/demo_tool generate --file ../lib/src/components/tree/td_tree_select.dart --name TDTreeSelect,TDSelectOption --folder-name tree-select --output ../example/assets/api/ --only-api

# upload
./bin/demo_tool generate --file ../lib/src/components/upload/td_upload.dart --name TDUpload --folder-name upload --output ../example/assets/api/ --only-api


# 数据展示
Expand Down
4 changes: 4 additions & 0 deletions tdesign-component/example/assets/api/cell_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
| 参数 | 类型 | 默认值 | 说明 |
| --- | --- | --- | --- |
| leftIconColor | Color? | - | 左侧图标颜色 |
| rightIconColor | Color? | - | 右侧图标颜色 |
| titleStyle | TextStyle? | - | 标题文字样式 |
| requiredStyle | TextStyle? | - | 必填星号文字样式 |
| descriptionStyle | TextStyle? | - | 内容描述文字样式 |
Expand All @@ -16,6 +17,9 @@
| groupBorderedColor | Color? | - | 单元格组边框颜色 |
| backgroundColor | Color? | - | 默认状态背景颜色 |
| padding | EdgeInsets? | - | 单元格内边距 |
| cardBorderRadius | BorderRadius? | - | 卡片模式边框圆角 |
| cardPadding | EdgeInsets? | - | 卡片模式内边距 |
| titlePadding | EdgeInsets? | - | 单元格组标题内边距 |


#### 工厂构造方法
Expand Down
5 changes: 3 additions & 2 deletions tdesign-component/example/assets/api/date-time-picker_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
| showTitle | bool | true | 是否展示标题 |
| pickerHeight | double | 200 | 选择器List的视窗高度,默认200 |
| pickerItemCount | int | - | 选择器List视窗中item个数,pickerHeight / pickerItemCount即item高度 |
| onSelectedItemChanged | void Function(int index)? | - | 选择器选中项改变回调 |
| isTimeUnit | bool? | - | 是否时间显示 |
| onSelectedItemChanged | void Function(int wheelIndex, int index)? | - | 选择器选中项改变回调 |
| key | | - | |

```
Expand All @@ -36,6 +37,6 @@

| 名称 | 返回类型 | 参数 | 说明 |
| --- | --- | --- | --- |
| showDatePicker | | required null context, required String title, required DatePickerCallback? onConfirm, DatePickerCallback? onCancel, bool useYear, bool useMonth, bool useDay, bool useHour, bool useMinute, bool useSecond, bool useWeekDay, Color? barrierColor, List<int> dateStart, List<int>? dateEnd, List<int>? initialDate, String? rightText, String? leftText, TextStyle? leftTextStyle, TextStyle? centerTextStyle, TextStyle? rightTextStyle, Color? titleDividerColor, Duration duration, double pickerHeight, int pickerItemCount, | 显示时间选择器 |
| showDatePicker | | required null context, required String title, required DatePickerCallback? onConfirm, DatePickerCallback? onCancel, bool useYear, bool useMonth, bool useDay, bool useHour, bool useMinute, bool useSecond, bool useWeekDay, Color? barrierColor, List<int> dateStart, List<int>? dateEnd, List<int>? initialDate, String? rightText, String? leftText, TextStyle? leftTextStyle, TextStyle? centerTextStyle, TextStyle? rightTextStyle, Color? titleDividerColor, Duration duration, double pickerHeight, bool isTimeUnit, Function(int wheelIndex, int index)? onSelectedItemChanged, int pickerItemCount, | 显示时间选择器 |
| showMultiPicker | | required null context, String? title, required MultiPickerCallback? onConfirm, MultiPickerCallback? onCancel, required List<List<String>> data, List<int>? initialIndexes, Duration duration, Color? barrierColor, double pickerHeight, String? rightText, String? leftText, TextStyle? leftTextStyle, TextStyle? centerTextStyle, TextStyle? rightTextStyle, Color? titleDividerColor, double? topPadding, int pickerItemCount, | 显示多级选择器 |
| showMultiLinkedPicker | | required null context, String? title, required MultiPickerCallback? onConfirm, MultiPickerCallback? onCancel, required Map data, required int columnNum, required List initialData, Duration duration, Color? barrierColor, String? rightText, String? leftText, TextStyle? leftTextStyle, TextStyle? centerTextStyle, TextStyle? rightTextStyle, double pickerHeight, Color? titleDividerColor, double? topPadding, int pickerItemCount, | 显示多级联动选择器 |
2 changes: 2 additions & 0 deletions tdesign-component/example/assets/api/dialog_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
| title | String | - | 标题内容 |
| action | Function()? | - | 点击操作 |
| titleColor | Color? | - | 标题颜色 |
| titleSize | double? | - | 字体大小 |
| style | TDButtonStyle? | - | 按钮样式 |
| type | TDButtonType? | - | 按钮类型 |
| theme | TDButtonTheme? | - | 按钮类型 |
Expand Down Expand Up @@ -206,6 +207,7 @@
| key | | - | |
| buttonText | String? | - | 按钮文字 |
| buttonTextColor | Color? | - | 按钮文字颜色 |
| buttonTextSize | double? | - | 按钮文字大小 |
| buttonTextFontWeight | FontWeight? | FontWeight.w600 | 按钮文字粗细 |
| buttonStyle | TDButtonStyle? | - | 按钮样式 |
| buttonType | TDButtonType? | - | 按钮类型 |
Expand Down
3 changes: 2 additions & 1 deletion tdesign-component/example/assets/api/dropdown-menu_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@
| direction | TDDropdownMenuDirection? | TDDropdownMenuDirection.auto | 菜单展开方向(down、up、auto) |
| duration | double? | 200.0 | 动画时长,毫秒 |
| showOverlay | bool? | true | 是否显示遮罩层 |
| isScrollable | bool | false | 是否开启滚动列表 |
| isScrollable | bool? | false | 是否开启滚动列表 |
| arrowIcon | IconData? | - | 自定义箭头图标 |
| labelBuilder | LabelBuilder? | - | 自定义标签内容 |
| onMenuOpened | ValueChanged<int>? | - | 展开菜单事件 |
| onMenuClosed | ValueChanged<int>? | - | 关闭菜单事件 |
| width | double? | - | menu的宽度 |
| height | double? | 48 | menu的高度 |
| tabBarAlign | MainAxisAlignment? | MainAxisAlignment.center | [TDDropdownItem.label]和[arrowIcon]/[TDDropdownItem.arrowIcon]的对齐方式 |
| decoration | Decoration? | - | 下拉菜单的装饰器 |

```
```
Expand Down
2 changes: 1 addition & 1 deletion tdesign-component/example/assets/api/picker_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,6 @@

| 名称 | 返回类型 | 参数 | 说明 |
| --- | --- | --- | --- |
| showDatePicker | | required null context, required String title, required DatePickerCallback? onConfirm, DatePickerCallback? onCancel, bool useYear, bool useMonth, bool useDay, bool useHour, bool useMinute, bool useSecond, bool useWeekDay, Color? barrierColor, List<int> dateStart, List<int>? dateEnd, List<int>? initialDate, String? rightText, String? leftText, TextStyle? leftTextStyle, TextStyle? centerTextStyle, TextStyle? rightTextStyle, Color? titleDividerColor, Duration duration, double pickerHeight, int pickerItemCount, | 显示时间选择器 |
| showDatePicker | | required null context, required String title, required DatePickerCallback? onConfirm, DatePickerCallback? onCancel, bool useYear, bool useMonth, bool useDay, bool useHour, bool useMinute, bool useSecond, bool useWeekDay, Color? barrierColor, List<int> dateStart, List<int>? dateEnd, List<int>? initialDate, String? rightText, String? leftText, TextStyle? leftTextStyle, TextStyle? centerTextStyle, TextStyle? rightTextStyle, Color? titleDividerColor, Duration duration, double pickerHeight, bool isTimeUnit, Function(int wheelIndex, int index)? onSelectedItemChanged, int pickerItemCount, | 显示时间选择器 |
| showMultiPicker | | required null context, String? title, required MultiPickerCallback? onConfirm, MultiPickerCallback? onCancel, required List<List<String>> data, List<int>? initialIndexes, Duration duration, Color? barrierColor, double pickerHeight, String? rightText, String? leftText, TextStyle? leftTextStyle, TextStyle? centerTextStyle, TextStyle? rightTextStyle, Color? titleDividerColor, double? topPadding, int pickerItemCount, | 显示多级选择器 |
| showMultiLinkedPicker | | required null context, String? title, required MultiPickerCallback? onConfirm, MultiPickerCallback? onCancel, required Map data, required int columnNum, required List initialData, Duration duration, Color? barrierColor, String? rightText, String? leftText, TextStyle? leftTextStyle, TextStyle? centerTextStyle, TextStyle? rightTextStyle, double pickerHeight, Color? titleDividerColor, double? topPadding, int pickerItemCount, | 显示多级联动选择器 |
1 change: 1 addition & 0 deletions tdesign-component/example/assets/api/popup_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
| opened | VoidCallback? | - | 打开后事件 |
| close | VoidCallback? | - | 关闭前事件 |
| barrierClick | VoidCallback? | - | 蒙层点击事件,仅在[modalBarrierFull]为false时触发 |
| focusMove | bool | false | 是否有输入框获取焦点时整体平移避免输入框被遮挡 |

```
```
Expand Down
4 changes: 4 additions & 0 deletions tdesign-component/example/assets/api/search_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| onTextChanged | TDSearchBarEvent? | - | 文字改变回调 |
| onSubmitted | TDSearchBarEvent? | - | 提交回调 |
| onEditComplete | TDSearchBarCallBack? | - | 编辑完成回调 |
| onInputClick | GestureTapCallback? | - | 输入框点击事件 |
| autoHeight | bool | false | 是否自动计算高度 |
| padding | EdgeInsets | const EdgeInsets.fromLTRB(16, 8, 16, 8) | 内部填充 |
| autoFocus | bool | false | 是否自动获取焦点 |
Expand All @@ -23,3 +24,6 @@
| onActionClick | TDSearchBarEvent? | - | 自定义操作回调 |
| onClearClick | TDSearchBarClearEvent? | - | 自定义操作回调 |
| focusNode | FocusNode? | - | 自定义焦点 |
| inputAction | TextInputAction? | - | 键盘动作类型 |
| enabled | bool? | - | 是否禁用 |
| readOnly | bool? | - | 是否只读 |
17 changes: 17 additions & 0 deletions tdesign-component/example/assets/api/upload_api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## API
### TDUpload
#### 默认构造方法

| 参数 | 类型 | 默认值 | 说明 |
| --- | --- | --- | --- |
| key | | - | |
| max | int | 0 | 用于控制文件上传数量,0为不限制,仅在multiple为true时有效 |
| mediaType | List<TDUploadMediaType> | const [TDUploadMediaType.image, TDUploadMediaType.video] | 支持上传的文件类型,图片或视频 |
| sizeLimit | double? | - | 图片大小限制,单位为KB |
| onCancel | VoidCallback? | - | 监听取消上传 |
| onError | TDUploadErrorEvent? | - | 监听获取资源错误 |
| onValidate | TDUploadValidatorEvent? | - | 监听文件校验出错 |
| onClick | TDUploadClickEvent? | - | 监听点击图片位 |
| files | List<TDUploadFile> | - | 控制展示的文件列表 |
| onChange | TDUploadValueChangedEvent? | - | 监听添加或删除照片 |
| multiple | bool | false | 是否多选上传,默认false |
Loading
Loading