自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(13)
  • 收藏
  • 关注

原创 video标签控件一直保持出现

this.KaTeX parse error: Expected '}', got 'EOF' at end of input: … that.refs.myVideo.focus() event.target.setAttribute(‘controls’, ‘controls’) }, false ) 这个方法只要浏览器在屏幕顶层,就不会让video控件消失。

2020-08-19 17:04:29 2465 1

原创 封装外部下载echarts图片

/* 传入参数 图片名字 echarts对象 */ export function saveImg(param) { // 获取画布图表地址信息 const imgUrl = param.myChart._api.getDataURL({ type: ‘jpeg’, pixelRatio: 1, backgroundColor: ‘#fff’ }) // 如果浏览器支持msSaveOrOpenBlob方法(也就是使用IE浏览器的时候),那么调用该方法去下载图片 if (window.navigator.ms

2020-07-04 13:46:05 3738

原创 ENOENT: no such file or directory, scandir ‘E:\workplace\xthk_teaching_management_center\node_modul

报错: 解决: npm rebuild node-sass --save-dev

2020-07-03 10:45:46 496

原创 vue实现前端页面点击下载table表格为pdf或excel

1.点击下载为excel 要安装的插件: npm install html2canvas jspdf --save 要下载的js文件: Blob.js和Export2Excal.js 放在项目的src/excel_plugin 目录下 新建一个js文件,放入下面封装好的函数: 具体代码: export function exportChooseExcel(tHeader, filterVal, list, pName) { // 兼容ie10哦! require.ensure([], () => {

2020-05-13 15:21:40 2134

原创 vue3以上版本出现bugThis dependency was not found: * core-js/modules/es.object.to-string in ./src/router/i

报错: This dependency was not found: * core-js/modules/es.object.to-string in ./src/router/index.js To install it, you can run: npm install --save core-js/modules/es.object.to-string 原因: 最新的 vue-cli 3.x的版本,core-js是3.x的版本,而这个版本中,对那些polly补丁包进行了整理 ,这其实是一个

2020-05-13 09:27:00 5687 1

原创 this.$set语法:

this.$set语法: 调用方法: Vue.set( target , key , value) target: 要更改的数据源(可以是一个对象或者数组) key 要更改的具体数据 (索引) value 重新赋的值 this.$set(target, key, value):target为需要添加属性的对象,key是要添加的属性名,value为属性key对应的值。 通过Object.assign...

2020-05-07 16:58:16 224

原创 函数防抖与函数节流

exportfunctionthrottle(fn,interval=300){ varcanRun=true; returnfunction(){ if(!canRun)return; canRun=false; setTimeout(()=>{ fn.apply(this,arguments); ...

2020-05-06 10:53:55 318

原创 点击下载按钮,判断是否为QQ或微信内置浏览器打开

//判断是否为QQ或微信内置浏览器打开 exportfunctionis_qq(){ varsUserAgent=navigator.userAgent.toLowerCase(); if(sUserAgent.match(/QQ/i)=="qq"){ returntrue; }else{ returnfalse; } }...

2020-05-06 10:51:56 556 1

原创 vue 封装 黑色遮罩层组件mask

//使用组件的时候,需要自己定义一个固定宽高的div 组件: <template> <div class="mask"> <div class="poster"> <div class="inner-mask"></div> <img :src="url" alt="" /> &lt...

2020-05-05 15:57:57 2656 1

原创 js转rem 插件postcss-plugin-px2rem

h5开发自动转变成rem 1.下载插件postcss-plugin-px2rem npm i postcss-plugin-px2rem -D 2.在assets文件夹,新建rem.js文件 (function(win, lib) { let doc = win.document; let docEl = doc.documentElement; let metaEl = doc.querySe...

2020-05-05 15:48:38 536

原创 通过原生JS高德定位,获取定位经纬度

// 高德定位 export function getLocation() { AMap.plugin(“AMap.Geolocation”, function() { var geolocation = new AMap.Geolocation({ // 是否使用高精度定位,默认:true enableHighAccuracy: true, // 设置定位超时时间,默认:无穷大 timeout:...

2020-05-05 15:39:16 2599

原创 safari和安卓下载,js代码

// 无闪现下载 function downloadByFrame(url) { const iframe = document.createElement(“iframe”); iframe.style.display = “none”; function iframeLoad() { console.log(“iframe onload”); const win = iframe.conten...

2020-05-05 15:33:55 492

原创 Computed property "show" was assigned to but it has no setter.

computed里返回vuex里面的数据后报错 解决办法: show就是报错属性 给它加上一个set就行

2020-04-24 19:29:32 1916

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除