-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Closed
Description
Version
2.4.1
Reproduction link
https://jsfiddle.net/chrisvfritz/50wL7mdz/没有链接
Steps to reproduce
`
<div id="slct">
<select v-model="slct">
<option>A</option>
<option>B</option>
<option>C</option>
</select>
<span>Selected: {{ slct }}</span>
</div>
new Vue({
el : '#slct',
data : {
slct : '1',
},
mounted : function(){
var that = this;
setTimeout(function(){
that.slct = '11';
},1000);
},
});
初始可渲染出'1',但1秒后变成空了,
通过watch 'slct' 发现,它被改了两次(自己改为'11',然后又被改为undefined),
算是bug吗?
`
What is expected?
初始 slct 被改为undefined,
或者当改变slct时不被改变成undefined
What is actually happening?
未出现期望的两种情况之一.
当无选项被选中时,select的值都被改成undefined,
或者当无选项被选中时,都不改赋予select的值
Metadata
Metadata
Assignees
Labels
No labels