Skip to content

Commit f3c29a2

Browse files
authored
feat: support for recording slots (#720)
* feat: support for recording slots * docs(Link): add default slot * chore(mini): no document is output when the type is empty * docs: generate slots documents for some components * fix: fix shouldShowLink func
1 parent a3e59c5 commit f3c29a2

File tree

23 files changed

+601
-47
lines changed

23 files changed

+601
-47
lines changed

db/TDesign.db

0 Bytes
Binary file not shown.

packages/products/tdesign-miniprogram/packages/components/action-sheet/README.en-US.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,9 @@ className | Description
3636
t-class | \-
3737
t-class-cancel | \-
3838
t-class-content | \-
39+
40+
### ActionSheet Slots
41+
42+
name | Description
43+
-- | --
44+
\- | \-

packages/products/tdesign-miniprogram/packages/components/action-sheet/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,9 @@ selected | `(selected: ActionSheetItem \| string, index: number)` | 选择菜单
3636
t-class | 根节点样式类
3737
t-class-cancel | 取消样式类
3838
t-class-content | 内容样式类
39+
40+
### ActionSheet Slots
41+
42+
名称 | 描述
43+
-- | --
44+
\- | 默认插槽,自定义内容区域内容

packages/products/tdesign-miniprogram/packages/components/avatar/README.en-US.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ t-class-content | \-
3434
t-class-icon | \-
3535
t-class-image | \-
3636

37+
### Avatar Slots
38+
39+
name | Description
40+
-- | --
41+
\- | \-
42+
3743

3844
### AvatarGroup Props
3945

@@ -42,11 +48,18 @@ name | type | default | description | required
4248
style | Object | - | CSS(Cascading Style Sheets) | N
4349
custom-style | Object | - | CSS(Cascading Style Sheets),used to set style on virtual component | N
4450
cascading | String | 'left-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-miniprogram/blob/develop/packages/components/avatar-group/type.ts) | N
45-
collapse-avatar | String / Slot | - | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/common/common.ts) | N
51+
collapse-avatar | String | - | \- | N
4652
max | Number | - | \- | N
4753
shape | String | - | shape。options: circle/round。Typescript:`ShapeEnum`[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/common/common.ts) | N
4854
size | String | - | size | N
4955

56+
### AvatarGroup Slots
57+
58+
name | Description
59+
-- | --
60+
\- | \-
61+
collapse-avatar | \-
62+
5063
### AvatarGroup Events
5164

5265
name | params | description

packages/products/tdesign-miniprogram/packages/components/avatar/README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ t-class-content | 内容样式类
3434
t-class-icon | 图标样式类
3535
t-class-image | 图片样式类
3636

37+
### Avatar Slots
38+
39+
名称 | 描述
40+
-- | --
41+
\- | 默认插槽,自定义内容区域内容
42+
3743

3844
### AvatarGroup Props
3945

@@ -42,11 +48,18 @@ t-class-image | 图片样式类
4248
style | Object | - | 样式 | N
4349
custom-style | Object | - | 样式,一般用于开启虚拟化组件节点场景 | N
4450
cascading | String | 'left-up' | 图片之间的层叠关系,可选值:左侧图片在上和右侧图片在上。可选项:left-up/right-up。TS 类型:`CascadingValue` `type CascadingValue = 'left-up' \| 'right-up'`[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/avatar-group/type.ts) | N
45-
collapse-avatar | String / Slot | - | 头像数量超出时,会出现一个头像折叠元素。该元素内容可自定义。默认为 `+N`。示例:`+5``...`, `更多`[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/common/common.ts) | N
51+
collapse-avatar | String | - | 头像数量超出时,会出现一个头像折叠元素。该元素内容可自定义。默认为 `+N`。示例:`+5``...`, `更多` | N
4652
max | Number | - | 能够同时显示的最多头像数量 | N
4753
shape | String | - | 形状。优先级低于 Avatar.shape。可选项:circle/round。TS 类型:`ShapeEnum`[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/common/common.ts) | N
4854
size | String | - | 尺寸,示例值:small/medium/large/24px/38px 等。优先级低于 Avatar.size | N
4955

56+
### AvatarGroup Slots
57+
58+
名称 | 描述
59+
-- | --
60+
\- | 默认插槽,自定义内容区域内容
61+
collapse-avatar | 头像数量超出时,会出现一个头像折叠元素。该元素内容可自定义。默认为 `+N`。示例:`+5``...`, `更多`
62+
5063
### AvatarGroup Events
5164

5265
名称 | 参数 | 描述

packages/products/tdesign-miniprogram/packages/components/back-top/README.en-US.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,19 @@ name | type | default | description | required
99
style | Object | - | CSS(Cascading Style Sheets) | N
1010
custom-style | Object | - | CSS(Cascading Style Sheets),used to set style on virtual component | N
1111
fixed | Boolean | true | \- | N
12-
icon | String / Boolean / Object / Slot | true | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/common/common.ts) | N
12+
icon | String / Boolean / Object | true | \- | N
1313
scroll-top | Number | 0 | \- | N
1414
text | String | '' | \- | N
1515
theme | String | round | options: round/half-round/round-dark/half-round-dark | N
1616
visibility-height | Number | 200 | \- | N
1717

18+
### BackTop Slots
19+
20+
name | Description
21+
-- | --
22+
\- | \-
23+
icon | \-
24+
1825
### BackTop Events
1926

