自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 一加六关闭更新提示,macos操作

安装adb https://zhuanlan.zhihu.com/p/41381658检查adb命名是否可用手机打开开发者模式,连接到电脑。https://www.oneplusbbs.com/forum.php?mod=viewthread&tid=5575868一加六手机关闭提示更新 https://acyco.cn/archives/27.html...

2022-05-30 18:08:43 456

原创 变量声明打印

a = 2; var a console.log(a); // 2 a = 2; var a = 1 console.log(a); // 1 a = 2; function a () { } console.log(a); // 2 var a = 2; function a () { } console.log(a); // 2 a = 2; function a ()...

2021-07-31 17:03:44 152

原创 浏览器设置,读取,删除cookie方法

// 获取cookiefunction getCookie (cookieName) { // name=lxw;age=18 let start = document.cookie.indexOf(cookieName) if (start > -1) { start = start + cookieName.length + 1; let end = document.cookie.indexOf(';', start) console.log('', 'co

2021-05-05 23:18:51 271

转载 Error: Node Sass version 5.0.0 is incompatible with ^4.0.0

reactjs errornpm uninstall node-sassnpm install node-sass@4.14.1Or, if using yarn (default in newer CRA versions)yarn remove node-sassyarn add node-sass@4.14.1原文地址>>>>这里

2021-04-25 15:43:49 185

原创 cors处理跨域请求

cors定义CORS是现代浏览器支持跨域资源请求的一种方式,全称是“跨域资源共享”(Cross-origin resource sharing)。实现CORS通信的关键是服务器。举个例子报错信息:Access to XMLHttpRequest at ‘https://wapi.kuwo.cn/api/sms/mobileLoginCode’ from origin ‘https://h5app.kuwo.cn’ has been blocked by CORS policy: Request h

2021-04-15 01:20:49 240

原创 js通过a标签下载文件

const downloadExcelFile = async function (api, params, name) { const res = await this.$get(api, params, { responseType: 'blob'}); try { let url = window.URL.createObjectURL(new Blob([res])) let link = document.createElement('a') link.style.

2021-04-14 09:23:21 626

js 深拷贝

// 不考虑 对象中包含内置对象,循环引用 // function deepClone (origin) {// if (typeof origin !== 'object' || origin === null) {// throw Error('origin not a object')// }// const target = Object.prototype.toString.call(origin) === '[object Object]' ? {} : []

2021-04-14 00:31:43 78

原创 js实现map,filter,reduce,reduce实现map

mapArray.prototype.toMap = function (fn, thisValue) { if (Object.prototype.toString.call(fn) !== '[object Function]') { throw new Error('fn is not a function') } const arr = [] const curArr = this for (let i = 0; i < curArr.length; i++.

2021-03-28 16:55:52 84

转载 面试题之setTimeout、setImmediate、process.nextTick、promise.then 的区别

console.time('start');setTimeout(function() { console.log(2);}, 10);setImmediate(function() { console.log(1);});new Promise(function(resolve) { console.log(3); resolve(); console.log(4);}).then(function() { console.log(5); console.ti

2021-03-26 14:50:01 811

转载 element-ui el-tree选择子节点时同时选择并提交父节点逻辑问题

https://www.jianshu.com/p/a482b25ac212

2021-03-17 15:14:11 467

转载 在vue项目中的main.js中直接使用element-ui中的Message 消息提示、MessageBox 弹框、Notification 通知

在vue项目中的main.js中直接使用element-ui中的Message 消息提示、MessageBox 弹框、Notification 通知https://www.cnblogs.com/aidixie/p/10904693.html

2021-03-10 11:21:13 1128

原创 [日常] 解决docker拉取镜像速度慢的问题

将docker修改为国内镜像源在/etc/docker/daemon.json文件中添加下面参数此处使用的是中国科技大学的docker镜像源{"registry-mirrors" : ["https://docker.mirrors.ustc.edu.cn"]}service docker restart

2021-01-25 15:06:34 151 1

原创 element ui中级联选择器的clearable功能如何给它添加一个触发事件

Q: 在使用elenemtui的级联选择器时,使用clearable好像只能实现形式上的清空实现,所以想问下是否能对它添加事件,如何添加A: 在使用elenemtui的级联选择器时,使用clearable好像只能实现形式上的清空实现,所以想问下是否能对它添加事件,如何添加...

2020-11-13 11:43:23 5287

原创 nuxt中引入vue-qr

nuxt + vue-qr1、执行命令 npm installvue-qr 或者 yarn addvue-qr2、在plugins文件下面创建vueqr.js3、在vueqr.js 里面写入下面的代码:import Vue from 'vue'import vueQr from 'vue-qr'Vue.use(vueQr)4、在nuxt.config.js里面写配置:5、在需要使用的页面直接写<vue-qr class="bicode" :logo...

2020-06-19 17:33:44 585

原创 浅谈xhr和fetch

浅谈xhr和fetch什么是xhr使用fetch使用在两者没封装前的区别什么是xhrxhr就是是XMLHttpRequest,是浏览器内置的api,可以和服务端进行交互,获取数据无需要页面刷新,XMLHttpRequest 可以用于获取任何类型的数据。使用创建XHRHttpResquest对象var xmlHttp;if (typeof XMLHttpRequest != "und...

2020-01-07 16:29:06 4749 1

原创 js 判断 iPhone X、iPhone XS、iPhone XS Max、iPhone XR

// iPhone X、iPhone XSvar isIPhoneX = /iphone/gi.test(window.navigator.userAgent) && window.devicePixelRatio && window.devicePixelRatio === 3 && window.screen.width === 375 &am...

2019-12-31 10:57:39 950

空空如也

空空如也

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

TA关注的人

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