随笔分类 -  element-ui

摘要:亲测有效 假设我们需要导出的数据有三万条 实现的思路,分别两次请求数据, 请求1:正常获取数据条数,假设一页只显示15条,点第二页的时候,再去拿第二页的数据,正常渲染到tabel,以此类推 请求2:当点击导出时, 一次性获取完所有的数据,注意:拿到之后不要渲染到table中(不要放到tableDat 阅读全文
posted @ 2020-05-09 17:27 龙卷风吹毁停车场 阅读(965) 评论(0) 推荐(0)
摘要:有些时候在用户输入密码等一些内容的时候,我们不允许里面存在空格,想通过后面确定的时候去判断有没有空格比较繁琐,vue为我们提供了一个.trim的修饰符用来处理空格的问题 使用非常简单:在v-model后面直接加上.trim修饰符,用户就无法输入空格字符 <el-input v-model.trim= 阅读全文
posted @ 2020-04-26 16:30 龙卷风吹毁停车场 阅读(1939) 评论(1) 推荐(0)
摘要:原文地址:https://blog.csdn.net/ks8380/article/details/96478522 html <el-form-item label="输入密码:" prop="pass" required> <el-input type="password" @keyup.nat 阅读全文
posted @ 2020-04-26 11:40 龙卷风吹毁停车场 阅读(2607) 评论(0) 推荐(0)
摘要:html: <el-form-item label="用户账号:" prop="loginId"> <el-input type="loginId" v-model.number="ruleForm.loginId" maxlength="11" placeholder="请输入用户账号" auto 阅读全文
posted @ 2020-04-26 11:35 龙卷风吹毁停车场 阅读(9541) 评论(0) 推荐(0)
摘要:第一步:安装所需要的的依赖模块 cnpm i file-saver --save cnpm i xlsx --save 第二步:在需要导出的页面引入以下两个模块 import FileSaver from "file-saver"; import XLSX from "xlsx"; 第三步:给tab 阅读全文
posted @ 2020-04-16 11:19 龙卷风吹毁停车场 阅读(1060) 评论(0) 推荐(0)
摘要:第一种方法: 注:不推荐使用第一种方法,第一种方法的弊端就是,当页面上已经有一条提示消息,在弹出一条消息时会无法显示新弹出的消息,需要等前一条消息消失后才能在触发消息提示。 引入Message import { Message } from 'element-ui'; js(在弹出消息提示之前,判断 阅读全文
posted @ 2020-01-21 09:49 龙卷风吹毁停车场 阅读(3001) 评论(0) 推荐(0)
摘要:html 部分 <el-table id="tables" ref="multipleTable" row-key="id" :data="tableData" max-height="450" border style="width: 100%" @selection-change="handle 阅读全文
posted @ 2020-01-20 15:48 龙卷风吹毁停车场 阅读(5633) 评论(0) 推荐(0)
摘要:我的需求是在图片上传到服务器之后再判断是否选择图片,不是选中图片就判断,所以我是在图片上传成功后进行逻辑处理 效果图 html部分 <el-form :model="ruleForm" :rules="rules" ref="ruleForm" size='mini' label-width="10 阅读全文
posted @ 2020-01-06 14:25 龙卷风吹毁停车场 阅读(2096) 评论(0) 推荐(0)
摘要:效果图 html部分 <el-table-column prop='userId' :render-header="General" label="奖品数量|(区别于奖品总数量)" show-overflow-tooltip align="center"></el-table-column> //用 阅读全文
posted @ 2020-01-03 14:55 龙卷风吹毁停车场 阅读(3771) 评论(0) 推荐(0)
摘要:element-ui table 给表头添加icon,以及hover上去的提示文字 html部分 <el-table-column prop="" show-overflow-tooltip label="待发放奖品项数" :render-header="icons" align="center" 阅读全文
posted @ 2020-01-02 17:25 龙卷风吹毁停车场 阅读(5684) 评论(0) 推荐(1)
摘要:在el-table标签上添加 row-key=“id” 然后再 type = "selection" 这个标签上添加 :reserve-selection = "true" 这样表格的记忆功能就Ok啦 <el-table row-key="id"> <el-table-column type="se 阅读全文
posted @ 2019-12-30 09:52 龙卷风吹毁停车场 阅读(704) 评论(0) 推荐(0)
摘要:<el-upload class="upload-demo" ref="vidos" :action="URL+'/api/post/file'" :data="date" :on-success="handleAvatarAUDIO" :before-upload="beforeAvatarAUD 阅读全文
posted @ 2019-12-19 11:35 龙卷风吹毁停车场 阅读(3901) 评论(0) 推荐(0)
摘要:<el-upload class="upload-demo" ref="vidos" :action="URL+'/api/post/file'" :data="date" :on-success="handleAvatarAUDIO" :before-upload="beforeAvatarAUD 阅读全文
posted @ 2019-12-19 09:54 龙卷风吹毁停车场 阅读(3088) 评论(2) 推荐(0)
摘要:<el-upload class="upload-demo" ref="vidos" :action="URL+'/api/post/file'" :data="date" :on-success="handleAvatarAUDIO" :before-upload="beforeAvatarAUD 阅读全文
posted @ 2019-12-19 09:40 龙卷风吹毁停车场 阅读(6948) 评论(0) 推荐(0)
摘要:第一种方法:需要安装一个模块 yarn add image-conversion --save <el-upload ref="upload" :data="date" :action="URL+'/api/post/file'" :before-upload="beforeAvatarAUDIO3 阅读全文
posted @ 2019-12-12 21:32 龙卷风吹毁停车场 阅读(5071) 评论(2) 推荐(0)
摘要:html部分 <el-select v-model="value" multiple collapse-tags ref="select" @change="changeLocationValue" //将用到此方法 style="margin-left: 20px;" placeholder="请 阅读全文
posted @ 2019-11-08 19:19 龙卷风吹毁停车场 阅读(4700) 评论(1) 推荐(2)
摘要:处理之前的效果 处理之后 处理方法: 阅读全文
posted @ 2019-10-30 14:55 龙卷风吹毁停车场 阅读(6025) 评论(0) 推荐(0)
摘要:需求:使用element-ui的穿梭框,发送ajax向服务器查询数据,我这里以查询姓名为例子 由于穿梭框自己的那个搜索框并不满足我们要达到的条件,所以我自己写了一个输入框input去覆盖在原来的搜索框上面,当每次用户输入的时候,就拿到用户输入的内容传递给后端去查询,最后在显示出来 option.re 阅读全文
posted @ 2019-10-22 10:37 龙卷风吹毁停车场 阅读(2111) 评论(0) 推荐(0)
摘要:封装到****.js文件之后的 封装之后使用 阅读全文
posted @ 2019-10-20 22:17 龙卷风吹毁停车场 阅读(7298) 评论(1) 推荐(2)
摘要:<el-tree :data="date" //数据来源 show-checkbox //节点是否可被选择 node-key="moduldCode" //每个树节点用来作为唯一标识的属性,整棵树应该是唯一的 ref="tree" check-strictly //在显示复选框的情况下,是否严格的遵 阅读全文
posted @ 2019-10-17 18:10 龙卷风吹毁停车场 阅读(16053) 评论(0) 推荐(0)