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 value 为object时 怎么初始化默认项? #1780
Comments
你需要确保引用的是同一个对象:http://jsfiddle.net/leopoldthecuber/vcgftLvn/10/ |
@Leopoldthecoder 如果是远程搜索 搜索怎么保证同一个对象? |
那么目前是无法做到的。因为对于一个没有存在于 options 中的 value,Select 是不知道需要把 value 的哪个字段显示出来的(所以你看到的是空白)。 如果 value 的值是字符串或数字,那么 Select 会把它本身显示出来。 |
@Leopoldthecoder 为什么不能做成像https://github.com/monterail/vue-multiselect/tree/2.0这样 |
2.13.2版本后,在el-select元素上加上属性value-key="key",即可 |
demo:http://jsfiddle.net/vcgftLvn/9/
The text was updated successfully, but these errors were encountered: