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
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ align | String | center | options: center/left | N
cancelText | String | - | \- | N
count | Number | 8 | \- | N
description | String | - | \- | N
items | Array | - | Typescript: `Array<string \| ActionSheetItem>` `interface ActionSheetItem { label: string; description?: string; color?: string; disabled?: boolean; icon?: string \| TNode; suffixIcon?: TNode; badge?: BadgeProps }`,[Badge API Documents](./badge?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts)。[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/action-sheet/type.ts) | N
popupProps | Object | {} | Typescript: `PopupProps`,[Popup API Documents](./popup?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/action-sheet/type.ts) | N
items | Array | - | Typescript: `Array<string \| ActionSheetItem>` `interface ActionSheetItem { label: string; description?: string; color?: string; disabled?: boolean; icon?: string \| TNode; suffixIcon?: TNode; badge?: BadgeProps }`,[Badge API Documents](./badge?tab=api). [see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/mobile-components/common.ts). [see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/mobile-components/action-sheet/type.ts) | N
popupProps | Object | {} | Typescript: `PopupProps`,[Popup API Documents](./popup?tab=api). [see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/mobile-components/action-sheet/type.ts) | N
showCancel | Boolean | true | \- | N
showOverlay | Boolean | true | \- | N
theme | String | list | options: list/grid | N
visible | Boolean | false | \- | N
defaultVisible | Boolean | false | uncontrolled property | N
onCancel | Function | | Typescript: `(context: { e: MouseEvent }) => void`<br/> | N
onClose | Function | | Typescript: `(trigger: ActionSheetTriggerSource) => void`<br/>[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/action-sheet/type.ts)。<br/>`type ActionSheetTriggerSource = 'overlay' \| 'command' \| 'select' `<br/> | N
onClose | Function | | Typescript: `(trigger: ActionSheetTriggerSource) => void`<br/>[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/mobile-components/action-sheet/type.ts). <br/>`type ActionSheetTriggerSource = 'overlay' \| 'command' \| 'select' `<br/> | N
onSelected | Function | | Typescript: `(selected: ActionSheetItem \| string, index: number) => void`<br/> | N

### CSS Variables
Expand Down
6 changes: 3 additions & 3 deletions packages/mobile-components/action-sheet/action-sheet.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ align | String | center | 水平对齐方式。可选项:center/left | N
cancelText | String | - | 设置取消按钮的文本 | N
count | Number | 8 | 设置每页展示菜单的数量,仅当 type=grid 时有效 | N
description | String | - | 动作面板描述文字 | N
items | Array | - | 菜单项。TS 类型:`Array<string \| ActionSheetItem>` `interface ActionSheetItem { label: string; description?: string; color?: string; disabled?: boolean; icon?: string \| TNode; suffixIcon?: TNode; badge?: BadgeProps }`,[Badge API Documents](./badge?tab=api)。[通用类型定义](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts)。[详细类型定义](https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/action-sheet/type.ts) | N
popupProps | Object | {} | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/action-sheet/type.ts) | N
items | Array | - | 菜单项。TS 类型:`Array<string \| ActionSheetItem>` `interface ActionSheetItem { label: string; description?: string; color?: string; disabled?: boolean; icon?: string \| TNode; suffixIcon?: TNode; badge?: BadgeProps }`,[Badge API Documents](./badge?tab=api)。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/packages/mobile-components/common.ts)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/packages/mobile-components/action-sheet/type.ts) | N
popupProps | Object | {} | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/packages/mobile-components/action-sheet/type.ts) | N
showCancel | Boolean | true | 是否显示取消按钮 | N
showOverlay | Boolean | true | 是否显示遮罩层 | N
theme | String | list | 展示类型,列表和表格形式展示。可选项:list/grid | N
visible | Boolean | false | 显示与隐藏 | N
defaultVisible | Boolean | false | 显示与隐藏。非受控属性 | N
onCancel | Function | | TS 类型:`(context: { e: MouseEvent }) => void`<br/>点击取消按钮时触发 | N
onClose | Function | | TS 类型:`(trigger: ActionSheetTriggerSource) => void`<br/>关闭时触发。[详细类型定义](https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/action-sheet/type.ts)。<br/>`type ActionSheetTriggerSource = 'overlay' \| 'command' \| 'select' `<br/> | N
onClose | Function | | TS 类型:`(trigger: ActionSheetTriggerSource) => void`<br/>关闭时触发。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/packages/mobile-components/action-sheet/type.ts)。<br/>`type ActionSheetTriggerSource = 'overlay' \| 'command' \| 'select' `<br/> | N
onSelected | Function | | TS 类型:`(selected: ActionSheetItem \| string, index: number) => void`<br/>选择菜单项时触发 | N

