From 587792970ce5a748cff52b59b360dabef87e6e99 Mon Sep 17 00:00:00 2001 From: hkaikai <617760820@qq.com> Date: Tue, 2 Jul 2024 21:11:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E6=A1=A3=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../example/assets/api/drawer_api.md | 2 +- .../example/assets/api/dropdown-menu_api.md | 3 +- .../example/assets/api/popup_api.md | 3 + .../example/assets/api/swipe-cell_api.md | 67 ++----------------- 4 files changed, 13 insertions(+), 62 deletions(-) diff --git a/tdesign-component/example/assets/api/drawer_api.md b/tdesign-component/example/assets/api/drawer_api.md index 5508d6aee..3aca451ac 100644 --- a/tdesign-component/example/assets/api/drawer_api.md +++ b/tdesign-component/example/assets/api/drawer_api.md @@ -20,7 +20,7 @@ | width | double? | 280 | 宽度 | | drawerTop | double? | - | 距离顶部的距离 | | style | TDCellStyle? | - | 列表自定义样式 | -| hover | bool? | false | 是否开启点击反馈 | +| hover | bool? | true | 是否开启点击反馈 | ``` ``` diff --git a/tdesign-component/example/assets/api/dropdown-menu_api.md b/tdesign-component/example/assets/api/dropdown-menu_api.md index 214598912..fe6eea955 100644 --- a/tdesign-component/example/assets/api/dropdown-menu_api.md +++ b/tdesign-component/example/assets/api/dropdown-menu_api.md @@ -7,7 +7,8 @@ | 参数 | 类型 | 默认值 | 说明 | | --- | --- | --- | --- | | key | | - | | -| builder | TDDropdownItemBuilder | - | 下拉菜单构建器 | +| builder | TDDropdownItemBuilder? | - | 下拉菜单构建器,优先级高于[items] | +| items | List? | - | 下拉菜单 | | closeOnClickOverlay | bool? | true | 是否在点击遮罩层后关闭菜单 | | direction | TDDropdownMenuDirection? | TDDropdownMenuDirection.auto | 菜单展开方向(down、up、auto) | | duration | double? | 200.0 | 动画时长,毫秒 | diff --git a/tdesign-component/example/assets/api/popup_api.md b/tdesign-component/example/assets/api/popup_api.md index 88231e9fb..30556d520 100644 --- a/tdesign-component/example/assets/api/popup_api.md +++ b/tdesign-component/example/assets/api/popup_api.md @@ -7,6 +7,7 @@ | 参数 | 类型 | 默认值 | 说明 | | --- | --- | --- | --- | | builder | WidgetBuilder | - | 控件构建器 | +| barrierLabel | | - | | | modalBarrierColor | Color? | Colors.black54 | 蒙层颜色 | | isDismissible | bool | true | 点击蒙层能否关闭 | | modalBarrierFull | bool | false | 是否全屏显示蒙层 | @@ -15,6 +16,8 @@ | modalHeight | double? | - | 弹出框高度 | | modalTop | double? | 0 | 弹出框顶部距离 | | modalLeft | double? | 0 | 弹出框左侧距离 | +| open | VoidCallback? | - | 打开前事件 | +| opened | VoidCallback? | - | 打开后事件 | ``` ``` diff --git a/tdesign-component/example/assets/api/swipe-cell_api.md b/tdesign-component/example/assets/api/swipe-cell_api.md index 735901d77..63471b684 100644 --- a/tdesign-component/example/assets/api/swipe-cell_api.md +++ b/tdesign-component/example/assets/api/swipe-cell_api.md @@ -11,72 +11,19 @@ | cell | Widget | - | 单元格 [TDCell] | | disabled | bool? | false | 是否禁用滑动 | | opened | List? | const [false, false] | 默认打开,[left, rigth] | -| right | TDSwipePanel? | - | 右侧滑动操作项面板 | -| left | TDSwipePanel? | - | 左侧滑动操作项面板 | +| right | TDSwipeCellPanel? | - | 右侧滑动操作项面板 | +| left | TDSwipeCellPanel? | - | 左侧滑动操作项面板 | | onChange | Function(TDSwipeDirection direction, bool open)? | - | 滑动展开事件 | | controller | SlidableController? | - | 自定义控制滑动窗口 | -| groupTag | Object? | - | 同一组中只有一个被打开 | +| groupTag | Object? | - | 同一组中只有一个被打开,[TDSwipeCell]必须为[TDSwipeCellClose]的后代组件才有效 | | closeOnScroll | bool? | true | 滚动时,是否关闭滑动操作项面板 | | dragStartBehavior | DragStartBehavior? | DragStartBehavior.start | 处理拖动开始行为的方式[GestureDetector.dragStartBehavior] | | direction | Axis? | Axis.horizontal | 可拖动的方向 | +| duration | Duration? | const Duration(milliseconds: 200) | 打开关闭动画时长 | -``` -``` - ### TDSwipePanel -#### 简介 -滑动单元格操作面板组件 -#### 默认构造方法 - -| 参数 | 类型 | 默认值 | 说明 | -| --- | --- | --- | --- | -| extentRatio | double? | 0.3 | 宽度占比 | -| openThreshold | double? | - | 拖动多少占比触发打开动作,默认 [extentRatio] 的一半 | -| closeThreshold | double? | - | 拖动多少占比触发关闭动作,默认 [extentRatio] 的一半 | -| motionType | SwipeMotion? | - | 滑动动画展示方式 | -| dragDismissible | bool? | false | 是否可通过拖动操作来移除 [TDSwipeCell] 组件 | -| dismissThreshold | double? | 0.75 | 滑动到多少比例时,触发移除。dragDismissible为true才有效 | -| dismissalDuration | Duration? | const Duration(milliseconds: 300) | 触发移除的滑动动画时长。dragDismissible为true才有效 | -| resizeDuration | Duration? | const Duration(milliseconds: 300) | 移除动画(高度变为0)时长。dragDismissible为true才有效 | -| closeOnCancel | bool? | false | 移除取消后,是否关闭滑动单元格。dragDismissible为true才有效 | -| confirmDismiss | dismissible_pane.ConfirmDismissCallback? | - | 移除前回调,可阻止移除。dragDismissible为true才有效 | -| onDismissed | VoidCallback? | - | 移除后回调。dragDismissible为true才有效 | -| children | List | - | 操作组件列表 | -| confirms | List? | - | 二次确认操作组件列表 | - -``` -``` - ### TDSwipeAction -#### 简介 -滑动单元格操作按钮 -#### 默认构造方法 -| 参数 | 类型 | 默认值 | 说明 | -| --- | --- | --- | --- | -| key | | - | | -| flex | int? | 1 | 宽度占比,默认为 1 | -| backgroundColor | Color? | - | 背景颜色 | -| autoClose | bool? | true | 点击后自动关闭 | -| onPressed | VoidCallback? | - | 点击回调 | -| icon | IconData? | - | 图标 | -| iconColor | Color? | - | 图标颜色,默认label字体颜色 | -| iconSize | double? | 18 | 图标大小 | -| spacing | double? | 2 | 图标和标题的间距 | -| label | String? | - | 标题 | -| labelStyle | TextStyle? | - | 标题样式 | -| direction | Axis? | Axis.horizontal | 图标和标题的排列方向 | -| confirmIndex | List? | - | 指定[TDSwipePanel.children]的索引,来打开该[TDSwipeAction] | -| builder | WidgetBuilder? | - | 自定义构建 | - -``` -``` - ### TDSwipeAutoClose -#### 简介 -滑动单元格自动关闭组件,需要[TDSwipeCell]组件配置相同的[TDSwipeCell.groupTag] -#### 默认构造方法 +#### 静态方法 -| 参数 | 类型 | 默认值 | 说明 | +| 名称 | 返回类型 | 参数 | 说明 | | --- | --- | --- | --- | -| key | | - | | -| closeWhenOpened | bool? | true | 打开[TDSwipeCell]前是否自动关闭其它 | -| closeWhenTapped | bool? | true | 点击[TDSwipeAutoClose]组件时,关闭全部[TDSwipeCell] | -| child | Widget | - | 其后代必须有[TDSwipeCell] | +| of | | required BuildContext context, | |