04 2022 档案

摘要:export function findComponentDownward (context, componentName) { const childrens = context.$children; let children = null; if (childrens.length) { for 阅读全文
posted @ 2022-04-25 21:43 小白张先生 阅读(33) 评论(0) 推荐(0) 编辑
摘要:let obj = { job: { address: 'shenzhen', salary: '20k' }, name: 'zhang', age: 22 } // 第一种(函数和正则不可以) // let obj1 = JSON.parse(JSON.stringify(obj)) // ob 阅读全文
posted @ 2022-04-24 22:22 小白张先生 阅读(108) 评论(0) 推荐(0) 编辑
摘要:function f1 (url) { return new Promise(resolve => { resolve(url) }) } function maxPromiseLimit (arr, max, callback) { // 如果没有传入arr或max则不继续执行 if (!arr 阅读全文
posted @ 2022-04-21 22:33 小白张先生 阅读(82) 评论(0) 推荐(0) 编辑
摘要:function Promise (excutor) { this.promiseState = 'pending' this.promiseResult = null let self = this this.callbacks = [] function resolve (data) { if( 阅读全文
posted @ 2022-04-21 22:01 小白张先生 阅读(43) 评论(0) 推荐(0) 编辑
摘要:1.这个函数中包含多个对象,尽管这个函数是被最外层的对象所调用,this指向的也只是它上一级的对象 let obj = { a: 10, b: { a: 20, fn: function () { console.log(this); //this指上一级的调用,this指向b console.lo 阅读全文
posted @ 2022-04-03 16:57 小白张先生 阅读(19) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2022-04-03 16:37 小白张先生 阅读(15) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2022-04-03 16:22 小白张先生 阅读(12) 评论(0) 推荐(0) 编辑
摘要:let arr = [1,2,2,3,4,2,5,7,1,4,2,5,6,3,7,3,5,4,3,] // 第一种 双重for和splice截取 // function unique (arr) { // for(let i = 0; i<arr.length;i++){ // for(let j 阅读全文
posted @ 2022-04-03 10:30 小白张先生 阅读(44) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示