摘要:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi 阅读全文
摘要:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi 阅读全文
摘要:
总结: Express 封装、内置了很多中间件,比如 connect和 router,而 KOA 则比较轻量,开发者可以根据自身需求定制框架; Express 是基于 callback 来处理中间件的,而 KOA 则是基于 await/async; 在异步执行中间件时,Express 并非严格按照洋 阅读全文
摘要:
console.log('1','1'); setTimeout(function() { console.log('2','5'); process.nextTick(function() { console.log('3','7'); }); new Promise(function(resol 阅读全文
摘要:
js下载图片文件后端返回url function imgBase64(img) { const canvas = document.createElement("canvas"); canvas.width = img.width; canvas.height = img.height; const 阅读全文
摘要:
toString+split function flatArr(arr) { return arr.toString().split(',') } 递归 function flatArr(arr) { return Array.isArray(arr) ? arr.reduce((acc, cur) 阅读全文
摘要:
const arr = [ { id: 1, parent_id: null }, { id: 2, parent_id: 1 }, { id: 3, parent_id: 1 }, { id: 4, parent_id: 2 }, { id: 5, parent_id: 4 }, ] const 阅读全文
摘要:
const responseList = [ 1,2,2,4,5,6,1,5,3,6] console.log(uniqueBy(responseList,'a')); function uniqueBy(arr, key) { return arr.reduce((acc,cur)=>{ if ( 阅读全文
摘要:
原有的树结构 const jsdata = [ { category: 1, name: '第一部分 常识判断', qcount: 10, judgeFlag: 0, description: '常识判断开始', children: [ { category: 6, name: '1.1 部分名称' 阅读全文
摘要:
1、首先创建loading文件夹添加index.js和index.vue //index.js import Loading from "./index.vue"; export default { // 实现插件必须的install方法 install(Vue, options) { const 阅读全文