diff --git a/src/form/demo/FieldType.vue b/src/form/demo/FieldType.vue index 4daac1680..f01f43b1e 100644 --- a/src/form/demo/FieldType.vue +++ b/src/form/demo/FieldType.vue @@ -13,6 +13,10 @@ + + + +
{{ $t('submit') }}
@@ -27,6 +31,7 @@ export default { rate: '评分', submit: '提交', switch: '开关', + stepper: '步进器', checkbox: '复选框', fieldType: '表单项类型', requireCheckbox: '请勾选复选框', @@ -35,6 +40,7 @@ export default { rate: 'Rate', submit: 'Submit', switch: 'Switch', + stepper: 'Stepper', checkbox: 'Checkbox', fieldType: 'Field Type', requireCheckbox: 'Checkbox is required', @@ -44,6 +50,7 @@ export default { data() { return { rate: 3, + stepper: 1, checkbox: false, switchChecked: false, }; diff --git a/src/stepper/index.js b/src/stepper/index.js index cbb75c6e0..8e887cdd4 100644 --- a/src/stepper/index.js +++ b/src/stepper/index.js @@ -1,6 +1,7 @@ import { createNamespace, isDef, addUnit } from '../utils'; import { resetScroll } from '../utils/dom/reset-scroll'; import { preventDefault } from '../utils/dom/event'; +import { FieldMixin } from '../mixins/field'; const [createComponent, bem] = createNamespace('stepper'); @@ -18,6 +19,8 @@ function add(num1, num2) { } export default createComponent({ + mixins: [FieldMixin], + props: { value: null, integer: Boolean,