var list = [ { name: '苹果', code: "1001" }, { name: '雪梨', code: "1002" }, { name: '香蕉', code: "1003" }, { name: '西瓜', code: "1004" } ] <Select v-model="from.code"> <Option v-for="item in list" :value="item.code" :key="item.code"> {{item.name }} </Option> </Select>
data() { return { from: { code: '1001' } } }
这样绑定v-model绑定数据,竟然没有默认选中 苹果, 请问是错了吗?
红糖糍粑