12 2021 档案
h5显示后台获取到的图片流
摘要:数据请求时添加: config.responseType = "blob" 获取流后显示前处理://response为获取到的流 var binaryData = []; binaryData.push(response); let imsg = window.URL.createObjectURL
阅读全文
el-select 添加 multiple 属性,下拉多选,赋值后不能点击
摘要:该写发不能点击 this.form.roleIds = [2,3] 赋值方式改成以下写法: this.$set(this.form,'roleIds',[2,3]);
阅读全文
css 梯形
摘要:.div{ position:absolute;left:0;top:0;line-height: 30px;color:#fff;/*border:1px solid #00A1FC;*/border-bottom: 100px solid #00A1FC; border-left: 0px so
阅读全文
js中获取鼠标坐标位置
摘要:<div class="box" id="box" onmousemove="showPosition(event);"></div> function showPosition(e){ var e = e||window.event; // 适应谷歌和火狐 x = e.clientX+docume
阅读全文
js中鼠标点击事件
摘要:<div id="btn">点击</div>document.getElementById("btn").onmousedown = function(e){ if(e.button ==2){ //右键 } if(e.button ==0){ //左键 } if(e.button ==0){ //
阅读全文
h5 中调用摄像头问题(navigator.mediaDevices)
摘要:h5 中调用摄像头时,只能在https localhost 和file 项目中使用,http中不起作用。 因为 在http中navigator.mediaDevices 为undefined 所以不能调用摄像头 解决方法:使用http协议的项目调用摄像头的时候,需要配置谷歌浏览器 打开 chrome
阅读全文