直接绑定将option中的value值绑定给v-model

<template>
<div>
<el-select v-model="query">
<el-option v-for="item in options" :key="item.value" :value="item.value" :label="item.label"></el-option>
</el-select>
</div>
</template>
<script>
export default{
data() {
return {
options: [{
value: '01',
label: '我的'
}, {
value: '02',
label: '你的'
}, {
value: '03',
label: '他的'
}],
query: '02'
}
}
}
</script>
<style></style>

elemeng-ui中el-select的默认选择项问题的更多相关文章

  1. jSP的3种方式实现radio ,checkBox,select的默认选择值。

    jSP的3种方式实现radio ,checkBox,select的默认选择值.以radiao 为例:第一种方式:在jsp中使用java 脚本,这个方法最直接,不过脚本太多,不容易维护<%Stri ...

  2. ngular ionic select ng-options 默认选择第一个值的写法

    1. html <select ng-model="selectOrderState" style="border:none;left:0" ng-opt ...

  3. element UI中的select选择器的change方法需要传递多个值

    如果直接调用change事件,不传任何参数,则可以获取到当前选中的值(因为默认会将event参数传递过去) 场景: 你需要将select选择器 ”选中的当前元素“ 和 ”其他你需要的值“ 一起传递过去 ...

  4. html中怎么设置性别默认选择

    <html><body> <form action="/example/html/form_action.asp" method="get& ...

  5. select根据text选择项与select其它操作

    // 6.设置select中text="paraText"的第一个Item为选中 function jsSelectItemByValue(objSelect, objItemTe ...

  6. zencart产品属性dropmenu select只有一个选择项时自动变成radio单选的解决办法

    includes\modules\classic\attributes.php 在大约786行代码 case ($products_options->RecordCount() == 1): 的 ...

  7. php一些单选、复选框的默认选择方法(示例)

    转载 http://www.php.cn/php-weizijiaocheng-360029.html 一. radio和checkbox及php select默认选择的实现代码 1.radio单选框 ...

  8. [jQueryUI] – Chosen:select下拉选择框美化插件及问题

    Chosen 是一个支持jquery的select下拉框美化插件,它能让丑陋的.很长的select选择框变的更好看.更方便.不仅如此,它更扩展了select,增加了自动筛选的功能.它可对列表进行分组, ...

  9. struts标签中的select

    <!-- Struts下拉列表标签: name="deptId" 下拉列表标签的名称(服务器根据这个名称获取选择的项的实际的值value值) headerKey 默认选择项的 ...

随机推荐

  1. 聚合函数:sum,count,max,avg

    聚合函数:sum,count,max,avg等,一般作用于多条记录上.通过group by可以将数据对属于一组的数据起作用. SELECT region, SUM(population), SUM(a ...

  2. LeetCode刷题: 【120】三角形最小路径和

    1. 题目: 给定一个三角形,找出自顶向下的最小路径和.每一步只能移动到下一行中相邻的结点上. 例如,给定三角形: [ [2], [3,4], [6,5,7], [4,1,8,3] ] 自顶向下的最小 ...

  3. ESET激活码,可用。

    ESET Internet Security 12.1.31.0 Finalhttps://download.eset.com/com/eset/apps/home/eis/windows/v12/1 ...

  4. How To Release and/or Renew IP Addresses on Windows XP | 2000 | NT

    Type 'ipconfig' (without the quotes) to view the status of the computer's IP address(es). If the com ...

  5. 面试题:实现call、apply、bind

    面试题:实现call.apply.bind 实现bind module.exports = function(Tcontext, ...args) { let globalThis = typeof ...

  6. data-*存数据,拿出ul li中的数据

    <ul class="questions"> <li> <div class="question">1.您的年龄是?< ...

  7. 爬虫示例--requests-module

    reuqests_test .caret, .dropup > .btn > .caret { border-top-color: #000 !important; } .label { ...

  8. Vue的路有拦截与axios的封装

    一丶首先我们先创建api与utils两个文件夹 二丶api文件夹里面新建文件api.js import request from "../utils/http" import qs ...

  9. Qt + VS【无法打开xxx文件】

    在工程中右键点击属性-配置属性-VC++目录-包含目录-选择自己安装的qt路径下的头文件包含进去即可,烦人的下杠红线也随之消失.

  10. delphi 删除文件夹里面的所有文件

    1.新增一个函数 function TForm1.DelDirAll(aDir: string): Boolean;varvSearch: TSearchRec;vRet: integer;vKey: ...