Skip to content

Commit 6457944

Browse files
committed
docs(badge): update api
1 parent a521ef8 commit 6457944

File tree

4 files changed

+9
-17
lines changed

4 files changed

+9
-17
lines changed

src/badge/README.en-US.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ name | type | default | description | required
77
-- | -- | -- | -- | --
88
color | String | - | \- | N
99
content | String | - | \- | N
10-
count | String / Number / Slot | 0 | \- | N
10+
count | String / Number / Slot | 0 | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N
1111
dot | Boolean | false | \- | N
1212
external-classes | Array | - | `['t-class', 't-class-content', 't-class-count']` | N
1313
max-count | Number | 99 | \- | N
1414
offset | Array | - | Typescript:`Array<string \| number>` | N
15-
shape | String | circle | options:circle/round/ribbon/bubble | N
15+
shape | String | circle | options:circle/square/bubble/ribbon | N
1616
show-zero | Boolean | false | \- | N
17-
size | String | medium | options:small/medium | N
17+
size | String | medium | options:medium/large | N

src/badge/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ isComponent: true
3737
-- | -- | -- | -- | --
3838
color | String | - | 颜色 | N
3939
content | String | - | 徽标内容,示例:`content='自定义内容'`。也可以使用默认插槽定义 | N
40-
count | String / Number / Slot | 0 | 徽标右上角内容。可以是数字,也可以是文字。如:'new'/3/99+。特殊:值为空表示使用插槽渲染 | N
40+
count | String / Number / Slot | 0 | 徽标右上角内容。可以是数字,也可以是文字。如:'new'/3/99+。特殊:值为空表示使用插槽渲染[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N
4141
dot | Boolean | false | 是否为红点 | N
4242
external-classes | Array | - | 组件类名,分别用于设置外层元素、默认内容、右上角内容等元素类名。`['t-class', 't-class-content', 't-class-count']` | N
4343
max-count | Number | 99 | 封顶的数字值 | N
4444
offset | Array | - | 设置状态点的位置偏移,示例:[-10, 20]['10em', '8rem']。TS 类型:`Array<string \| number>` | N
45-
shape | String | circle | 形状。可选项:circle/round/ribbon/bubble | N
45+
shape | String | circle | 形状。可选项:circle/square/bubble/ribbon | N
4646
show-zero | Boolean | false | 当数值为 0 时,是否展示徽标 | N
47-
size | String | medium | 尺寸。可选项:small/medium | N
47+
size | String | medium | 尺寸。可选项:medium/large | N

src/badge/props.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
/**
44
* 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
55
* */
6-
import { TdBadgeProps } from './type';
76

7+
import { TdBadgeProps } from './type';
88
const props: TdBadgeProps = {
99
/** 颜色 */
1010
color: {

src/badge/type.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,6 @@ export interface TdBadgeProps {
2929
type: null;
3030
value?: string | number;
3131
};
32-
/**
33-
* 自定义组件样式
34-
* @default ''
35-
*/
36-
style?: {
37-
type: StringConstructor;
38-
value?: string;
39-
};
4032
/**
4133
* 是否为红点
4234
* @default false
@@ -73,7 +65,7 @@ export interface TdBadgeProps {
7365
*/
7466
shape?: {
7567
type: StringConstructor;
76-
value?: 'circle' | 'round' | 'ribbon' | 'bubble';
68+
value?: 'circle' | 'square' | 'bubble' | 'ribbon';
7769
};
7870
/**
7971
* 当数值为 0 时,是否展示徽标
@@ -89,6 +81,6 @@ export interface TdBadgeProps {
8981
*/
9082
size?: {
9183
type: StringConstructor;
92-
value?: 'small' | 'medium';
84+
value?: 'medium' | 'large';
9385
};
9486
}

0 commit comments

Comments
 (0)