diff --git a/db/TDesign.db b/db/TDesign.db index 0c3040de0..e5b842b1e 100644 Binary files a/db/TDesign.db and b/db/TDesign.db differ diff --git a/packages/products/tdesign-mobile-react/src/swipe-cell/swipe-cell.en-US.md b/packages/products/tdesign-mobile-react/src/swipe-cell/swipe-cell.en-US.md index b27422b6b..19e1b6036 100644 --- a/packages/products/tdesign-mobile-react/src/swipe-cell/swipe-cell.en-US.md +++ b/packages/products/tdesign-mobile-react/src/swipe-cell/swipe-cell.en-US.md @@ -17,3 +17,11 @@ onChange | Function | | Typescript:`(value: string) => void`
| N onClick | Function | | Typescript:`(action: SwipeActionItem, source: SwipeSource) => void`
[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/swipe-cell/type.ts)。
`type SwipeSource = 'left' \| 'right'`
| N onDragend | Function | | Typescript:`() => void`
| N onDragstart | Function | | Typescript:`() => void`
| N + +### SwipeCellInstanceFunctions 组件实例方法 + +name | params | return | description +-- | -- | -- | -- +className | String | - | className of component | N +style | Object | - | CSS(Cascading Style Sheets),Typescript:`React.CSSProperties` | N +showSure | `(sure: string \| TNode, onClick?: SwipeActionItem['onClick'])` | `void` | Typescript:`string \| TNode;如果设置了 `onClick`,则点击二次确认内容时,会执行此onClick方法。
[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/swipe-cell/type.ts)。
`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) diff --git a/packages/products/tdesign-mobile-react/src/swipe-cell/swipe-cell.md b/packages/products/tdesign-mobile-react/src/swipe-cell/swipe-cell.md index 8da2ba1aa..2968deeb5 100644 --- a/packages/products/tdesign-mobile-react/src/swipe-cell/swipe-cell.md +++ b/packages/products/tdesign-mobile-react/src/swipe-cell/swipe-cell.md @@ -17,3 +17,11 @@ onChange | Function | | TS 类型:`(value: string) => void`
菜单展开 onClick | Function | | TS 类型:`(action: SwipeActionItem, source: SwipeSource) => void`
操作项点击时触发(插槽写法组件不触发,业务侧自定义内容和事件)。[详细类型定义](https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/swipe-cell/type.ts)。
`type SwipeSource = 'left' \| 'right'`
| N onDragend | Function | | TS 类型:`() => void`
滑动结束事件 | N onDragstart | Function | | TS 类型:`() => void`
滑动开始事件 | N + +### SwipeCellInstanceFunctions 组件实例方法 + +名称 | 参数 | 返回值 | 描述 +-- | -- | -- | -- +className | String | - | 类名 | N +style | Object | - | 样式,TS 类型:`React.CSSProperties` | N +showSure | `(sure: string \| TNode, onClick?: SwipeActionItem['onClick'])` | `void` | 显示二次确认内容的函数。
【关于参数】`sure` 表示二次确认的具体内容,同content。TS 类型:`string \| TNode;如果设置了 `onClick`,则点击二次确认内容时,会执行此onClick方法。
[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/swipe-cell/type.ts)。
`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) diff --git a/packages/products/tdesign-mobile-react/src/swipe-cell/type.ts b/packages/products/tdesign-mobile-react/src/swipe-cell/type.ts index 002ef0d77..d2425e461 100644 --- a/packages/products/tdesign-mobile-react/src/swipe-cell/type.ts +++ b/packages/products/tdesign-mobile-react/src/swipe-cell/type.ts @@ -46,6 +46,14 @@ export interface TdSwipeCellProps { onDragstart?: () => void; } +/** 组件实例方法 */ +export interface SwipeCellInstanceFunctions { + /** + * 显示二次确认内容的函数。
【关于参数】`sure` 表示二次确认的具体内容,同content + */ + showSure?: (sure: string | TNode, onClick?: SwipeActionItem['onClick']) => void; +} + export interface SwipeActionItem { text: string; className?: string; diff --git a/packages/scripts/api.json b/packages/scripts/api.json index 009854670..547a2124c 100644 --- a/packages/scripts/api.json +++ b/packages/scripts/api.json @@ -115077,7 +115077,8 @@ { "id": 1712719889, "platform_framework": [ - "8" + "8", + "16" ], "component": "SwipeCell", "field_category": 4, @@ -115106,7 +115107,8 @@ "support_default_value": 0, "field_category_text": "Functions", "platform_framework_text": [ - "Vue(Mobile)" + "Vue(Mobile)", + "React(Mobile)" ], "field_type_text": [ "String",