element-ui select
1. 组合 label
<!DOCTYPE html>
<html> <head>
<meta charset="UTF-8">
<!-- import CSS -->
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
</head> <body>
<div id="app">
<el-select v-model="options[0].value" placeholder="请选择">
<!-- <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
<template slot-scope></template>
</el-option> -->
<el-option v-for="(item,index) in options" :key="index" :label="`${item.label}-${item.value}`" :value="item.value">
<!-- <template slot-scope></template> -->
</el-option>
</el-select>
</div>
</body>
<!-- import Vue before Element -->
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<!-- import JavaScript -->
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script>
new Vue({
el: '#app',
data: function () {
return {
options: [{
value: '1556445455525',
label: 'afsdsdsiosiodidsu',
num:'选项1'
}, {
value: '2556445455525',
label: 'bfsdsdsiosiodidsu',
num:'选项2'
}, {
value: '3556445455525',
label: 'cfsdsdsiosiodidsu',
num:'选项3'
}],
value: ''
}
}
})
</script> </html>
element-ui select的更多相关文章
- 使用 Element UI Select 组件的 value-key 属性,让绑定值可以为一个对象
EsunR 2019-11-07 12:14:42 12264 收藏 6 分类专栏: Vue 文章标签: element-ui 版权 当我们使用 Elemet UI 的选择组件进行多选时,Sele ...
- element UI select 设定默认值
要为select设定默认值,有两个步骤 1.数据中,声明一个变量param:该变量的值设为你想设定的select option中value 2.控件的 v-model 绑定 param 即可 < ...
- element ui select组件和table做分页完整功能和二级联动效果
<template> <div class="index_box"> <div class="search_box"> &l ...
- Element ui select 同时获取value和label的值
html <el-form-item label="单位名称" prop="checkInUnitName"> <el-select v-mo ...
- Element ui select同时获取value和label的值
代码如下: <el-form-item v-if="isMD" label="业务员名称"> <el-select v-model=" ...
- shit element ui
shit element ui element ui & select change event demo https://element.eleme.io/#/en-US/component ...
- vue+element ui项目总结点(一)select、Cascader级联选择器、encodeURI、decodeURI转码解码、mockjs用法、路由懒加载三种方式
不多说上代码: <template> <div class="hello"> <h1>{{ msg }}</h1> <p> ...
- 关于Element UI中select组件中遇到的问题
问题一:在使用select组件设置多选功能后,窗口抖动问题? 详细描述:在我使用select做多选的功能时出现了窗口抖动的问题,测试的时候发现,在有些人的电脑上抖动,有些人的电脑上不抖,找了很多文档, ...
- vue+element ui中select组件选择失效问题原因与解决方法
codejing 2020-07-10 09:13:31 652 收藏 分类专栏: Web Vue Element UI 版权 .当表单form赋完值后,如果后续又对form中某一属性值进行操作如 ...
- element UI table 过滤 筛选问题
一.问提描述 使用elementUI table 官方筛选案例,发现筛选不是服务器端筛选,而是浏览器端对每一页进行单独筛选. 如何在服务器端筛选? 二.查询Element UI 官网table组 ...
随机推荐
- flutter 常用plugins
搜索plugins flutter plugins搜索地址 谷歌官方plugins https://pub.dev/packages?q=http 到这个链接里面去搜索 https://github. ...
- 小D课堂-SpringBoot 2.x微信支付在线教育网站项目实战_2-4.后端项目分层分包及资源文件处理
笔记 4.后端项目分层分包及资源文件处理 简介:项目基本目录结构,包名称建立,配置文件建立 1.基本目录结构 controller se ...
- 1、vinc = vict 胜、征服
- Java排序方法
下面是用JAVA代码实现的数据结构中的7种基本排序算法,希望对你有所帮助. (1)直接插入排序 /** 直接插入排序 **/ /** 数组是引用类型,元素值将被改变 **/ public static ...
- Neither BindingResult nor plain target object for bean name 'command' available as request attribute
最近用JSR303在表单提交时使用Java Bean Validation验证数据.报错堆栈如下: java.lang.IllegalStateException: Neither BindingRe ...
- SpringMVC,SpringBoot上传文件简洁代码
@RequestMapping("/updateAvatar.html") public String updateHeadUrl(MultipartFile avatar, Mo ...
- Servlet(1):基础概念/最简实例
Servlet 生命周期(1) init()方法初始化Servlet对象 它在第一次创建Servlet时被调用,在后续每次不同用户请求时不再调用.(2) service()方法来处理客户端的请求 ...
- Python 面向对象(下)
本篇博客承接自Python 面向对象(上) 四. 继承,实现,依赖,关联,聚合,组合 Python面向对象--继承,实现,依赖,关联,聚合,组合 五. 特殊成员 Python面向对象--类的特殊成员 ...
- c++ 调试信息输出
1. 把打印信息输出到指定的文件里. #include <stdio.h> #include <stdlib.h> freopen("log.txt", & ...
- 【Linux】CentOS7.0安装jdk
JDK安装 设置hostname [root@bigdata111 ~]# vi /etc/hostname 设置机器hosts [root@bigdata111 ~]# vi /etc/hosts ...