vue中radio、select设置默认选中
radio默认选中:<span v-for="(item,index) in refArray"><input type="radio" name="inspectionRef" v-bind:value="item.id" v-model="defaultInspectionRef" class="radio"/>{{item.name}}</span>sel
·
radio默认选中:
<span v-for="(item,index) in refArray">
<input type="radio" name="inspectionRef" v-bind:value="item.id" v-model="defaultInspectionRef" class="radio"/>{{item.name}}
</span>
self.defaultInspectionRef = 默认选中的value;
select默认选中:
<select @change="onChange($event)" style="width:100px;max-width:100px;" v-model="id">
<option v-for="(item,index) in list" :value="item.userId">{{item.name}}</option>
</select>
self.id = 默认选中的value;
更多推荐
已为社区贡献2条内容
所有评论(0)