Home >Web Front-end >H5 Tutorial >How to bind events and values ​​in the select drop-down box of vue.js

How to bind events and values ​​in the select drop-down box of vue.js

php中世界最好的语言
php中世界最好的语言Original
2018-03-27 16:18:425098browse

This time I will show you how to bind the time and value of the select drop-down box of vue.js, how to bind the select drop-down box Events and value NotesThere are Which ones, the following are practical cases, let’s take a look.

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 Simply sendlist is a collection of drop-down boxes. You can check the vue.js documentation for this:

Address: https://cn .vuejs.org/v2/api/

: The value bound to 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. Get the value directly from the drop-down box Frame, the attribute bound to v-model can be

I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related matters on the PHP Chinese website article!

Recommended reading:

Web-side application implements back force refresh

How does AjaxUpLoad.js implement file upload

The above is the detailed content of How to bind events and values ​​in the select drop-down box of vue.js. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn