Element UI version
2.13.0
OS/Browsers version
macOS/Chrome80.0.3987.163
Vue version
2.6.11
Reproduction Link
https://codepen.io/v32vdqtgegf/pen/ZEbzawB
Steps to reproduce
- pick an option
- after 1sec delay it will show the updated value which label are expected
What is Expected?
show updated label
What is actually happening?
show value
4条答案
按热度按时间ffscu2ro1#
try this
this.$nextTick(()=>{ this.value = "value6"; })
gt0wga4j2#
I have the same problem. It seems to only happen when the focus is on the Select Box.
p1iqtdky3#
you should not watch value, because will lead your code perform twice, you can console log like what i done,and you can find that it console two times which is not necessary.
instead watch change event, update the options in this function . do not put the options change code put in setTimeout,that will lead element not notice value change.
here is the code.
https://codepen.io/littledevil7/pen/jOWrzra?editors=1011
qni6mghb4#
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.