Skip to content

Commit f8a5240

Browse files
feat: ✨ InputNumber 步进器新增支持adjustPosition属性
Closes: #599
1 parent 6027b39 commit f8a5240

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

docs/component/input-number.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ function handleChange1({ value }) {
116116
| disable-input | 禁用输入框 | boolean | - | false | 0.2.14 |
117117
| disable-plus | 禁用增加按钮 | boolean | - | false | 0.2.14 |
118118
| disable-minus | 禁用减少按钮 | boolean | - | false | 0.2.14 |
119+
| adjustPosition | 原生属性,键盘弹起时,是否自动上推页面 | boolean | - | true | $LOWEST_VERSION$ |
119120

120121

121122
## Events

src/uni_modules/wot-design-uni/components/wd-input-number/types.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* @Author: weisheng
33
* @Date: 2024-03-15 20:40:34
4-
* @LastEditTime: 2024-03-18 14:58:47
4+
* @LastEditTime: 2024-09-18 09:49:12
55
* @LastEditors: weisheng
66
* @Description:
77
* @FilePath: \wot-design-uni\src\uni_modules\wot-design-uni\components\wd-input-number\types.ts
@@ -66,5 +66,9 @@ export const inputNumberProps = {
6666
/**
6767
* 输入框占位符
6868
*/
69-
placeholder: makeStringProp('')
69+
placeholder: makeStringProp(''),
70+
/**
71+
* 原生属性,键盘弹起时,是否自动上推页面
72+
*/
73+
adjustPosition: makeBooleanProp(true)
7074
}

src/uni_modules/wot-design-uni/components/wd-input-number/wd-input-number.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
:disabled="disabled || disableInput"
1212
v-model="inputValue"
1313
:placeholder="placeholder"
14+
:adjust-position="adjustPosition"
1415
@input="handleInput"
1516
@focus="handleFocus"
1617
@blur="handleBlur"

0 commit comments

Comments
 (0)