Skip to content

Commit

Permalink
feat(input-item):add prop solid to custom title width (didi#413)
Browse files Browse the repository at this point in the history
* Update readme

* feat(input-item): add prop solid to custom title width

didi#411
  • Loading branch information
xxyan0205 authored and moyus committed Apr 18, 2019
1 parent 4a8fbae commit 58352d6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions components/input-item/README.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <sup class="version-after">2.2.1+</sup>|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|
Expand Down
1 change: 1 addition & 0 deletions components/input-item/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Vue.component(InputItem.name, InputItem)
|name|表单名称|String|-|事件入参之一,可用于区分表单组件|
|v-model|表单值|String|-|-|
|title|表单左侧标题|String|-|可直接使用`slot left`代替|
|solid <sup class="version-after">2.2.1+</sup>|是否固定标题宽度,超出会自动换行|Boolean|`true`|-|
|placeholder|表单占位符|String|-|-|
|brief|表单描述|String|-|-|
|maxlength|表单最大字符数|String/Number|-|`phone`类型固定为11|
Expand Down
6 changes: 5 additions & 1 deletion components/input-item/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
size
]"
:title="title"
:solid="!isTitleLatent"
:solid="solid && !isTitleLatent"
>
<template slot="left">
<slot name="left"></slot>
Expand Down Expand Up @@ -191,6 +191,10 @@ export default {
type: Boolean,
default: false,
},
solid: {
type: Boolean,
default: true,
},
clearable: {
type: Boolean,
default: false,
Expand Down

0 comments on commit 58352d6

Please sign in to comment.