10 2021 档案
摘要:main.js Vue.config.productionTip = false// app.directive('focus',{// mounted(el){// el.focus()// },// updated(el){// el.focus()// }// })app.directive(
阅读全文
摘要:.prevent 阻止默认行为(阻止a链接的跳转、阻止表单的提交等) .stop阻止事件冒泡 .capture以捕获模式触发当前的事件处理函数 .once 绑定的事件只触发一次 .self 只有再event.target是当前元素自身时触发事件处理函数
阅读全文
摘要:宏任务 异步Ajax请求 setTimeout、setInterval 文件操作 其他宏任务 微任务 Promise.then、.catch和.finally process.nextTick 其他微任务 执行机制: setTimeoit(function(){console.log('1')})n
阅读全文
摘要:console.log('A')async function getAllFile(){console.log('B')const r1 = await thenFs.readFile('./files/1.txt','utf8')const r2 = await thenFs.readFile('
阅读全文