Skip to content

Commit 0d57140

Browse files
feat(Progress): add size props (#606)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 751f24d commit 0d57140

File tree

14 files changed

+78
-0
lines changed

14 files changed

+78
-0
lines changed

db/TDesign.db

0 Bytes
Binary file not shown.

packages/products/tdesign-miniprogram/src/progress/README.en-US.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ custom-style | Object | - | CSS(Cascading Style Sheets),used to set style on v
1111
color | String / Object / Array | '' | Typescript:`string \| Array<string> \| Record<string, string>` | N
1212
label | String / Boolean / Slot | true | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N
1313
percentage | Number | 0 | \- | N
14+
size | String / Number | 'default' | \- | N
1415
status | String | - | options: success/error/warning/active。Typescript:`ProgressStatus` `type ProgressStatus = 'success' \| 'error' \| 'warning' \| 'active'`[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/progress/type.ts) | N
1516
stroke-width | String / Number | - | \- | N
1617
theme | String | line | options: line/plump/circle。Typescript:`ProgressTheme` `type ProgressTheme = 'line' \| 'plump' \| 'circle'`[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/progress/type.ts) | N

packages/products/tdesign-miniprogram/src/progress/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ custom-style | Object | - | 样式,一般用于开启虚拟化组件节点场
1111
color | String / Object / Array | '' | 进度条颜色。示例:'#ED7B2F' 或 'orange' 或 `['#f00', '#0ff', '#f0f']``{ '0%': '#f00', '100%': '#0ff' }``{ from: '#000', to: '#000' }` 等。TS 类型:`string \| Array<string> \| Record<string, string>` | N
1212
label | String / Boolean / Slot | true | 进度百分比,可自定义。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N
1313
percentage | Number | 0 | 进度条百分比 | N
14+
size | String / Number | 'default' | 进度条尺寸,仅对环形进度条有效。可选值:default/micro。default 值为 112; micro 值为 24 | N
1415
status | String | - | 进度条状态。可选项:success/error/warning/active。TS 类型:`ProgressStatus` `type ProgressStatus = 'success' \| 'error' \| 'warning' \| 'active'`[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/progress/type.ts) | N
1516
stroke-width | String / Number | - | 进度条线宽,默认单位 `px` | N
1617
theme | String | line | 进度条风格。值为 line,标签(label)显示在进度条右侧;值为 plump,标签(label)显示在进度条里面;值为 circle,标签(label)显示在进度条正中间。可选项:line/plump/circle。TS 类型:`ProgressTheme` `type ProgressTheme = 'line' \| 'plump' \| 'circle'`[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/progress/type.ts) | N

packages/products/tdesign-miniprogram/src/progress/props.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ const props: TdProgressProps = {
2121
type: Number,
2222
value: 0,
2323
},
24+
/** 进度条尺寸,仅对环形进度条有效。可选值:default/micro。default 值为 112; micro 值为 24 */
25+
size: {
26+
type: null,
27+
value: 'default',
28+
},
2429
/** 进度条状态 */
2530
status: {
2631
type: String,

packages/products/tdesign-miniprogram/src/progress/type.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@ export interface TdProgressProps {
2929
type: NumberConstructor;
3030
value?: number;
3131
};
32+
/**
33+
* 进度条尺寸,仅对环形进度条有效。可选值:default/micro。default 值为 112; micro 值为 24
34+
* @default 'default'
35+
*/
36+
size?: {
37+
type: null;
38+
value?: string | number;
39+
};
3240
/**
3341
* 进度条状态
3442
*/

packages/products/tdesign-mobile-react/src/progress/defaultProps.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export const progressDefaultProps: TdProgressProps = {
88
color: '',
99
label: true,
1010
percentage: 0,
11+
size: 'default',
1112
theme: 'line',
1213
trackColor: '',
1314
};

packages/products/tdesign-mobile-react/src/progress/progress.en-US.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ style | Object | - | CSS(Cascading Style Sheets),Typescript:`React.CSSProper
1111
color | String / Object / Array | '' | Typescript:`string \| Array<string> \| Record<string, string>` | N
1212
label | TNode | true | Typescript:`string \| boolean \| TNode`[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N
1313
percentage | Number | 0 | \- | N
14+
size | String / Number | 'default' | \- | N
1415
status | String | - | options: success/error/warning/active。Typescript:`ProgressStatus` `type ProgressStatus = 'success' \| 'error' \| 'warning' \| 'active'`[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/progress/type.ts) | N
1516
strokeWidth | String / Number | - | \- | N
1617
theme | String | line | options: line/plump/circle。Typescript:`ProgressTheme` `type ProgressTheme = 'line' \| 'plump' \| 'circle'`[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/progress/type.ts) | N

packages/products/tdesign-mobile-react/src/progress/progress.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ style | Object | - | 样式,TS 类型:`React.CSSProperties` | N
1111
color | String / Object / Array | '' | 进度条颜色。示例:'#ED7B2F' 或 'orange' 或 `['#f00', '#0ff', '#f0f']``{ '0%': '#f00', '100%': '#0ff' }``{ from: '#000', to: '#000' }` 等。TS 类型:`string \| Array<string> \| Record<string, string>` | N
1212
label | TNode | true | 进度百分比,可自定义。TS 类型:`string \| boolean \| TNode`[通用类型定义](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N
1313
percentage | Number | 0 | 进度条百分比 | N
14+
size | String / Number | 'default' | 进度条尺寸,仅对环形进度条有效。可选值:default/micro。default 值为 112; micro 值为 24 | N
1415
status | String | - | 进度条状态。可选项:success/error/warning/active。TS 类型:`ProgressStatus` `type ProgressStatus = 'success' \| 'error' \| 'warning' \| 'active'`[详细类型定义](https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/progress/type.ts) | N
1516
strokeWidth | String / Number | - | 进度条线宽。宽度数值不能超过 size 的一半,否则不能输出环形进度 | N
1617
theme | String | line | 进度条风格。值为 line,标签(label)显示在进度条右侧;值为 plump,标签(label)显示在进度条里面;值为 circle,标签(label)显示在进度条正中间。可选项:line/plump/circle。TS 类型:`ProgressTheme` `type ProgressTheme = 'line' \| 'plump' \| 'circle'`[详细类型定义](https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/progress/type.ts) | N

packages/products/tdesign-mobile-react/src/progress/type.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ export interface TdProgressProps {
2222
* @default 0
2323
*/
2424
percentage?: number;
25+
/**
26+
* 进度条尺寸,仅对环形进度条有效。可选值:default/micro。default 值为 112; micro 值为 24
27+
* @default 'default'
28+
*/
29+
size?: string | number;
2530
/**
2631
* 进度条状态
2732
*/

packages/products/tdesign-mobile-vue/src/progress/progress.en-US.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ name | type | default | description | required
99
color | String / Object / Array | '' | Typescript:`string \| Array<string> \| Record<string, string>` | N
1010
label | String / Boolean / Slot / Function | true | Typescript:`string \| boolean \| TNode`[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N
1111
percentage | Number | 0 | \- | N
12+
size | String / Number | 'default' | \- | N
1213
status | String | - | options: success/error/warning/active。Typescript:`ProgressStatus` `type ProgressStatus = 'success' \| 'error' \| 'warning' \| 'active'`[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/progress/type.ts) | N
1314
strokeWidth | String / Number | - | \- | N
1415
theme | String | line | options: line/plump/circle。Typescript:`ProgressTheme` `type ProgressTheme = 'line' \| 'plump' \| 'circle'`[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/progress/type.ts) | N

0 commit comments

Comments
 (0)