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

1.0.4 select组件默认值不是不是label的值而是value的值 #1537

Closed
yuanshengchao opened this issue Dec 3, 2016 · 7 comments
Closed

Comments

@yuanshengchao
Copy link

目前的1.0.4版本出现的select v-model的默认显示的值竟然变成了label的值,而不是value的值,一脸的懵逼。
image
image
代码中的label是绑定的中文,value绑定的是对应的id。最后显示的确实id而不是label

@Leopoldthecoder
Copy link
Contributor

试了一下无法重现:http://jsfiddle.net/leopoldthecuber/Ldkg2ohy/

请给出能重现的 demo。

@yuanshengchao
Copy link
Author

image
我这边的数据是通过ajax请求获取的。
image

@yuanshengchao
Copy link
Author

yuanshengchao commented Dec 3, 2016

我只要把版本降到1.0.3就ok。
image

@yuanshengchao
Copy link
Author

编译后就会正常
image

@yuanshengchao
Copy link
Author

请问这是什么问题?1.0.3以前都是ok的,只有到了1.0.4就bug了

@Leopoldthecoder
Copy link
Contributor

确认是 bug。暂时可以先锁定 1.0.3,下个版本修复。

如果确实需要使用 1.0.4,可以暂时把 self.date_choose = value.DateRangeID; 改成

setTimeout(function() {
  self.date_choose = value.DateRangeID;
}, 0);

@Leopoldthecoder
Copy link
Contributor

Fixed in #1540

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