-
Notifications
You must be signed in to change notification settings - Fork 229
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
表单-输入框 #39
Labels
元素介绍
介绍项目中部分元素的操作或特点
Comments
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
首先从“表单”元素中,添加“输入框”到设计区,如下图
它的整体功能和“文本”非常相似,这里重点解释下“属性”面板中几个属性的意思。
输入框背后就是一个
input
标签,如<input placeholder="hoder text" value="initial value"/>
1. 占位文本
指
input
标签属性中的placeholder
属性,可用它设置提示输入什么样的内容2. 默认文本
指
input
标签属性中的value
属性,可用它设置默认填充的内容3. 扩展标记
用于对当前
input
进行特殊标识,通常与其它程序配合时,方便识别定位。最终以markAs
这个key
存在于JSON
数据中。4. 扩展样式
设计器会对使用的
input
标签提供与当前皮肤相同的默认样式,如果您需要对input
做视觉上的控制,则可以提供一个样式,如您需要先把上述样式添加到页面上,然后在该属性里,填写上
hide-border
则输入框的边框将不可见。5. 识别名称
用于序列化表单数据时,增加的一个名称属性,方便对数据快速识别。类似
<input name/>
中的name
作用6.多行模式
用于把
input
换成textarea
以便用户可以换行输入内容事件
在完成设计,嵌入到页面供用户使用时,所有的表单元素都会向外派发
elementinput
事件,在该事件内,可以实时获取用户输入的内容。比如在
document.body
上添加事件监听该
elementinput
事件增加的参数对象如下The text was updated successfully, but these errors were encountered: