08 2021 档案
摘要:我发现element的弹窗偏上,有点不太美观,所以就让它居中显示,直接更改css样式就可以 /deep/.el-dialog__wrapper { text-align: center; white-space: nowrap; overflow: auto; &:after { content:
阅读全文
摘要:这个依然需要插件crypto-js 首先下载引入 import CryptoJs from "crypto-js"; 话不多说直接上代码,首先是element的上传 <el-upload class="upload-demo" drag :http-request="calculate" actio
阅读全文
摘要:首先使用element的上传文件的组件 安装依赖crypto-js npm i crypto-js <el-upload class="upload-demo" drag :http-request="uploadCrt" action="" :limit='1' :file-list="fileL
阅读全文
摘要:首先关于前端下载肯定会想到a链接,但是我在使用的时候发现a标签会打开这个网址而不是下载文件,所以我发现了一个好的方法,感觉不错,来分享一下 话不多说,上代码 // 下载文件 _downLoad(url, fileName) { const url2 = url.replace(/\\/g, "/")
阅读全文
摘要:利用正则解决 //this.datas是富文本的内容this.datas = this.datas.replace(/\<img/gi, '<img style="max-width:100%;height:auto" '); 一行解决
阅读全文
摘要:1.安装插件 npm install 'file-saver' npm install 'xlsx' 2.引入插件 import FileSaver from 'file-saver' import XLSX from 'xlsx' 3.定义方法 exportForms(){ let xlsxPar
阅读全文