![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
javascript
Call_me_small_pure
吭哧吭哧吭哧
展开
-
js下载后台返回的流文件
axios.post(url, params,{ responseType: 'arraybuffer' //加上responseType: 'arraybuffer',不然下载的PDF是空白页 }).then(res => { () }).catch(err => { console.log(err); })this.$downpdf(params,response=>{ .原创 2020-06-15 17:53:09 · 1498 阅读 · 0 评论 -
js禁止浏览器后退/返回
history.pushState(null, null, document.URL);window.addEventListener('popstate', function() { history.pushState(null, null, document.URL);});原创 2020-06-08 14:43:25 · 443 阅读 · 0 评论 -
js计算指定日期N天后的日期
this.$getNewData('2019-11-11',90);//2020-02-09Vue.prototype.$getNewData = (dateTemp, days)=> { var dateTemp = dateTemp.split("-"); var nnDate = dateTemp[1]+'-'+dateTem...原创 2019-11-11 11:15:53 · 964 阅读 · 0 评论 -
用<input type="file" accept="image/*" capture="camera">之后,把图片放到页面上
调用照相机,拍照 <input type="file" accept="image/*" capture="camera">调用摄像机,视频 <input type="file" accept="video/*" capture="camcorder">调用录音机,录音 <input type="file" accept="audio/*" capture="microphone"><input t原创 2017-10-23 13:57:31 · 8483 阅读 · 1 评论