-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
taninsist
committed
Sep 11, 2024
1 parent
569272e
commit a12d904
Showing
4 changed files
with
148 additions
and
0 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
packages/products/tdesign-mobile-react/src/stepper/defaultProps.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC | ||
* */ | ||
|
||
import { TdStepperProps } from './type'; | ||
|
||
export const stepperDefaultProps: TdStepperProps = { | ||
disableInput: false, | ||
disabled: undefined, | ||
integer: true, | ||
max: 100, | ||
min: 0, | ||
size: 'medium', | ||
step: 1, | ||
theme: 'normal', | ||
defaultValue: 0, | ||
}; |
26 changes: 26 additions & 0 deletions
26
packages/products/tdesign-mobile-react/src/stepper/stepper.en-US.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
:: BASE_DOC :: | ||
|
||
## API | ||
|
||
|
||
### Stepper Props | ||
|
||
name | type | default | description | required | ||
-- | -- | -- | -- | -- | ||
className | String | - | className of component | N | ||
style | Object | - | CSS(Cascading Style Sheets),Typescript:`React.CSSProperties` | N | ||
disableInput | Boolean | false | \- | N | ||
disabled | Boolean | undefined | \- | N | ||
inputWidth | Number | - | \- | N | ||
integer | Boolean | true | \- | N | ||
max | Number | 100 | \- | N | ||
min | Number | 0 | \- | N | ||
size | String | medium | options: small/medium/large。Typescript:`SizeEnum`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N | ||
step | Number | 1 | \- | N | ||
theme | String | normal | stylish。options: normal/filled/outline | N | ||
value | String / Number | 0 | \- | N | ||
defaultValue | String / Number | 0 | uncontrolled property | N | ||
onBlur | Function | | Typescript:`(value: string \| number) => void`<br/> | N | ||
onChange | Function | | Typescript:`(value: string \| number) => void`<br/> | N | ||
onFocus | Function | | Typescript:`(value: string \| number) => void`<br/> | N | ||
onOverlimit | Function | | Typescript:`(type: 'minus' \| 'plus') => void`<br/> | N |
26 changes: 26 additions & 0 deletions
26
packages/products/tdesign-mobile-react/src/stepper/stepper.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
:: BASE_DOC :: | ||
|
||
## API | ||
|
||
|
||
### Stepper Props | ||
|
||
名称 | 类型 | 默认值 | 描述 | 必传 | ||
-- | -- | -- | -- | -- | ||
className | String | - | 类名 | N | ||
style | Object | - | 样式,TS 类型:`React.CSSProperties` | N | ||
disableInput | Boolean | false | 禁用输入框 | N | ||
disabled | Boolean | undefined | 禁用全部操作 | N | ||
inputWidth | Number | - | 输入框宽度 | N | ||
integer | Boolean | true | 是否整型 | N | ||
max | Number | 100 | 最大值 | N | ||
min | Number | 0 | 最小值 | N | ||
size | String | medium | 组件尺寸。可选项:small/medium/large。TS 类型:`SizeEnum`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N | ||
step | Number | 1 | 步长 | N | ||
theme | String | normal | 组件风格。可选项:normal/filled/outline | N | ||
value | String / Number | 0 | 值 | N | ||
defaultValue | String / Number | 0 | 值。非受控属性 | N | ||
onBlur | Function | | TS 类型:`(value: string \| number) => void`<br/>输入框失去焦点时触发 | N | ||
onChange | Function | | TS 类型:`(value: string \| number) => void`<br/>数值发生变更时触发 | N | ||
onFocus | Function | | TS 类型:`(value: string \| number) => void`<br/>输入框聚焦时触发 | N | ||
onOverlimit | Function | | TS 类型:`(type: 'minus' \| 'plus') => void`<br/>数值超出限制时触发 | N |
79 changes: 79 additions & 0 deletions
79
packages/products/tdesign-mobile-react/src/stepper/type.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
/* eslint-disable */ | ||
|
||
/** | ||
* 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC | ||
* */ | ||
|
||
import { SizeEnum } from '../common'; | ||
|
||
export interface TdStepperProps { | ||
/** | ||
* 禁用输入框 | ||
* @default false | ||
*/ | ||
disableInput?: boolean; | ||
/** | ||
* 禁用全部操作 | ||
*/ | ||
disabled?: boolean; | ||
/** | ||
* 输入框宽度 | ||
*/ | ||
inputWidth?: number; | ||
/** | ||
* 是否整型 | ||
* @default true | ||
*/ | ||
integer?: boolean; | ||
/** | ||
* 最大值 | ||
* @default 100 | ||
*/ | ||
max?: number; | ||
/** | ||
* 最小值 | ||
* @default 0 | ||
*/ | ||
min?: number; | ||
/** | ||
* 组件尺寸 | ||
* @default medium | ||
*/ | ||
size?: SizeEnum; | ||
/** | ||
* 步长 | ||
* @default 1 | ||
*/ | ||
step?: number; | ||
/** | ||
* 组件风格 | ||
* @default normal | ||
*/ | ||
theme?: 'normal' | 'filled' | 'outline'; | ||
/** | ||
* 值 | ||
* @default 0 | ||
*/ | ||
value?: string | number; | ||
/** | ||
* 值,非受控属性 | ||
* @default 0 | ||
*/ | ||
defaultValue?: string | number; | ||
/** | ||
* 输入框失去焦点时触发 | ||
*/ | ||
onBlur?: (value: string | number) => void; | ||
/** | ||
* 数值发生变更时触发 | ||
*/ | ||
onChange?: (value: string | number) => void; | ||
/** | ||
* 输入框聚焦时触发 | ||
*/ | ||
onFocus?: (value: string | number) => void; | ||
/** | ||
* 数值超出限制时触发 | ||
*/ | ||
onOverlimit?: (type: 'minus' | 'plus') => void; | ||
} |