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
Binary file modified db/TDesign.db
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,11 @@ onChange | Function | | Typescript:`(value: string) => void`<br/> | N
onClick | Function | | Typescript:`(action: SwipeActionItem, source: SwipeSource) => void`<br/>[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/swipe-cell/type.ts)。<br/>`type SwipeSource = 'left' \| 'right'`<br/> | N
onDragend | Function | | Typescript:`() => void`<br/> | N
onDragstart | Function | | Typescript:`() => void`<br/> | 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方法。<br />[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/swipe-cell/type.ts)。<br/>`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts)
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,11 @@ onChange | Function | | TS 类型:`(value: string) => void`<br/>菜单展开
onClick | Function | | TS 类型:`(action: SwipeActionItem, source: SwipeSource) => void`<br/>操作项点击时触发(插槽写法组件不触发,业务侧自定义内容和事件)。[详细类型定义](https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/swipe-cell/type.ts)。<br/>`type SwipeSource = 'left' \| 'right'`<br/> | N
onDragend | Function | | TS 类型:`() => void`<br/>滑动结束事件 | N
onDragstart | Function | | TS 类型:`() => void`<br/>滑动开始事件 | N

### SwipeCellInstanceFunctions 组件实例方法

名称 | 参数 | 返回值 | 描述
-- | -- | -- | --
className | String | - | 类名 | N
style | Object | - | 样式,TS 类型:`React.CSSProperties` | N
showSure | `(sure: string \| TNode, onClick?: SwipeActionItem['onClick'])` | `void` | 显示二次确认内容的函数。<br/>【关于参数】`sure` 表示二次确认的具体内容,同content。TS 类型:`string \| TNode;如果设置了 `onClick`,则点击二次确认内容时,会执行此onClick方法。<br />[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/swipe-cell/type.ts)。<br/>`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts)
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ export interface TdSwipeCellProps {
onDragstart?: () => void;
}

/** 组件实例方法 */
export interface SwipeCellInstanceFunctions {
/**
* 显示二次确认内容的函数。<br/>【关于参数】`sure` 表示二次确认的具体内容,同content
*/
showSure?: (sure: string | TNode, onClick?: SwipeActionItem['onClick']) => void;
}

export interface SwipeActionItem {
text: string;
className?: string;
Expand Down
6 changes: 4 additions & 2 deletions packages/scripts/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -115077,7 +115077,8 @@
{
"id": 1712719889,
"platform_framework": [
"8"
"8",
"16"
],
"component": "SwipeCell",
"field_category": 4,
Expand Down Expand Up @@ -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",
Expand Down