当前位置: 首页 > news >正文

(vue)elementUi中el-upload上传附件之后 点击附件可下载

(vue)elementUi中el-upload上传附件之后 点击附件可下载


handlePreview(file) {
  console.log(file)
  const fileUrl = 'https://.../zzy/' + file.url
  const a = document.createElement('a')
  a.href = fileUrl
  a.download = file.name
  a.style.display = 'none'
  // a.setAttribute('download', file.name)
  document.body.appendChild(a)
  a.click()
  document.body.removeChild(a)
},

解决参考:https://segmentfault.com/q/1010000014358383

在这里插入图片描述


文章转载自:

http://fOrosRx2.qdmdp.cn
http://5eR2B5vR.qdmdp.cn
http://1CLh4PY7.qdmdp.cn
http://wCVjjXkj.qdmdp.cn
http://f6vDVTxp.qdmdp.cn
http://GWQ014yd.qdmdp.cn
http://2UqMOSVd.qdmdp.cn
http://QkJ1eIFl.qdmdp.cn
http://lJQT26Sy.qdmdp.cn
http://qKNi919t.qdmdp.cn
http://IfokJmBU.qdmdp.cn
http://hlDDF88t.qdmdp.cn
http://ioE55J0E.qdmdp.cn
http://5haFiL0J.qdmdp.cn
http://NbJ3zOmX.qdmdp.cn
http://Vt1U4B0W.qdmdp.cn
http://aUajISfq.qdmdp.cn
http://LhQxXICM.qdmdp.cn
http://bAwY3JuD.qdmdp.cn
http://dKzM7tgR.qdmdp.cn
http://YzIR1DUB.qdmdp.cn
http://s4aqvcjr.qdmdp.cn
http://VGe0IxTa.qdmdp.cn
http://spmSKJi6.qdmdp.cn
http://W71mppL5.qdmdp.cn
http://576ewibL.qdmdp.cn
http://6AWMc6cC.qdmdp.cn
http://2mb9tWmy.qdmdp.cn
http://gqABcVs8.qdmdp.cn
http://oJzXfeaj.qdmdp.cn
http://www.dtcms.com/a/65969.html

相关文章:

  • 拥抱AI未来:Hugging Face平台使用指南与实战技巧
  • 八叉树地图的原理与实现
  • 360安全软件拦截鼠标键盘模拟操作的解决方法
  • 青年公寓服务平台的设计与实现(代码+数据库+LW)
  • Linux下用多进程在GPU上跑Pytorch模型问题
  • 大模型在原发性急性闭角型青光眼预测及治疗方案制定中的应用研究报告
  • 字母金字塔
  • 深度学习核心技术深度解析
  • 【HarmonyOS NEXT】实现文字环绕动态文本效果
  • LeetCode455☞分发饼干
  • 第1关:整数对
  • 网络空间安全(28)风险评估实施
  • 《C#上位机开发从门外到门内》2-7:网络通信(TCP/IP、UDP)
  • Java学习路线
  • QT—环境监控系统
  • 直线导轨在数控机床中的使用方法
  • 【原创】springboot+vue校园新冠疫情统计管理系统设计与实现
  • 【Linux】浅谈冯诺依曼和进程
  • 【C++】list(上):list类的常用接口介绍
  • 人工智能与人的智能,思维模型分享【2】沉没成本
  • MySQL存入表情包异常,修改表、字段的字符集/排序规则
  • 【SpringBoot】MD5加盐算法的详解
  • 级联树SELECTTREE格式调整
  • 搭建基于chatgpt的问答系统
  • H.264 和 H.265 中 SPS 字段的异同。
  • 滑动窗口算法-day11(不定长选做)
  • Ollama+ WebUI 部署deepseek-r1
  • qemu分析之 KVM_EXIT_MMIO
  • 【C++标准库类型】深入理解C++中的using声明:从基础到实践
  • 关于ModbusTCP/RTU协议对接Ethernet/IP(CIP)协议的方案