获取option里的值
1.创建option内容数组:
songList: [{
value: '热歌榜',
text: '热歌榜'
},
{
value: '新歌榜',
text: '新歌榜'
},
{
value: '飙升榜',
text: '飙升榜'
},
{
value: '抖音榜',
text: '抖音榜'
},
{
value: '电音榜',
text: '电音榜'
},
],
2.使用ref绑定option,并获取内容
this.optionVLe= this.$refs.select.value;
3.循环遍历option内容
<select ref="select" name="" id="">
<option v-for="e in songList" :value="e.text">
{{e.text}}
</option>
</select>

浙公网安备 33010602011771号