From c3a9f3895b0df00111b5233489c54bca08ec8640 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E7=81=8F?= Date: Fri, 6 Jan 2017 11:30:01 +0800 Subject: [PATCH] update Input update Input --- src/components/input/input.vue | 5 ++ src/styles/components/form.less | 6 +++ test/routers/form.vue | 82 +++++++++++++++++++++++++++++++++ 3 files changed, 93 insertions(+) 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 @@