0
Ich möchte den Wert von select tag bekommen. Also binde ich eine Variable mit V-Modell wie unten.v-model variable return ganze select statt dessen
HTML:
<div id="action_panel">
<select id="work_type" v-model="type">
<option value="" disabled selected></option>
<option value="1">A</option>
<option value="2">B</option>
</select>
<div>
JS:
var vm = new Vue({
el: '#action_panel',
data: {},
methods: {
addWorks: function(emp_id) {
console.log(type);
}
}
});
console.log() gibt die gesamte HTML-Entität von select-Tag.
Ich habe keine Hinweise auf vue.js doc.
... auch, sollten Sie es als 'this.type' innen Methoden beziehen. –