07 2020 档案
摘要:什么是防抖? 在一定时间段内,多次触发一个请求,只会触发最后一次请求。(不管事件触发有多频繁,只会执行最后一次触发事件的函数) //不管按钮点击多少次(在一秒内),只会触发最后一次var time btn.onclick = function(){ if(time){ clearTimeout(ti
阅读全文
摘要:描述:项目运行npm run dev 运行一定次数(我这里只能保存一次,第二次保存就报错,需要重新运行npm run dev,很耗费时间)后报错报错:CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory翻译:CAL
阅读全文
摘要:https://carbon.now.sh
阅读全文
摘要:开发时遇到表格错位,如下图 : 解决办法 如下 this.$nextTick(() => { this.$refs.xxxx.doLayout()})
阅读全文
摘要:<template> <div style='margin:20px'> <el-switch v-model="value1" active-text="是" inactive-color="#BFBFBF" inactive-text="否" active-value="1" inactive-
阅读全文
摘要:toLocaleString() 是一个非常好用的方法,功能很强大 toLocaleString() 可以用来格式化,比如数字的格式化, 如下 整数部分每三位加一个逗号 使用 toLocaleString() 将数字转为百分比 var a = 1;console.log(a.toLocaleStri
阅读全文
摘要:根据汉字首字母a z进行排序 let arry = ['周浩','李媛','王五','安妮'] arry.sort(function(a,b){ return a.localeCompare(b) }) console.log(arry)["安妮", "李媛", "王五", "周浩"]
阅读全文