vue select列表的双向数据绑定

<div id="app">
<select v-model="selected">
<option value="">请选择</option>
<option>前端菜鸟</option>
<option>前端代码</option>
<option>前端资讯</option>
</select>
<br />
<span>{{selected}}</span>
</div>

<script type="text/javascript">
new Vue({
el:"#app",
data:{
selected:''
}
})

</script>

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: