update Input textarea

This commit is contained in:
梁灏 2019-09-14 12:32:07 +08:00
parent 4c01b87937
commit 4ffcc60bf0
2 changed files with 35 additions and 30 deletions

View file

@ -43,8 +43,8 @@
</div> </div>
<span class="ivu-input-prefix" v-else-if="showPrefix"><slot name="prefix"><i class="ivu-icon" :class="['ivu-icon-' + prefix]" v-if="prefix"></i></slot></span> <span class="ivu-input-prefix" v-else-if="showPrefix"><slot name="prefix"><i class="ivu-icon" :class="['ivu-icon-' + prefix]" v-if="prefix"></i></slot></span>
</template> </template>
<template v-else>
<textarea <textarea
v-else
:id="elementId" :id="elementId"
:wrap="wrap" :wrap="wrap"
:autocomplete="autocomplete" :autocomplete="autocomplete"
@ -71,6 +71,8 @@
@compositionend="handleComposition" @compositionend="handleComposition"
@input="handleInput"> @input="handleInput">
</textarea> </textarea>
<span class="ivu-input-word-count" v-if="showWordLimit">{{ textLength }}/{{ upperLimit }}</span>
</template>
</div> </div>
</template> </template>
<script> <script>
@ -215,7 +217,7 @@
`${prefixCls}-wrapper`, `${prefixCls}-wrapper`,
{ {
[`${prefixCls}-wrapper-${this.size}`]: !!this.size, [`${prefixCls}-wrapper-${this.size}`]: !!this.size,
[`${prefixCls}-type`]: this.type, [`${prefixCls}-type-${this.type}`]: this.type,
[`${prefixCls}-group`]: this.prepend || this.append || (this.search && this.enterButton), [`${prefixCls}-group`]: this.prepend || this.append || (this.search && this.enterButton),
[`${prefixCls}-group-${this.size}`]: (this.prepend || this.append || (this.search && this.enterButton)) && !!this.size, [`${prefixCls}-group-${this.size}`]: (this.prepend || this.append || (this.search && this.enterButton)) && !!this.size,
[`${prefixCls}-group-with-prepend`]: this.prepend, [`${prefixCls}-group-with-prepend`]: this.prepend,

View file

@ -179,7 +179,10 @@
color: @subsidiary-color; color: @subsidiary-color;
font-size: @font-size-small; font-size: @font-size-small;
} }
&-type-textarea &-word-count{
align-items: flex-end;
top: auto;
}
} }
.@{input-prefix-cls}-group{ .@{input-prefix-cls}-group{