### CSS Variables
Expand Down
16 changes: 8 additions & 8 deletions packages/mobile-components/avatar/avatar.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ name | type | default | description | required
className | String | - | className of component | N
style | Object | - | CSS(Cascading Style Sheets),Typescript: `React.CSSProperties` | N
alt | String | - | show it when url is not valid | N
badgeProps | Object | - | Typescript: `BadgeProps`,[Badge API Documents](./badge?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/avatar/type.ts) | N
children | TNode | - | children, same as `content`。Typescript: `string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N
badgeProps | Object | - | Typescript: `BadgeProps`,[Badge API Documents](./badge?tab=api). [see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/mobile-components/avatar/type.ts) | N
children | TNode | - | children, same as `content`. Typescript: `string \| TNode`. [see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/mobile-components/common.ts) | N
hideOnLoadFailed | Boolean | false | hide image when loading image failed | N
icon | TElement | - | use icon to fill。Typescript: `TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N
icon | TElement | - | use icon to fill. Typescript: `TNode`. [see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/mobile-components/common.ts) | N
image | String | - | images url | N
imageProps | Object | - | Typescript: `ImageProps`,[Image API Documents](./image?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/avatar/type.ts) | N
shape | String | - | shape。options: circle/round。Typescript: `ShapeEnum`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N
imageProps | Object | - | Typescript: `ImageProps`,[Image API Documents](./image?tab=api). [see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/mobile-components/avatar/type.ts) | N
shape | String | - | shape. options: circle/round. Typescript: `ShapeEnum`. [see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/mobile-components/common.ts) | N
size | String | - | size | N
onError | Function | | Typescript: `(context: { e: Event }) => void`<br/>trigger on image load failed | N

