template:

<select v-model="selected" >
 <option v-for="option in options" v-bind:value="option.value">
   {{ option.text }}
 </option>
</select>
<span>Selected: {{ selected }}</span>

script:

 data: {
   selected: 'A',//select选中的值
   options: [
     { text: 'One', value: 'A' },
     { text: 'Two', value: 'B' },
     { text: 'Three', value: 'C' }
   ]
 }

选择就可以考到获取成功


Kason
209 声望6 粉丝