摘要:
1、求数组最大/小值 const arr=[0,1,2,3,4] const prim = Math.min/max(...arr)// min:0 max:4 2、数组快速去重 let arr = [3, 5, 2, 2, 5, 5]; let unique = [...new Set(arr)] 阅读全文
摘要:
1、数据延迟及渲染延迟 nextTick(dom全部渲染完成后执行,通常用与延迟加载) mounted(){ this.init() //先加载 this.$nextTick(()=>{ this.afterInit() //后加载 }) } 2、setTimeout(多长时间后执行) mounte 阅读全文