摘要: 代码: 1、首先在showUploadList属性中将下载的icon显示出来。 <Upload v-model:file-list="fileList" name="file" :before-upload="beforeUpload" :action="uploadUrl" :headers="h 阅读全文
posted @ 2022-06-27 18:42 icon-icon 阅读(2594) 评论(0) 推荐(0) 编辑
摘要: 需求:elementUI中的时间范围选择组件,需要限制每次只能选择一年内的时间 组件: <el-date-picker style="width:auto" v-model="form.daterange" type="daterange" :picker-options="pickerOption 阅读全文
posted @ 2021-11-01 14:20 icon-icon 阅读(82) 评论(0) 推荐(0) 编辑
摘要: html部分: <div id="scatter"> <div class="bubble_min bubble10"></div> <div class="bubble_min bubble12"></div> <div class="bubble_min bubble8"></div> <div 阅读全文
posted @ 2021-08-17 18:00 icon-icon 阅读(1247) 评论(2) 推荐(1) 编辑
摘要: 在elementui 的上传组件中实现单文件上传,使用:limit="1" 属性限制选择文件个数,有个弊端就是当选择完一个文件之后就不能再继续选择文件,这并不是产品经理想要的,我们期望的结果是:当再次选择时直接覆盖上次上传的文件,保证文件列表中只有一个文件。 accept属性可以限制文件类型,fil 阅读全文
posted @ 2021-07-06 10:20 icon-icon 阅读(4608) 评论(0) 推荐(1) 编辑
摘要: 一、问题 在使用swiper的过程中会遇到很多问题,由于swiper版本太多导致每次使用时都要踩好多坑,这里记录一下本次使用的方法,以避免后边使用中耗费时间。 二、使用步骤 1、下载 在vue中使用swiper需要下载vue-swiper-awesome ,最好下载版本3,是最稳定的版本。 cnpm 阅读全文
posted @ 2021-07-05 13:27 icon-icon 阅读(1225) 评论(0) 推荐(0) 编辑
摘要: 在vue项目中,当再次点击当前看路由时,会在控制台报如下警告: Avoided redundant navigation to current location:"/xxx/xxx" 解决方法: 在router.js中添加如下代码 import Vue from 'vue' import Route 阅读全文
posted @ 2021-07-01 11:20 icon-icon 阅读(1590) 评论(0) 推荐(0) 编辑
摘要: 1、自定义指令 // 注册一个全局自定义指令 `v-abc` Vue.directive('abc', { bind: function (el) { // 只调用一次,指令第一次绑定到元素时调用。在这里可以进行一次性的初始化设置 }, inserted: function (el) { // 被绑 阅读全文
posted @ 2021-07-01 11:00 icon-icon 阅读(59) 评论(0) 推荐(0) 编辑
摘要: 当点击选中时使用check-change函数处理数据发现check-change事件被执行多次, check-change监听状态改变,在此处点击勾选后状态发生改变,因此再次触发了check-change事件 check事件监听点击动作,只在点击时触发 将check-change事件改为check事 阅读全文
posted @ 2021-06-28 18:41 icon-icon 阅读(3737) 评论(0) 推荐(0) 编辑
摘要: 在vscode中使用cnpm命令时报错如下: 解决方案: 使用管理员身份启动powershell: 输入命令:set-ExecutionPolicy RemoteSigned,然后更改权限为A,修改成功后通过 get-ExecutionPolicy 查看当前的状态 阅读全文
posted @ 2021-06-15 11:48 icon-icon 阅读(191) 评论(0) 推荐(0) 编辑
摘要: get 获取/set 设置, add 增加/remove 删除 create 创建/destory 移除 start 启动/stop 停止 open 打开/close 关闭, read 读取/write 写入 load 载入/save 保存, create 创建/destroy 销毁 begin 开 阅读全文
posted @ 2021-06-07 11:28 icon-icon 阅读(127) 评论(0) 推荐(0) 编辑