From 8433b828e25120518d904ac667c4fe51b9c59873 Mon Sep 17 00:00:00 2001 From: anlyyao Date: Tue, 14 Mar 2023 17:42:18 +0800 Subject: [PATCH] feat(Stepper): update API --- db/TDesign.db | Bin 806912 -> 806912 bytes .../src/stepper/stepper.en-US.md | 29 ++++++++++++++++++ .../tdesign-mobile-vue/src/stepper/stepper.md | 29 ++++++++++++++++++ packages/scripts/api.json | 8 ++++- packages/server/app.ts | 2 +- 5 files changed, 66 insertions(+), 2 deletions(-) create mode 100644 packages/products/tdesign-mobile-vue/src/stepper/stepper.en-US.md create mode 100644 packages/products/tdesign-mobile-vue/src/stepper/stepper.md diff --git a/db/TDesign.db b/db/TDesign.db index d462158f4db3a657d6c546e92ed77fd546ddb03b..56790862938dd96adec3c43d67e5714e4a7e7f4c 100644 GIT binary patch delta 161 zcmZozVA!z0aDp_W;Y1l{Rzn88;DpAM))dCp6sD~y%nR#<8U8S^%x2eRJHQsj`j2%9 zs}IAU=@JdhPk3rNG9{T9r8&hpCC#T#?`PKGOUum3NlnquFD=Q*%uAhqyr0=}dvznT z92*mV_x9QC%pcfU7#J8z+xz>OftUq|S%H`hh}nUd1Bf|+m}`4~KX=0v#)|C%Dm)*w E0g1IY8~^|S delta 128 zcmZozVA!z0aDp_W{zMsPR(%G&Xw$}&))dCp6sD~y%nR#<8LJssX0z+E9bk)M{l~h5 z)rY@(xlj+rSnd`S#H!{nyF)=V~pWV*Y1S%8=oh}nRc9f&!A Xm=lP(w)gjQH%wu4*e;;L^FbQ`m02u~ diff --git a/packages/products/tdesign-mobile-vue/src/stepper/stepper.en-US.md b/packages/products/tdesign-mobile-vue/src/stepper/stepper.en-US.md new file mode 100644 index 000000000..d5ad3969f --- /dev/null +++ b/packages/products/tdesign-mobile-vue/src/stepper/stepper.en-US.md @@ -0,0 +1,29 @@ +:: BASE_DOC :: + +## API + +### Stepper Props + +name | type | default | description | required +-- | -- | -- | -- | -- +disableInput | Boolean | false | \- | N +disabled | Boolean | false | \- | N +inputWidth | Number | - | \- | 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-vue/blob/develop/src/common.ts) | N +step | Number | 1 | \- | N +theme | String | normal | stylish。options:normal/filled/outline | N +value | String / Number | 0 | `v-model` and `v-model:value` is supported | N +defaultValue | String / Number | 0 | uncontrolled property | N +onBlur | Function | | Typescript:`(value: string \| number) => void`
| N +onChange | Function | | Typescript:`(value: string \| number) => void`
| N +onOverlimit | Function | | Typescript:`(type: 'minus' \| 'plus') => void`
| N + +### Stepper Events + +name | params | description +-- | -- | -- +blur | `(value: string \| number)` | \- +change | `(value: string \| number)` | \- +overlimit | `(type: 'minus' \| 'plus')` | \- diff --git a/packages/products/tdesign-mobile-vue/src/stepper/stepper.md b/packages/products/tdesign-mobile-vue/src/stepper/stepper.md new file mode 100644 index 000000000..ea42801ae --- /dev/null +++ b/packages/products/tdesign-mobile-vue/src/stepper/stepper.md @@ -0,0 +1,29 @@ +:: BASE_DOC :: + +## API + +### Stepper Props + +名称 | 类型 | 默认值 | 说明 | 必传 +-- | -- | -- | -- | -- +disableInput | Boolean | false | 禁用输入框 | N +disabled | Boolean | false | 禁用全部操作 | N +inputWidth | Number | - | 输入框宽度 | N +max | Number | 100 | 最大值 | N +min | Number | 0 | 最小值 | N +size | String | medium | 组件尺寸。可选项:small/medium/large。TS 类型:`SizeEnum`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N +step | Number | 1 | 步长 | N +theme | String | normal | 组件风格。可选项:normal/filled/outline | N +value | String / Number | 0 | 值。支持语法糖 `v-model` 或 `v-model:value` | N +defaultValue | String / Number | 0 | 值。非受控属性 | N +onBlur | Function | | TS 类型:`(value: string \| number) => void`
输入框失去焦点时触发 | N +onChange | Function | | TS 类型:`(value: string \| number) => void`
数值发生变更时触发 | N +onOverlimit | Function | | TS 类型:`(type: 'minus' \| 'plus') => void`
数值超出限制时触发 | N + +### Stepper Events + +名称 | 参数 | 描述 +-- | -- | -- +blur | `(value: string \| number)` | 输入框失去焦点时触发 +change | `(value: string \| number)` | 数值发生变更时触发 +overlimit | `(type: 'minus' \| 'plus')` | 数值超出限制时触发 diff --git a/packages/scripts/api.json b/packages/scripts/api.json index 03bac97a9..443bbb249 100644 --- a/packages/scripts/api.json +++ b/packages/scripts/api.json @@ -83887,6 +83887,9 @@ { "id": 3389, "platform_framework": [ + "8", + "16", + "32", "64" ], "component": "Stepper", @@ -83915,6 +83918,9 @@ "support_default_value": 0, "field_category_text": "Props", "platform_framework_text": [ + "Vue(Mobile)", + "React(Mobile)", + "Angular(Mobile)", "Miniprogram" ], "field_type_text": [ @@ -84016,7 +84022,7 @@ "1" ], "field_default_value": "normal", - "field_enum": "normal/grey", + "field_enum": "normal/filled/outline", "field_desc_zh": "组件风格", "field_desc_en": "stylish", "field_required": 0, diff --git a/packages/server/app.ts b/packages/server/app.ts index f76b1a766..31f614f9c 100644 --- a/packages/server/app.ts +++ b/packages/server/app.ts @@ -36,4 +36,4 @@ app.use(async (ctx:Koa.Context) => { }); }); -app.listen(config.port, () => console.log(`Server running on port ${config.port}`)); +app.listen(config.port, () => console.log(`Server running on http://localhost:${config.port}`));