diff --git a/src/stepper/README.md b/src/stepper/README.md
index 5a479b60f..265e4d8fe 100644
--- a/src/stepper/README.md
+++ b/src/stepper/README.md
@@ -51,6 +51,12 @@ export default {
```
+### Disable Input
+
+```html
+
+```
+
### Decimal Length
```html
diff --git a/src/stepper/README.zh-CN.md b/src/stepper/README.zh-CN.md
index d6708834c..2734c47dc 100644
--- a/src/stepper/README.zh-CN.md
+++ b/src/stepper/README.zh-CN.md
@@ -65,6 +65,14 @@ export default {
```
+### 禁用输入框
+
+通过设置`disabled-input`属性来禁用输入框,此时按钮仍然可以点击
+
+```html
+
+```
+
### 固定小数位数
通过设置`decimal-length`属性可以保留固定的小数位数
diff --git a/src/stepper/demo/index.vue b/src/stepper/demo/index.vue
index 066c4b2f9..31cf0fa9e 100644
--- a/src/stepper/demo/index.vue
+++ b/src/stepper/demo/index.vue
@@ -20,6 +20,10 @@
+
+
+
+
@@ -43,6 +47,7 @@ export default {
integer: '限制输入整数',
asyncChange: '异步变更',
customSize: '自定义大小',
+ disableInput: '禁用输入框',
decimalLength: '固定小数位数'
},
'en-US': {
@@ -51,6 +56,7 @@ export default {
integer: 'Integer',
asyncChange: 'Async Change',
customSize: 'Custom Size',
+ disableInput: 'Disable Input',
decimalLength: 'Decimal Length'
}
},
@@ -64,7 +70,8 @@ export default {
stepper5: 1,
stepper6: 1,
stepper7: 1,
- stepper8: 1
+ stepper8: 1,
+ disabledInput: 1
};
},
diff --git a/src/stepper/index.js b/src/stepper/index.js
index b1b2b1908..75de4ecca 100644
--- a/src/stepper/index.js
+++ b/src/stepper/index.js
@@ -289,11 +289,12 @@ export default createComponent({
role="spinbutton"
class={bem('input')}
value={this.currentValue}
+ style={this.inputStyle}
+ disabled={this.disabled}
+ readonly={this.disableInput}
aria-valuemax={this.max}
aria-valuemin={this.min}
aria-valuenow={this.currentValue}
- disabled={this.disabled || this.disableInput}
- style={this.inputStyle}
onInput={this.onInput}
onFocus={this.onFocus}
onBlur={this.onBlur}
diff --git a/src/stepper/test/__snapshots__/demo.spec.js.snap b/src/stepper/test/__snapshots__/demo.spec.js.snap
index 749c36cf8..24286cbb1 100644
--- a/src/stepper/test/__snapshots__/demo.spec.js.snap
+++ b/src/stepper/test/__snapshots__/demo.spec.js.snap
@@ -29,7 +29,13 @@ exports[`renders demo correctly 1`] = `
+