08 2020 档案
摘要:// find() 返回符合条件的数组项,如果没有返回undefined Array.prototype.myFind = function(callback){ for(let i=0;i<this.length;i++){ if(callback(this[i], i)){ return thi
阅读全文
摘要:一、async/await的优势在于处理 then 链 单一的 Promise 链并不能发现 async/await 的优势,但是,如果需要处理由多个 Promise 组成的 then 链的时候,优势就能体现出来了(很有意思, Promise 通过 then 链来解决多层回调的问题,现在又用 asy
阅读全文
摘要://jQuery实现textarea高度根据内容自适应 $.fn.extend({ txtaAutoHeight: function () { return this.each(function () { var $this = $(this); if (!$this.attr('initAttrH
阅读全文
摘要:<div class="nav">内容</div> .nav{ width: 100%; height: 3.55rem; &::before{ content: ""; background: url('../../../assets/img/service.png') no-repeat cen
阅读全文