多个选择获取文本Vuejs

时间:2017-06-01 09:22:20

标签: vue.js

我需要在多个选择中获取文本和ID。

我的Html

<select multiple="" class="form-control border-input" v-model="newSelectedAccess">
   <option v-for="role in roles" :value="role.id">{{ role.name }}</option>
</select>
<input type="button" value="Add" style="margin-top: 10px;" @click="moveSelected($event)">

我的方法:

moveSelected(e){
       console.log(this.newSelectedAccess)
      }

输出只是一个id。我无法得到文字。

enter image description here

0 个答案:

没有答案
相关问题