Expand All @@ -26,10 +26,10 @@ name | type | default | description | required
-- | -- | -- | -- | --
className | String | - | className of component | N
style | Object | - | CSS(Cascading Style Sheets),Typescript: `React.CSSProperties` | N
cascading | String | 'right-up' | multiple images cascading。options: left-up/right-up。Typescript: `CascadingValue` `type CascadingValue = 'left-up' \| 'right-up'`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/avatar/type.ts) | N
collapseAvatar | TNode | - | Typescript: `string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N
cascading | String | 'right-up' | multiple images cascading. options: left-up/right-up. Typescript: `CascadingValue` `type CascadingValue = 'left-up' \| 'right-up'`. [see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/mobile-components/avatar/type.ts) | N
collapseAvatar | TNode | - | Typescript: `string \| TNode`. [see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/mobile-components/common.ts) | N
max | Number | - | \- | N
shape | String | - | shape。options: circle/round。Typescript: `ShapeEnum`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N
shape | String | - | shape. options: circle/round. Typescript: `ShapeEnum`. [see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/mobile-components/common.ts) | N
size | String | - | size | N
onCollapsedItemClick | Function | | Typescript: `(context: { e: MouseEvent }) => void`<br/> | N

Expand Down
16 changes: 8 additions & 8 deletions packages/mobile-components/avatar/avatar.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
className | String | - | 类名 | N
style | Object | - | 样式,TS 类型:`React.CSSProperties` | N
alt | String | - | 头像替换文本,仅当图片加载失败时有效 | N
badgeProps | Object | - | 头像右上角提示信息,继承 Badge 组件的全部特性。如:小红点,或者数字。TS 类型:`BadgeProps`,[Badge API Documents](./badge?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/avatar/type.ts) | N
children | TNode | - | 子元素内容,同 content。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N
badgeProps | Object | - | 头像右上角提示信息,继承 Badge 组件的全部特性。如:小红点,或者数字。TS 类型:`BadgeProps`,[Badge API Documents](./badge?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/packages/mobile-components/avatar/type.ts) | N
children | TNode | - | 子元素内容,同 content。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/packages/mobile-components/common.ts) | N
hideOnLoadFailed | Boolean | false | 加载失败时隐藏图片 | N
icon | TElement | - | 图标。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N
icon | TElement | - | 图标。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/packages/mobile-components/common.ts) | N
image | String | - | 图片地址 | N
imageProps | Object | - | 透传至 Image 组件。TS 类型:`ImageProps`,[Image API Documents](./image?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/avatar/type.ts) | N
shape | String | - | 形状。优先级高于 AvatarGroup.shape 。Avatar 单独存在时,默认值为 circle。如果父组件 AvatarGroup 存在,默认值便由 AvatarGroup.shape 决定。可选项:circle/round。TS 类型:`ShapeEnum`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N
imageProps | Object | - | 透传至 Image 组件。TS 类型:`ImageProps`,[Image API Documents](./image?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/packages/mobile-components/avatar/type.ts) | N
shape | String | - | 形状。优先级高于 AvatarGroup.shape 。Avatar 单独存在时,默认值为 circle。如果父组件 AvatarGroup 存在,默认值便由 AvatarGroup.shape 决定。可选项:circle/round。TS 类型:`ShapeEnum`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/packages/mobile-components/common.ts) | N
size | String | - | 尺寸,示例值:small/medium/large/24px/38px 等。优先级高于 AvatarGroup.size 。Avatar 单独存在时,默认值为 medium。如果父组件 AvatarGroup 存在,默认值便由 AvatarGroup.size 决定 | N
onError | Function | | TS 类型:`(context: { e: Event }) => void`<br/>图片加载失败时触发 | N

Expand All @@ -26,10 +26,10 @@ onError | Function | | TS 类型:`(context: { e: Event }) => void`<br/>图片
-- | -- | -- | -- | --
className | String | - | 类名 | N
style | Object | - | 样式,TS 类型:`React.CSSProperties` | N
cascading | String | 'right-up' | 图片之间的层叠关系,可选值:左侧图片在上和右侧图片在上。可选项:left-up/right-up。TS 类型:`CascadingValue` `type CascadingValue = 'left-up' \| 'right-up'`。[详细类型定义](https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/avatar/type.ts) | N
collapseAvatar | TNode | - | 头像数量超出时,会出现一个头像折叠元素。该元素内容可自定义。默认为 `+N`。示例:`+5`,`...`, `更多`。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N
cascading | String | 'right-up' | 图片之间的层叠关系,可选值:左侧图片在上和右侧图片在上。可选项:left-up/right-up。TS 类型:`CascadingValue` `type CascadingValue = 'left-up' \| 'right-up'`。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/packages/mobile-components/avatar/type.ts) | N
collapseAvatar | TNode | - | 头像数量超出时,会出现一个头像折叠元素。该元素内容可自定义。默认为 `+N`。示例:`+5`,`...`, `更多`。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/packages/mobile-components/common.ts) | N
max | Number | - | 能够同时显示的最多头像数量 | N
shape | String | - | 形状。优先级低于 Avatar.shape。可选项:circle/round。TS 类型:`ShapeEnum`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N
shape | String | - | 形状。优先级低于 Avatar.shape。可选项:circle/round。TS 类型:`ShapeEnum`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/packages/mobile-components/common.ts) | N
size | String | - | 尺寸,示例值:small/medium/large/24px/38px 等。优先级低于 Avatar.size | N
onCollapsedItemClick | Function | | TS 类型:`(context: { e: MouseEvent }) => void`<br/>点击头像折叠元素触发 | N

Expand Down
2 changes: 1 addition & 1 deletion packages/mobile-components/back-top/back-top.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ className | String | - | className of component | N
style | Object | - | CSS(Cascading Style Sheets),Typescript: `React.CSSProperties` | N
container | Function | - | Typescript: `() => HTMLElement` | N
fixed | Boolean | true | \- | N
icon | TNode | true | Typescript: `boolean \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N
icon | TNode | true | Typescript: `boolean \| TNode`. [see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/mobile-components/common.ts) | N
target | Function | - | Typescript: `() => HTMLElement` | N
text | String | '' | \- | N
theme | String | round | options: round/half-round/round-dark/half-round-dark | N
Expand Down
2 changes: 1 addition & 1 deletion packages/mobile-components/back-top/back-top.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ className | String | - | 类名 | N
style | Object | - | 样式,TS 类型:`React.CSSProperties` | N
container | Function | - | 滚动的容器。TS 类型:`() => HTMLElement` | N
fixed | Boolean | true | 是否绝对定位固定到屏幕右下方 | N
icon | TNode | true | 图标。TS 类型:`boolean \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N
icon | TNode | true | 图标。TS 类型:`boolean \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/packages/mobile-components/common.ts) | N
target | Function | - | 定位滚动到指定对象。TS 类型:`() => HTMLElement` | N
text | String | '' | 文案 | N
theme | String | round | 预设的样式类型。可选项:round/half-round/round-dark/half-round-dark | N
Expand Down
6 changes: 3 additions & 3 deletions packages/mobile-components/badge/badge.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ name | type | default | description | required
-- | -- | -- | -- | --
className | String | - | className of component | N
style | Object | - | CSS(Cascading Style Sheets),Typescript: `React.CSSProperties` | N
children | TNode | - | Typescript: `string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N
children | TNode | - | Typescript: `string \| TNode`. [see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/mobile-components/common.ts) | N
color | String | - | \- | N
content | TNode | - | Typescript: `string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N
count | TNode | 0 | Typescript: `string \| number \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N
content | TNode | - | Typescript: `string \| TNode`. [see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/mobile-components/common.ts) | N
count | TNode | 0 | Typescript: `string \| number \| TNode`. [see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/mobile-components/common.ts) | N
dot | Boolean | false | \- | N
maxCount | Number | 99 | \- | N
offset | Array | - | Typescript: `Array<string \| number>` | N
Expand Down
6 changes: 3 additions & 3 deletions packages/mobile-components/badge/badge.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
-- | -- | -- | -- | --
className | String | - | 类名 | N
style | Object | - | 样式,TS 类型:`React.CSSProperties` | N
children | TNode | - | 徽标内容,同 content。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N
children | TNode | - | 徽标内容,同 content。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/packages/mobile-components/common.ts) | N
color | String | - | 颜色 | N
content | TNode | - | 徽标内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N
count | TNode | 0 | 徽标右上角内容。可以是数字,也可以是文字。如:'new'/3/99+。TS 类型:`string \| number \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N
content | TNode | - | 徽标内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/packages/mobile-components/common.ts) | N
count | TNode | 0 | 徽标右上角内容。可以是数字,也可以是文字。如:'new'/3/99+。TS 类型:`string \| number \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/packages/mobile-components/common.ts) | N
dot | Boolean | false | 是否为红点 | N
maxCount | Number | 99 | 封顶的数字值 | N
offset | Array | - | 设置状态点的位置偏移,示例:[-10, 20] 或 ['10em', '8rem']。TS 类型:`Array<string \| number>` | N
Expand Down
Loading
Loading