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

select验证问题 #756

Closed
shaohao2014 opened this issue Oct 20, 2015 · 4 comments
Closed

select验证问题 #756

shaohao2014 opened this issue Oct 20, 2015 · 4 comments

Comments

@shaohao2014
Copy link

我的代码:
js部分:

$form.on('focusin focusout', '.am-form-error select', function(e) {...}

html部分:

<select id="class_id"  data-am-selected="{btnWidth: '60%', maxHeight: 200, placeholder: ''} required>
    <option value=""></option>
    <optgroup label="请选择一项">
    <option value="1">选项一...</option>
    <option value="1">选项二...</option>
     </optgroup>
</select>

如果select代码更改为如下,则可以通过验证,正常提示错误信息:

<select id="doc-select-1-1" required>
        <option value="">-=请选择一项=-</option>
        <option value="option1">选项一...</option>
        <option value="option2">选项二.....</option>
 </select>

为啥?

@minwe
Copy link
Contributor

minwe commented Oct 21, 2015

这两个插件结合使用还没有调试过,你只能先用原生的 <select>

@shaohao2014
Copy link
Author

对,原生的<select>可以。难道是事件绑定不正确?focusin focusout不适用于<select>?

@shaohao2014
Copy link
Author

通过<dropdown>如何实现<select>的功能?
<dropdown>有状态吗?有值吗?

@minwe
Copy link
Contributor

minwe commented Nov 27, 2015

@minwe minwe added this to the v2.5.0 milestone Nov 30, 2015
minwe pushed a commit that referenced this issue Nov 30, 2015
minwe pushed a commit that referenced this issue Nov 30, 2015
@minwe minwe closed this as completed in e63fa9c Nov 30, 2015
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

2 participants