[bugfix] Stepper: integer wrong spelling (#992)

This commit is contained in:
neverland 2018-05-05 13:31:01 +08:00 committed by GitHub
parent 3f8369e599
commit d9fa0ff65d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 11 additions and 11 deletions

View File

@ -11,7 +11,7 @@
<demo-block :title="$t('advancedUsage')"> <demo-block :title="$t('advancedUsage')">
<van-stepper <van-stepper
v-model="stepper2" v-model="stepper2"
interger integer
:min="5" :min="5"
:max="40" :max="40"
:step="2" :step="2"

View File

@ -36,7 +36,7 @@ export default {
```html ```html
<van-stepper <van-stepper
v-model="value" v-model="value"
interger integer
:min="5" :min="5"
:max="40" :max="40"
:step="2" :step="2"
@ -52,7 +52,7 @@ export default {
| max | Max value | `String | Number` | - | | max | Max value | `String | Number` | - |
| default-value | Default value | `String | Number` | `1` | | default-value | Default value | `String | Number` | `1` |
| step | Value change step | `String | Number` | `1` | | step | Value change step | `String | Number` | `1` |
| interger | Whether to allow only integers | `Boolean` | `false` | | integer | Whether to allow only integers | `Boolean` | `false` |
| disabled | Disable value change | `Boolean` | `false` | | disabled | Disable value change | `Boolean` | `false` |
| disable-input | Disable input | `Boolean` | `false` | | disable-input | Disable input | `Boolean` | `false` |

View File

@ -39,7 +39,7 @@ export default {
```html ```html
<van-stepper <van-stepper
v-model="value" v-model="value"
interger integer
:min="5" :min="5"
:max="40" :max="40"
:step="2" :step="2"
@ -55,7 +55,7 @@ export default {
| max | 最大值 | `String | Number` | - | | max | 最大值 | `String | Number` | - |
| default-value | 默认值 | `String | Number` | `1` | | default-value | 默认值 | `String | Number` | `1` |
| step | 步数 | `String | Number` | `1` | | step | 步数 | `String | Number` | `1` |
| interger | 是否只允许输入整数 | `Boolean` | `false` | | integer | 是否只允许输入整数 | `Boolean` | `false` |
| disabled | 是否禁用 | `Boolean` | `false` | | disabled | 是否禁用 | `Boolean` | `false` |
| disable-input | 是否禁用input框 | `Boolean` | `false` | | disable-input | 是否禁用input框 | `Boolean` | `false` |

View File

@ -27,7 +27,7 @@ export default create({
props: { props: {
value: {}, value: {},
interger: Boolean, integer: Boolean,
disabled: Boolean, disabled: Boolean,
disableInput: Boolean, disableInput: Boolean,
min: { min: {
@ -116,7 +116,7 @@ export default create({
}, },
onKeypress(event) { onKeypress(event) {
if (this.interger && event.keyCode === 46) { if (this.integer && event.keyCode === 46) {
event.preventDefault(); event.preventDefault();
} }
}, },

View File

@ -8,7 +8,7 @@
<div :class="b('price')"> <div :class="b('price')">
<template v-if="hasPrice"> <template v-if="hasPrice">
<span>{{ label || $t('label') }}</span> <span>{{ label || $t('label') }}</span>
<span :class="b('price-interger')">{{ currency }}{{ priceInterger }}.</span> <span :class="b('price-integer')">{{ currency }}{{ priceInterger }}.</span>
<span :class="b('price-decimal')">{{ priceDecimal }}</span> <span :class="b('price-decimal')">{{ priceDecimal }}</span>
</template> </template>
</div> </div>

View File

@ -35,7 +35,7 @@
} }
} }
&__price-interger { &__price-integer {
color: $red; color: $red;
} }

View File

@ -22,7 +22,7 @@ describe('SubmitBar', () => {
DOMChecker(wrapper, { DOMChecker(wrapper, {
text: { text: {
'.van-button__text': props.buttonText, '.van-button__text': props.buttonText,
'.van-submit-bar__price-interger': '¥30.', '.van-submit-bar__price-integer': '¥30.',
'.van-submit-bar__price-decimal': '50', '.van-submit-bar__price-decimal': '50',
'.van-submit-bar__tip': props.tip '.van-submit-bar__tip': props.tip
} }
@ -41,7 +41,7 @@ describe('SubmitBar', () => {
DOMChecker(wrapper, { DOMChecker(wrapper, {
text: { text: {
'.van-button__text': '提交订单', '.van-button__text': '提交订单',
'.van-submit-bar__price-interger': '¥30.', '.van-submit-bar__price-integer': '¥30.',
'.van-submit-bar__price-decimal': '05', '.van-submit-bar__price-decimal': '05',
'.van-submit-bar__tip': '' '.van-submit-bar__tip': ''
} }