diff --git a/src/components/input/input.vue b/src/components/input/input.vue index 5d12ffae..066079d3 100644 --- a/src/components/input/input.vue +++ b/src/components/input/input.vue @@ -12,6 +12,7 @@ :readonly="readonly" :name="name" v-model="value" + :number="number" @keyup.enter="handleEnter" @focus="handleFocus" @blur="handleBlur" @@ -87,6 +88,10 @@ }, name: { type: String + }, + number: { + type: Boolean, + default: false } }, data () { diff --git a/src/styles/components/form.less b/src/styles/components/form.less index a6c580f9..ee2f07fc 100644 --- a/src/styles/components/form.less +++ b/src/styles/components/form.less @@ -38,6 +38,12 @@ line-height: 32px; font-size: @font-size-small; } + & & { + margin-bottom: 0; + } + & & &-content { + margin-left: 0!important; + } &-error-tip{ position: absolute; diff --git a/test/routers/form.vue b/test/routers/form.vue index 31e28106..ba5620fc 100644 --- a/test/routers/form.vue +++ b/test/routers/form.vue @@ -1,5 +1,23 @@