摘要: Try below this three commands. Its worked for me. yarn config delete proxy npm config rm proxy npm config rm https-proxy 阅读全文
posted @ 2021-12-25 09:32 YAN-YAN 阅读(226) 评论(0) 推荐(0)
摘要: 解决方法: 给el-table添加z-index属性,尽可能设定大一点 做兼容处理,此处减少每页加载数据数量 // ie浏览器默认加载10条数据;其他现代浏览器默认加载100条 if (!!window.ActiveXObject || 'ActiveXObject' in window) { th 阅读全文
posted @ 2021-11-05 09:48 YAN-YAN 阅读(218) 评论(0) 推荐(0)
摘要: 使用indexOf方法去重 function unique (arr){ if(!Array.isArray(arr)){ return } let array = [] arr.forEach(item => { if(array.indexOf(item) -1){ array.push(ite 阅读全文
posted @ 2021-11-01 22:10 YAN-YAN 阅读(29) 评论(0) 推荐(0)
摘要: 判断给定的对象是不是数组的四个方法 instanceof方法 判断一个对象是否在其原型链原型构造函数的属性 constructor方法 constructor属性返回创建此对象的构造函数 Object.prototype.toString.call(xxx) isArray() const arr 阅读全文
posted @ 2021-11-01 20:46 YAN-YAN 阅读(30) 评论(0) 推荐(0)
摘要: <el-input v-model="testData" @keydown.native="checkNumber"></el-input> 只能使用keydown或者keyup事件 checkNumber(e) { // 此处可以自行定义正则规则 const reg = /^[1-9]\d*$/; 阅读全文
posted @ 2021-11-01 18:32 YAN-YAN 阅读(1303) 评论(0) 推荐(0)
摘要: 路由 路由是指确定应用程序如何响应客户端对特定端点的请求,该特定端点是 URI(或路径)和特定的 HTTP 请求方法 app.method(path,handler) app 是 express 的实例 method 是小写的 http 请求方法 path 是请求路径 handler 是处理函数 在 阅读全文
posted @ 2021-07-21 07:33 YAN-YAN 阅读(57) 评论(0) 推荐(0)
摘要: Terminology “promise” is an object or function with a then method whose behavior conforms to this specification. “thenable” is an object or function t 阅读全文
posted @ 2021-06-18 09:03 YAN-YAN 阅读(55) 评论(0) 推荐(0)
摘要: 继承 class Animal { name: string; constructor(theName: string) { this.name = theName; } // 方法的默认参数 move(distanceInMeters: number = 0) { console.log(`${t 阅读全文
posted @ 2021-05-05 16:33 YAN-YAN 阅读(42) 评论(0) 推荐(0)
摘要: 接口概述 function printLabel(labeledObj: { label: string }) { console.log(labeledObj.label); } let myObj = { size: 10, label: "Size 10 Object" }; printLab 阅读全文
posted @ 2021-05-05 14:21 YAN-YAN 阅读(73) 评论(0) 推荐(0)
摘要: 什么是slot props 传递数据、event触发事件和slot内容分发就构成了vue组件的三个API来源,再复杂的组件都是这三部分组成的 需要组件组合使用时,混合父组件的内容与子组件的模板,就会用到slot,这个过程叫做 内容分发(transclusion) 组件标签内部的内容就是slot <c 阅读全文
posted @ 2021-03-26 13:33 YAN-YAN 阅读(97) 评论(0) 推荐(0)