2.4.2
https://jsfiddle.net/ntdd9g2a/86/
The second option('菜单二') in select element should be in view
The third option('菜单三') in select element is still in view
I have to use setTimeout to solve this problem. So i want to know how it happened
There seems to be a problem, indeed. I'm not sure if we already fixed this but didn't released it yet though
@posva , I didn't find the code on dev or a PR fixed this problem, so #6213 😁
Workaround for the jsFiddle example until this is fixed (which probably doesn't work in SSR):
mounted: function() {
var self = this;
window.setTimeout(function() {
self.selected = '2';
}, 0);
Vue.nextTick()
did not work.
I forked the OP jsFiddle here: https://jsfiddle.net/sidecut/ncznhLt8/
Thank you for that.