Below I will share with you an article about vue.js select drop-down box binding and value acquisition methods. It has a good reference value and I hope it will be helpful to everyone.
Recently I was working on a mui vue.js mobile project and encountered this problem, so I recorded it:
1. The code for binding the select drop-down box is very simple. sendlist is a collection of drop-down boxes. You can see the vue.js documentation for this:
Address: https://cn.vuejs.org/v2/api/
:The value bound by value is the value corresponding to this drop-down box
<select id="sendSybol" v-model="searchDto.sendSymbolId"> <option v-for="send in sendList" name="sendSymbolId" :value="send.VALUE" >{{send.CODE}}</option> </select>
2. To get the value, just get the drop-down box directly, and the attribute bound by v-model can be used
The above is what I compiled for everyone. I hope it will be helpful to everyone in the future.
Related articles:
A brief discussion on Webpack persistent caching practice
Lightweight JS Cookie plug-in js-cookie Usage method
JS animation timer knowledge summary
The above is the detailed content of Use the select drop-down box to implement binding and value methods in vue.js. For more information, please follow other related articles on the PHP Chinese website!