Skip to content

Commit

Permalink
Merge pull request #90 from TDesignOteam/feat/mobile-vue/stepper
Browse files Browse the repository at this point in the history
feat(Stepper): update API
  • Loading branch information
LeeJim authored Mar 15, 2023
2 parents 3d3aabe + 0908397 commit d557e6e
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 2 deletions.
Binary file modified db/TDesign.db
Binary file not shown.
29 changes: 29 additions & 0 deletions packages/products/tdesign-mobile-vue/src/stepper/stepper.en-US.md
Original file line number Diff line number Diff line change
@@ -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`<br/> | N
onChange | Function | | Typescript:`(value: string \| number) => void`<br/> | N
onOverlimit | Function | | Typescript:`(type: 'minus' \| 'plus') => void`<br/> | N

### Stepper Events

name | params | description
-- | -- | --
blur | `(value: string \| number)` | \-
change | `(value: string \| number)` | \-
overlimit | `(type: 'minus' \| 'plus')` | \-
29 changes: 29 additions & 0 deletions packages/products/tdesign-mobile-vue/src/stepper/stepper.md
Original file line number Diff line number Diff line change
@@ -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`<br/>输入框失去焦点时触发 | N
onChange | Function | | TS 类型:`(value: string \| number) => void`<br/>数值发生变更时触发 | N
onOverlimit | Function | | TS 类型:`(type: 'minus' \| 'plus') => void`<br/>数值超出限制时触发 | N

### Stepper Events

名称 | 参数 | 描述
-- | -- | --
blur | `(value: string \| number)` | 输入框失去焦点时触发
change | `(value: string \| number)` | 数值发生变更时触发
overlimit | `(type: 'minus' \| 'plus')` | 数值超出限制时触发
8 changes: 7 additions & 1 deletion packages/scripts/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -83887,6 +83887,9 @@
{
"id": 3389,
"platform_framework": [
"8",
"16",
"32",
"64"
],
"component": "Stepper",
Expand Down Expand Up @@ -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": [
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion packages/server/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`));

0 comments on commit d557e6e

Please sign in to comment.