Skip to content

Commit 5452823

Browse files
committed
更新官网API文档
1 parent c4ad6ce commit 5452823

File tree

6 files changed

+53
-5
lines changed

6 files changed

+53
-5
lines changed

tdesign-site/src/cell/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,8 @@ Widget _buildCard(BuildContext context) {
216216
| leftIcon | IconData? | - | 左侧图标,出现在单元格标题的左侧 |
217217
| leftIconWidget | Widget? | - | 左侧图标组件 |
218218
| note | String? | - | 和标题同行的说明文字 |
219+
| noteMaxLine | int | 1 | 说明文字组件 最大行数 |
220+
| noteMaxWidth | double? | - | 说明文字组件 最大宽度,超过部分显示省略号,防止文字溢出 |
219221
| noteWidget | Widget? | - | 说明文字组件 |
220222
| onClick | TDCellClick? | - | 点击事件 |
221223
| onLongPress | TDCellClick? | - | 长按事件 |

tdesign-site/src/input/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ import 'package:tdesign_flutter/tdesign_flutter.dart';
509509
_countdownTime > 0
510510
? TDText(
511511
'${countDownText}(${_countdownTime}秒)',
512-
textColor: TDTheme.of(context).textColorDisabled,
512+
textColor: TDTheme.of(context).textDisabledColor,
513513
)
514514
: TDText(confirmText,
515515
textColor: TDTheme.of(context).brandNormalColor),

tdesign-site/src/popover/README.md

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ import 'package:tdesign_flutter/tdesign_flutter.dart';
7979

8080
<pre slot="Dart" lang="javascript">
8181
Widget _buildNCustomPopover(BuildContext context) {
82+
var textStyle = TextStyle(
83+
color: theme == TDPopoverTheme.light
84+
? TDTheme.of(context).fontGyColor1
85+
: TDTheme.of(context).fontWhColor1);
8286
return LayoutBuilder(
8387
builder: (_, constrains) {
8488
return TDButton(
@@ -91,8 +95,25 @@ import 'package:tdesign_flutter/tdesign_flutter.dart';
9195
padding: const EdgeInsets.all(0),
9296
theme: theme,
9397
width: 108,
94-
height: 148,
95-
contentWidget: _buildPopoverList(context),
98+
height: 152,
99+
contentWidget: Column(
100+
children: [
101+
Container(
102+
padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 24),
103+
child: TDText('选项1', style: textStyle),
104+
),
105+
const TDDivider(height: 0.5),
106+
Container(
107+
padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 24),
108+
child: TDText('选项2', style: textStyle),
109+
),
110+
const TDDivider(height: 0.5),
111+
Container(
112+
padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 24),
113+
child: TDText('选项3', style: textStyle),
114+
),
115+
],
116+
),
96117
);
97118
},
98119
);

tdesign-site/src/search/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,9 @@ import 'package:tdesign_flutter/tdesign_flutter.dart';
138138
| onEditComplete | TDSearchBarCallBack? | - | 编辑完成回调 |
139139
| onInputClick | GestureTapCallback? | - | 输入框点击事件 |
140140
| onSubmitted | TDSearchBarEvent? | - | 提交回调 |
141-
| onTapOutside | | - | |
141+
| onTapOutside | TapRegionCallback? | - | 点击输入框外部回调 |
142142
| onTextChanged | TDSearchBarEvent? | - | 文字改变回调 |
143-
| padding | EdgeInsets | const EdgeInsets.fromLTRB(16, 8, 16, 8) | 内部填充 |
143+
| padding | EdgeInsets | const EdgeInsets.symmetric(horizontal: 16, vertical: 8) | 内部填充 |
144144
| placeHolder | String? | - | 预设文案 |
145145
| readOnly | bool? | - | 是否只读 |
146146
| style | TDSearchStyle? | TDSearchStyle.square | 样式 |

tdesign-site/src/table/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ import 'package:tdesign_flutter/tdesign_flutter.dart';
277277
| data | List<dynamic>? | - | 数据源 |
278278
| defaultSort | String? | - | 默认排序 |
279279
| empty | TDTableEmpty? | - | 空表格呈现样式 |
280+
| footerWidget | Widget? | - | 自定义表尾 |
280281
| height | double? | - | 表格高度,超出后会出现滚动条 |
281282
| key | | - | |
282283
| loading | bool? | false | 加载中状态 |

tdesign-site/src/upload/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,29 @@ import 'package:tdesign_flutter/tdesign_flutter.dart';
8585

8686
</td-code-block>
8787
88+
89+
自定义upload按钮事件
90+
91+
<td-code-block panel="Dart">
92+
93+
<pre slot="Dart" lang="javascript">
94+
Widget _uploadTap(BuildContext context) {
95+
return wrapDemoContainer('自定义upload按钮事件',
96+
child: TDUpload(
97+
files: files7,
98+
multiple: true,
99+
max: 9,
100+
onUploadTap: onUploadTap,
101+
onClick: onClick,
102+
onCancel: onCancel,
103+
onError: print,
104+
onValidate: print,
105+
onChange: ((files, type) => onValueChanged(files7, files, type)),
106+
));
107+
}</pre>
108+
109+
</td-code-block>
110+
88111
### 1 组件状态
89112

90113
加载状态
@@ -173,6 +196,7 @@ import 'package:tdesign_flutter/tdesign_flutter.dart';
173196
| onClick | TDUploadClickEvent? | - | 监听点击图片位 |
174197
| onError | TDUploadErrorEvent? | - | 监听获取资源错误 |
175198
| onMaxLimitReached | VoidCallback? | - | 监听文件超过最大数量 |
199+
| onUploadTap | VoidCallback? | - | 自定义upload按钮事件 |
176200
| onValidate | TDUploadValidatorEvent? | - | 监听文件校验出错 |
177201
| sizeLimit | double? | - | 图片大小限制,单位为KB |
178202
| type | TDUploadBoxType | TDUploadBoxType.roundedSquare | Box类型 |

0 commit comments

Comments
 (0)