2027
name | params | description

packages/products/tdesign-miniprogram/packages/components/back-top/README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,19 @@
99
style | Object | - | 样式 | N
1010
custom-style | Object | - | 样式,一般用于开启虚拟化组件节点场景 | N
1111
fixed | Boolean | true | 是否绝对定位固定到屏幕右下方 | N
12-
icon | String / Boolean / Object / Slot | true | 图标。值为 `false` 表示不显示图标。不传表示使用默认图标 `'backtop'`[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/common/common.ts) | N
12+
icon | String / Boolean / Object | true | 图标。值为 `false` 表示不显示图标。不传表示使用默认图标 `'backtop'` | N
1313
scroll-top | Number | 0 | 页面滚动距离 | N
1414
text | String | '' | 文案 | N
1515
theme | String | round | 预设的样式类型。可选项:round/half-round/round-dark/half-round-dark | N
1616
visibility-height | Number | 200 | 滚动高度达到此参数值才出现 | N
1717

18+
### BackTop Slots
19+
20+
名称 | 描述
21+
-- | --
22+
\- | 默认插槽,自定义内容区域内容
23+
icon | 图标
24+
1825
### BackTop Events
1926

2027
名称 | 参数 | 描述

packages/products/tdesign-miniprogram/packages/components/badge/README.en-US.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,21 @@ style | Object | - | CSS(Cascading Style Sheets) | N
1010
custom-style | Object | - | CSS(Cascading Style Sheets),used to set style on virtual component | N
1111
color | String | - | \- | N
1212
content | String | - | \- | N
13-
count | String / Number / Slot | 0 | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/common/common.ts) | N
13+
count | String / Number | 0 | \- | N
1414
dot | Boolean | false | \- | N
1515
max-count | Number | 99 | \- | N
1616
offset | Array | - | Typescript:`Array<string \| number>` | N
1717
shape | String | circle | options: circle/square/bubble/ribbon | N
1818
show-zero | Boolean | false | \- | N
1919
size | String | medium | options: medium/large | N
2020

21+
### Badge Slots
22+
23+
name | Description
24+
-- | --
25+
\- | \-
26+
count | \-
27+
2128
### Badge External Classes
2229

2330
className | Description

packages/products/tdesign-miniprogram/packages/components/badge/README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,21 @@ style | Object | - | 样式 | N
1010
custom-style | Object | - | 样式,一般用于开启虚拟化组件节点场景 | N
1111
color | String | - | 颜色 | N
1212
content | String | - | 徽标内容,示例:`content='自定义内容'`。也可以使用默认插槽定义 | N
13-
count | String / Number / Slot | 0 | 徽标右上角内容。可以是数字,也可以是文字。如:'new'/3/99+。特殊:值为空表示使用插槽渲染[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/common/common.ts) | N
13+
count | String / Number | 0 | 徽标右上角内容。可以是数字,也可以是文字。如:'new'/3/99+。特殊:值为空表示使用插槽渲染 | N
1414
dot | Boolean | false | 是否为红点 | N
1515
max-count | Number | 99 | 封顶的数字值 | N
1616
offset | Array | - | 设置状态点的位置偏移,示例:[-10, 20]['10em', '8rem']。TS 类型:`Array<string \| number>` | N
1717
shape | String | circle | 形状。可选项:circle/square/bubble/ribbon | N
1818
show-zero | Boolean | false | 当数值为 0 时,是否展示徽标 | N
1919
size | String | medium | 尺寸。可选项:medium/large | N
2020

21+
### Badge Slots
22+
23+
名称 | 描述
24+
-- | --
25+
\- | 默认插槽,自定义内容区域内容
26+
count | 徽标右上角内容
27+
2128
### Badge External Classes
2229

2330
类名 | 描述

packages/products/tdesign-miniprogram/packages/components/button/README.en-US.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ style | Object | - | CSS(Cascading Style Sheets) | N
1010
custom-style | Object | - | CSS(Cascading Style Sheets),used to set style on virtual component | N
1111
app-parameter | String | - | \- | N
1212
block | Boolean | false | make button to be a block-level element | N
13-
content | String / Slot | - | button's children elements[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/common/common.ts) | N
13+
content | String | - | button's children elements | N
1414
custom-dataset | any | - | \- | N
1515
disabled | Boolean | undefined | disable the button, make it can not be clicked | N
1616
ghost | Boolean | false | make background-color to be transparent | N
@@ -31,12 +31,20 @@ session-from | String | - | \- | N
3131
shape | String | rectangle | button shape。options: rectangle/square/round/circle | N
3232
show-message-card | Boolean | false | \- | N
3333
size | String | medium | a button has four size。options: extra-small/small/medium/large | N
34-
suffix | Slot | - | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/common/common.ts) | N
34+
3535
t-id | String | - | id | N
3636
theme | String | default | button theme。options: default/primary/danger/light | N
3737
type | String | - | type of button element, same as formType of Miniprogram。options: submit/reset | N
3838
variant | String | base | variant of button。options: base/outline/dashed/text | N
3939

40+
### Button Slots
41+
42+
name | Description
43+
-- | --
44+
\- | \-
45+
content | button's children elements
46+
suffix | \-
47+
4048
### Button Events
4149

4250
name | params | description

0 commit comments

Comments
 (0)