From 3f958e427cfd4fc317ffb09e5d8b7ab5e76ae3a2 Mon Sep 17 00:00:00 2001 From: xuxiaoyan Date: Thu, 18 Apr 2019 15:10:16 +0800 Subject: [PATCH] feat(input-item): add prop solid to custom title width #411 --- components/input-item/README.en-US.md | 1 + components/input-item/README.md | 1 + components/input-item/index.vue | 6 +++++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/components/input-item/README.en-US.md b/components/input-item/README.en-US.md index 1a8e92ad0..081bf15c8 100644 --- a/components/input-item/README.en-US.md +++ b/components/input-item/README.en-US.md @@ -29,6 +29,7 @@ Vue.component(InputItem.name, InputItem) |name|name of input|String|-|one of the event arguments, is used to distinguish multi inputs| |v-model|value of input|String|-|-| |title|title of input|String|-|`slot left` as alternative| +|solid 2.2.1+|the width of title is fixed or not|Boolean|`true`|-| |placeholder|placeholder of input|String|-|-| |brief|description|String|-|-| |maxlength|maximum number of characters that can be entered|String/Number|-|the maxlength of `phone` type is fixed at 11| diff --git a/components/input-item/README.md b/components/input-item/README.md index ccc70b07d..a1bb56ccc 100644 --- a/components/input-item/README.md +++ b/components/input-item/README.md @@ -30,6 +30,7 @@ Vue.component(InputItem.name, InputItem) |name|表单名称|String|-|事件入参之一,可用于区分表单组件| |v-model|表单值|String|-|-| |title|表单左侧标题|String|-|可直接使用`slot left`代替| +|solid 2.2.1+|是否固定标题宽度,超出会自动换行|Boolean|`true`|-| |placeholder|表单占位符|String|-|-| |brief|表单描述|String|-|-| |maxlength|表单最大字符数|String/Number|-|`phone`类型固定为11| diff --git a/components/input-item/index.vue b/components/input-item/index.vue index 6df54f953..3ad688509 100644 --- a/components/input-item/index.vue +++ b/components/input-item/index.vue @@ -16,7 +16,7 @@ size ]" :title="title" - :solid="!isTitleLatent" + :solid="solid && !isTitleLatent" >