First, I want to say that I'm new to Vue, and this is my first project ever using Vue.
I have a combobox and want to do something different based on the selected combobox. I use a separate vue.html
and TypeScript file.
Here's my code:
<select name="LeaveType" @change="onChange()" class="form-control">
<option value="1">Annual Leave/ Off-Day</option>
<option value="2">On Demand Leave</option>
</select>
Here's my TypeScript file:
onChange(value) {
console.log(value);
}
How do I get the selected option value in my TypeScript function? Thanks.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…