Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于使用XTextarea的一些意见, 希望表单标签增加maxlength属性来控制输入的大小,虽然原标签已经有实现但是原实现方式体验不是很好。 #276

Closed
jsven opened this issue Jun 16, 2016 · 2 comments

Comments

@jsven
Copy link

jsven commented Jun 16, 2016

0.1.1-rc3

Your Codes

//引入组件
import XTextarea from 'vux/src/components/x-textarea'
<!---使用组件-->
<x-textarea
          :required=true
          title="姓名"
          :value.sync="form.data.remark"
          :max=100
          :maxlength=100
          :placeholder="roleInfo.remarkHold"></x-textarea>

目前此组件已经支持限制输入字符的数量,但是需要等失去焦点的时候才会截取超出的数量,实现原理是通过javascript来截取超出的字符,体验的效果不是很好。

希望这个限制的数量通过html5 标签自带的数量maxlength来限制,这个效果目前组件已经实现的效果要好。对于表单输入标签增加maxlength属性的控制。

@74sharlock
Copy link

@airyland 现在npm下载的vux不包含这个更新,什么时候合并到npm分支呢

@airyland
Copy link
Owner

@74sharlock 已经在写文档准备发布了,这两天。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants