dandanyajin
今天更新博客了吗?
08 2021 档案
前端自己生成id的方法
摘要:// 生成ID generateId() { const s = []; const hexDigits = '0123456789abcdef'; for (let i = 0; i < 36; i++) { s[i] = hexDigits.substr(Math.floor(Math.rand 阅读全文
posted @ 2021-08-06 16:00 dandanyajin 阅读(1033) 评论(0) 推荐(0)
下载文件接口
摘要:两种: 一种,地址直接可以在浏览器打开的 downFile (item) { const link = document.createElement('a') link.setAttribute("download", item.ATTA_NAME) //下载的文件名 link.href = ite 阅读全文
posted @ 2021-08-05 20:40 dandanyajin 阅读(666) 评论(0) 推荐(0)
element ui 组件 中的方法自带的参数与自己相传的参数有冲突的解决方法
摘要:解决方法: 之前写法: 这样写的话, uploadFile(val){ console.log(val) // 是组件自带的参数 } 如果想传自己的参数 :http-request="uploadFile(scope)" 这样写,组件自身的参数会不见 所以 ((val)=>{uploadFile(v 阅读全文
posted @ 2021-08-04 19:46 dandanyajin 阅读(232) 评论(0) 推荐(0)