├── .gitignore ├── README.md ├── image ├── 10万字前端知识体系总结 │ ├── performance图片 │ │ ├── DiagNo.jpg │ │ ├── FPS.png │ │ ├── Lighthouse.jpg │ │ ├── app.jpg │ │ ├── fire.png │ │ ├── heap.png │ │ ├── main.jpg │ │ ├── net.png │ │ ├── opportunity.jpg │ │ ├── performance.jpg │ │ ├── performance1.jpg │ │ ├── performance2.png │ │ ├── perfromance1.gif │ │ ├── source.jpg │ │ ├── sum.jpg │ │ └── 无标题文档.pdf │ ├── 前端知识体系.png │ ├── 前端知识体系复习导图.png │ ├── 基础篇 │ │ ├── componentApi.jpg │ │ ├── memory.jpg │ │ ├── nodeLoop.jpg │ │ ├── oW4E.gif │ │ ├── onePg.png │ │ ├── text1.gif │ │ ├── theme.jpg │ │ ├── var.jpg │ │ └── 牛逼.jpg │ ├── 工程化图片 │ │ ├── Css基础.png │ │ ├── JS基础1.png │ │ ├── all.png │ │ ├── buyNums.jpg │ │ ├── my-2022-cli.jpg │ │ ├── option.jpg │ │ ├── thridBg.jpg │ │ ├── webSystem.png │ │ ├── 二叉查找树.jpg │ │ ├── 前端工程化.png │ │ ├── 前端框架.png │ │ ├── 前端知识体系.png │ │ ├── 基础知识篇.png │ │ ├── 工程化.png │ │ ├── 执行上下文.jpg │ │ ├── 构建工具.png │ │ ├── 浏览器原理.png │ │ ├── 算法.png │ │ ├── 计算机网络与安全.png │ │ └── 项目优化.png │ ├── 第4篇:框架+浏览器.png │ ├── 第一篇:基础知识.png │ ├── 第三篇:前端工程化.png │ ├── 第二篇:算法.png │ ├── 算法图片 │ │ ├── 123.png │ │ ├── Sorting_heapsort_anim.gif │ │ ├── animation.gif │ │ ├── cpudemo.jpg │ │ ├── error.jpg │ │ ├── findTree.png │ │ ├── heap.png │ │ ├── heapSort.gif │ │ ├── insert.gif │ │ ├── jsbridge.png │ │ ├── jsbridge注入方式的优缺点.png │ │ ├── kill.jpg │ │ ├── link.png │ │ ├── localkey.png │ │ ├── math.gif │ │ ├── mathbg.jpg │ │ ├── maxHeap.png │ │ ├── merge.gif │ │ ├── mvvm.gif │ │ ├── mvvm1.gif │ │ ├── onion.png │ │ ├── reTree.png │ │ ├── requestIdcallback.jpg │ │ ├── retainedSize.jpg │ │ ├── ringLink.png │ │ ├── root.jpg │ │ ├── selectSort.gif │ │ ├── sort.png │ │ ├── sticky.gif │ │ ├── text1.gif │ │ ├── time.png │ │ ├── twoTree.png │ │ ├── vendors.png │ │ ├── window.png │ │ ├── 执行上下文.png │ │ ├── 新建 DOCX 文档.docx │ │ ├── 算法篇.docx │ │ ├── 雅虎35条军规.jpg │ │ └── 项目开发-E-01-4.xlsx │ └── 脚手架图片 │ │ ├── 2022cli.jpg │ │ ├── init-y.png │ │ ├── link.jpg │ │ ├── linksuccess.jpg │ │ ├── list.jpg │ │ ├── publish.jpg │ │ └── text8.gif ├── 20个常见的前端算法题 │ ├── VCG41N1134937311.jpg │ ├── bubble.gif │ ├── face.png │ ├── mathBg.jpg │ ├── merge.gif │ └── sort.gif ├── webworker图片 │ ├── 35.jpg │ ├── R-C (1).gif │ ├── R-C (2).gif │ ├── R-C (3).gif │ ├── R-C.gif │ ├── WebWorkers.jpg │ ├── boom2.gif │ ├── cricle.gif │ ├── face.jpg │ ├── good.gif │ ├── jing.jpg │ ├── load.png │ ├── nai.png │ ├── performance.png │ ├── src=http___img.soogif.com_n7sySW0OULhVlH5j7OrXHpbqEiM9hDsr.gif&refer=http___img.soogif.gif │ ├── table.gif │ ├── table.jpg │ ├── table.png │ ├── time.png │ ├── time1.png │ ├── time3.png │ ├── total.png │ └── 绝望.jpg ├── 一文彻底弄懂浏览器缓存,只需动手操作一次 │ ├── 53.png │ ├── 82.png │ ├── Disable.png │ ├── cache.png │ ├── cacheBg.png │ ├── disablecache.png │ ├── disk.jpg │ ├── etag.png │ ├── if-modified-since.png │ ├── if-none-match.png │ ├── last-modified.png │ ├── lighthouse.png │ ├── load.png │ ├── memory.png │ ├── memorycache.png │ ├── nocache.png │ ├── response.png │ └── 缓存流程.png ├── 从0到1搭建前端监控平台,面试必备的亮点项目 │ ├── ScriptError1.jpg │ ├── autumn.png │ ├── bread.png │ ├── cool.jpg │ ├── entry.png │ ├── error.jpg │ ├── error.png │ ├── error2.jpg │ ├── errorCode.jpg │ ├── install.jpg │ ├── install.png │ ├── list.jpg │ ├── load.jpg │ ├── queue.png │ ├── record.gif │ ├── replace.png │ ├── scriptError.jpg │ ├── sdk.jpg │ ├── sdk.png │ ├── sdkProcess.jpg │ ├── sea.png │ ├── see.jpg │ ├── send.png │ ├── sentry.png │ ├── spa.png │ ├── system.png │ ├── task.png │ ├── timing.png │ ├── title.png │ ├── userlist.jpg │ ├── vueError.jpg │ ├── vueError.png │ └── waterfall .png ├── 前端白屏的检测方案,让你知道自己的页面白了 │ ├── cannot.png │ ├── hand.png │ ├── html.png │ ├── lcp.png │ ├── longTime.png │ ├── point.png │ ├── screen.jpg │ ├── skeleton.gif │ ├── white.png │ └── 未命名绘图.drawio.png ├── 动漫壁纸 │ ├── bg1.jpg │ ├── bg10.jpg │ ├── bg11.jpg │ ├── bg12.jpg │ ├── bg13.jpg │ ├── bg14.jpg │ ├── bg15.jpg │ ├── bg16.jpg │ ├── bg17.jpg │ ├── bg18.jpg │ ├── bg19.jpg │ ├── bg2.jpg │ ├── bg20.jpg │ ├── bg21.jpg │ ├── bg22.jpg │ ├── bg23.jpg │ ├── bg24.jpg │ ├── bg25.jpg │ ├── bg26.jpeg │ ├── bg26.jpg │ ├── bg27.jpg │ ├── bg28.jpg │ ├── bg29.jpg │ ├── bg3.jpg │ ├── bg30.jpg │ ├── bg31.jpg │ ├── bg4.jpg │ ├── bg5.jpg │ ├── bg6.jpg │ ├── bg7.jpg │ ├── bg8.jpg │ └── bg9.jpg ├── 大厂面试避坑指南 │ ├── R-C (1).jpg │ ├── bg.jpg │ ├── direct.png │ ├── 前端知识体系导图.xmind │ ├── 微信图片_20220906145732_副本.jpg │ └── 微信图片_20220906145739.jpg ├── 如何给所有的async函数添加trycatch? │ ├── addBg.gif │ ├── ast-a.jpg │ ├── ast-a.png │ ├── async.jpg │ ├── asyncTrue.jpg │ ├── await.jpg │ ├── babelBg.png │ ├── babelbg.jpg │ ├── error.jpg │ ├── nice.gif │ ├── npm.jpg │ ├── try.jpg │ └── webbg.gif ├── 工作总结 │ ├── VCG211319227895.jpg │ ├── bird.jpg │ └── text1.gif ├── 性能优化-代码层面优化 │ ├── FP.png │ ├── FPoriginal.png │ ├── appTotal.png │ ├── appcssTotal.png │ ├── bg.png │ ├── clickdialog.png │ ├── codeBg.png │ ├── deepclone.png │ ├── dialogInfo.png │ ├── htmlPreload.png │ ├── iconfont.png │ ├── imgAfter.png │ ├── imgOriginal.png │ ├── lazyCss.png │ ├── lazyImg.gif │ ├── lazyRouter.png │ ├── longList.png │ ├── longTask.jpg │ ├── longTask.png │ ├── prefetch.png │ ├── preload.png │ ├── taobao.png │ ├── total.jpg │ ├── total.png │ ├── virtual.png │ ├── virtualList.png │ ├── 各项目完成情况汇总.png │ └── 性能优化.txt ├── 性能优化-内存优化 │ ├── Tom.png │ ├── bg.jpg │ ├── console.png │ ├── treeList.png │ └── 淘宝.png ├── 性能优化-打包构建篇 │ ├── babel-plugin-component-size.png │ ├── babel-plugin-component.png │ ├── babel-plugin-componentTime.png │ ├── babelCss.png │ ├── build.png │ ├── externals.png │ ├── externalsSize.png │ ├── externalsTime.png │ ├── gZip.png │ ├── gzipFinal.png │ ├── happyPackTime.png │ ├── momentJs.png │ ├── momentJsSize.png │ ├── momentJsTime.png │ ├── original.png │ ├── originalCss.png │ ├── originalSize.png │ ├── totalTime.png │ └── 分析页面 │ │ ├── babel-plugin-component分析页面.html │ │ ├── externals分析页面.html │ │ ├── momentJs分析页面.html │ │ └── report原始分析页面.html ├── 最全文件.xmind ├── 错误还原 │ ├── Canvas.png │ ├── canvas.gif │ ├── canvas.gif.gif │ ├── code.png │ ├── codeErr.png │ ├── echart.png │ ├── length.png │ ├── result.png │ ├── sourcemap.png │ ├── stack.png │ ├── stackFrame.png │ └── video.gif ├── 闭包会造成内存泄露? │ ├── Memory.jpg │ ├── a.png │ ├── bg.png │ ├── delete.png │ ├── fn.png │ ├── info.png │ ├── infoClosure.png │ ├── infoInner.png │ ├── infoOut.png │ ├── innerDel.png │ ├── link.png │ ├── normal.png │ ├── originalB.jpg │ ├── pageA.jpg │ ├── pageB.jpg │ ├── pageB.png │ ├── scope.jpg │ ├── utilClosure.png │ └── 内存.txt └── 阿里面试官:请设计一个不能操作DOM和调接口的环境 │ ├── boxBg3.jpg │ ├── bug.png │ ├── document.png │ ├── error.jpg │ ├── nouse.png │ ├── shaboxbg.png │ └── worker.jpg ├── markdown ├── 20个常见的前端算法题,你全都会吗?.md ├── elementUI 多套主题下 按需引入和全局引入 的换肤方案 .md ├── elementUI 源码-打造自己的组件库,系列一:经典永不过时.md ├── elementUI 源码-打造自己的组件库,系列三:Button组件(听说很简单?).md ├── elementUI 源码-打造自己的组件库,系列二:Sass语法 BEM实现 Css编码规范 .md ├── elementUI 源码-打造自己的组件库,系列五:Scrollbar组件.md ├── elementUI 源码-打造自己的组件库,系列四:Dialog组件.md ├── pnpm + changesets 搭建 monorepo 架构的前端监控系统.md ├── 「历时8个月」10万字前端知识体系总结(前端框架+浏览器原理篇).md ├── 「历时8个月」10万字前端知识体系总结(基础知识篇).md ├── 「历时8个月」10万字前端知识体系总结(工程化篇).md ├── 「历时8个月」10万字前端知识体系总结(算法篇).md ├── 一个自学前端的工作总结【三十而立,拒绝躺平】.md ├── 一文彻底了解Web Worker,十万条数据都是弟弟.md ├── 一文彻底弄懂浏览器缓存,只需动手操作一次.md ├── 从0到1搭建前端监控平台,面试必备的亮点项目.md ├── 前端内存优化知多少?内存泄露只是冰山一角.md ├── 前端录屏+定位源码,帮你快速定位线上bug.md ├── 前端性能优化——包体积压缩82%、打包速度提升65%.md ├── 前端性能优化——首页资源压缩63%、白屏时间缩短86%.md ├── 前端白屏的检测方案,让你知道自己的页面白了.md ├── 备战大厂的心路历程,别再盲目刷题了.md ├── 如何使用echarts优雅的封装图形组件,打造自己的组件库,系列六 .md ├── 如何给所有的async函数添加try catch?.md ├── 闭包用多了会造成内存泄露?.md └── 面试官:请设计一个不能操作DOM和调接口的环境.md ├── mini-vue ├── 手写mvvm.html └── 手写v-model双向绑定.html ├── mini-webpack ├── dist │ └── main.js ├── example │ ├── entry.js │ ├── message.js │ └── name.js ├── fs │ └── express.js ├── index.html ├── loader │ ├── async-loader.js │ └── style-loader.js ├── minipack.js ├── package-lock.json ├── package.json └── plugins │ ├── FileListPlugin.js │ ├── MyPlugin.js │ └── qiniu-webpack-plugin.js ├── my-app ├── .gitignore ├── README.md ├── babel.config.js ├── jsconfig.json ├── package-lock.json ├── package.json ├── public │ ├── favicon.ico │ └── index.html ├── src │ ├── App.vue │ ├── assets │ │ └── logo.png │ ├── components │ │ └── HelloWorld.vue │ └── main.js └── vue.config.js ├── my-build-cli ├── README.md ├── bin │ ├── ask.js │ ├── create.js │ ├── generator.js │ ├── http.js │ └── www.js ├── package-lock.json └── package.json ├── performance-demo ├── .browserslistrc ├── .eslintrc.js ├── .gitignore ├── README.md ├── babel.config.js ├── package-lock.json ├── package.json ├── public │ ├── favicon.ico │ └── index.html ├── src │ ├── App.vue │ ├── assets │ │ └── logo.png │ ├── components │ │ └── dialogInfo.vue │ ├── main.js │ ├── router │ │ └── index.js │ ├── store │ │ └── index.js │ ├── util │ │ ├── axiosWrap.js │ │ ├── index.js │ │ └── list.js │ └── views │ │ ├── AboutView.vue │ │ └── HomeView.vue └── vue.config.js ├── pnpm-monorepo-changesets ├── .changeset │ ├── README.md │ └── config.json ├── .gitignore ├── README.md ├── package-lock.json ├── package.json ├── packages │ ├── pk1 │ │ ├── CHANGELOG.md │ │ ├── dist │ │ │ ├── index.js │ │ │ └── index.js.map │ │ ├── package.json │ │ └── src │ │ │ └── index.ts │ └── pk2 │ │ ├── CHANGELOG.md │ │ ├── dist │ │ ├── index.js │ │ └── index.js.map │ │ ├── package.json │ │ └── src │ │ └── index.ts ├── pnpm-lock.yaml ├── pnpm-workspace.yaml ├── rollup.config.js └── tsconfig.json ├── rrweb ├── .gitignore ├── README.md ├── babel.config.js ├── jsconfig.json ├── package-lock.json ├── package.json ├── public │ ├── favicon.ico │ └── index.html ├── src │ ├── App.vue │ ├── assets │ │ └── logo.png │ ├── components │ │ └── HelloWorld.vue │ ├── main.js │ ├── router │ │ └── index.js │ └── views │ │ ├── AboutView.vue │ │ └── HomeView.vue └── vue.config.js ├── source-map ├── .gitignore ├── README.md ├── babel.config.js ├── jsconfig.json ├── package-lock.json ├── package.json ├── public │ ├── favicon.ico │ └── index.html ├── server.js ├── src │ ├── App.vue │ ├── assets │ │ └── logo.png │ ├── components │ │ └── HelloWorld.vue │ ├── main.js │ ├── router │ │ └── index.js │ └── views │ │ ├── AboutView.vue │ │ └── HomeView.vue └── vue.config.js ├── web-worker ├── .browserslistrc ├── .eslintrc.js ├── README.md ├── babel.config.js ├── package-lock.json ├── package.json ├── pnpm-lock.yaml ├── public │ ├── favicon.ico │ └── index.html ├── src │ ├── App.vue │ ├── assets │ │ └── logo.png │ ├── components │ │ ├── canvasDemo.vue │ │ ├── dataList.vue │ │ └── table.js │ ├── main.js │ └── worker │ │ ├── calcWorker.js │ │ ├── canvasWorker.js │ │ └── dataWorker.js ├── vue.config.js └── webworker.gif ├── 动画demo ├── 奖动效demo │ └── prize.html └── 进度条 │ └── index.html ├── 最全js手写题 ├── js手写题.md └── 设计模式实现.md └── 算法分类题库 ├── 20个经典算法题.md ├── README.md ├── 二叉树.md ├── 堆.md ├── 字符串.md ├── 排序算法.md ├── 数组.md ├── 栈和队列.md ├── 树.md └── 链表.md /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | ./idea 4 | # local env files 5 | .env.local 6 | .env.*.local 7 | 8 | # Log files 9 | npm-debug.log* 10 | yarn-debug.log* 11 | yarn-error.log* 12 | 13 | # Editor directories and files 14 | .idea 15 | .vscode 16 | *.suo 17 | *.ntvs* 18 | *.njsproj 19 | *.sln 20 | *.sw? 21 | -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/performance图片/DiagNo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/performance图片/DiagNo.jpg -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/performance图片/FPS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/performance图片/FPS.png -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/performance图片/Lighthouse.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/performance图片/Lighthouse.jpg -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/performance图片/app.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/performance图片/app.jpg -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/performance图片/fire.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/performance图片/fire.png -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/performance图片/heap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/performance图片/heap.png -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/performance图片/main.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/performance图片/main.jpg -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/performance图片/net.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/performance图片/net.png -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/performance图片/opportunity.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/performance图片/opportunity.jpg -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/performance图片/performance.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/performance图片/performance.jpg -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/performance图片/performance1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/performance图片/performance1.jpg -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/performance图片/performance2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/performance图片/performance2.png -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/performance图片/perfromance1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/performance图片/perfromance1.gif -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/performance图片/source.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/performance图片/source.jpg -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/performance图片/sum.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/performance图片/sum.jpg -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/performance图片/无标题文档.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/performance图片/无标题文档.pdf -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/前端知识体系.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/前端知识体系.png -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/前端知识体系复习导图.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/前端知识体系复习导图.png -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/基础篇/componentApi.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/基础篇/componentApi.jpg -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/基础篇/memory.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/基础篇/memory.jpg -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/基础篇/nodeLoop.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/基础篇/nodeLoop.jpg -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/基础篇/oW4E.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/基础篇/oW4E.gif -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/基础篇/onePg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/基础篇/onePg.png -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/基础篇/text1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/基础篇/text1.gif -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/基础篇/theme.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/基础篇/theme.jpg -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/基础篇/var.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/基础篇/var.jpg -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/基础篇/牛逼.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/基础篇/牛逼.jpg -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/工程化图片/Css基础.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/工程化图片/Css基础.png -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/工程化图片/JS基础1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/工程化图片/JS基础1.png -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/工程化图片/all.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/工程化图片/all.png -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/工程化图片/buyNums.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/工程化图片/buyNums.jpg -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/工程化图片/my-2022-cli.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/工程化图片/my-2022-cli.jpg -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/工程化图片/option.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/工程化图片/option.jpg -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/工程化图片/thridBg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/工程化图片/thridBg.jpg -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/工程化图片/webSystem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/工程化图片/webSystem.png -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/工程化图片/二叉查找树.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/工程化图片/二叉查找树.jpg -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/工程化图片/前端工程化.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/工程化图片/前端工程化.png -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/工程化图片/前端框架.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/工程化图片/前端框架.png -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/工程化图片/前端知识体系.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/工程化图片/前端知识体系.png -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/工程化图片/基础知识篇.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/工程化图片/基础知识篇.png -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/工程化图片/工程化.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/工程化图片/工程化.png -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/工程化图片/执行上下文.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/工程化图片/执行上下文.jpg -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/工程化图片/构建工具.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/工程化图片/构建工具.png -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/工程化图片/浏览器原理.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/工程化图片/浏览器原理.png -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/工程化图片/算法.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/工程化图片/算法.png -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/工程化图片/计算机网络与安全.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/工程化图片/计算机网络与安全.png -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/工程化图片/项目优化.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/工程化图片/项目优化.png -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/第4篇:框架+浏览器.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/第4篇:框架+浏览器.png -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/第一篇:基础知识.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/第一篇:基础知识.png -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/第三篇:前端工程化.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/第三篇:前端工程化.png -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/第二篇:算法.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/第二篇:算法.png -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/算法图片/123.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/算法图片/123.png -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/算法图片/Sorting_heapsort_anim.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/算法图片/Sorting_heapsort_anim.gif -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/算法图片/animation.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/算法图片/animation.gif -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/算法图片/cpudemo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/算法图片/cpudemo.jpg -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/算法图片/error.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/算法图片/error.jpg -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/算法图片/findTree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/算法图片/findTree.png -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/算法图片/heap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/算法图片/heap.png -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/算法图片/heapSort.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/算法图片/heapSort.gif -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/算法图片/insert.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/算法图片/insert.gif -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/算法图片/jsbridge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/算法图片/jsbridge.png -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/算法图片/jsbridge注入方式的优缺点.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/算法图片/jsbridge注入方式的优缺点.png -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/算法图片/kill.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/算法图片/kill.jpg -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/算法图片/link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/算法图片/link.png -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/算法图片/localkey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/算法图片/localkey.png -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/算法图片/math.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/算法图片/math.gif -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/算法图片/mathbg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/算法图片/mathbg.jpg -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/算法图片/maxHeap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/算法图片/maxHeap.png -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/算法图片/merge.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/算法图片/merge.gif -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/算法图片/mvvm.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/算法图片/mvvm.gif -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/算法图片/mvvm1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/算法图片/mvvm1.gif -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/算法图片/onion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/算法图片/onion.png -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/算法图片/reTree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/算法图片/reTree.png -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/算法图片/requestIdcallback.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/算法图片/requestIdcallback.jpg -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/算法图片/retainedSize.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/算法图片/retainedSize.jpg -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/算法图片/ringLink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/算法图片/ringLink.png -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/算法图片/root.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/算法图片/root.jpg -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/算法图片/selectSort.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/算法图片/selectSort.gif -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/算法图片/sort.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/算法图片/sort.png -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/算法图片/sticky.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/算法图片/sticky.gif -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/算法图片/text1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/算法图片/text1.gif -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/算法图片/time.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/算法图片/time.png -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/算法图片/twoTree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/算法图片/twoTree.png -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/算法图片/vendors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/算法图片/vendors.png -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/算法图片/window.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/算法图片/window.png -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/算法图片/执行上下文.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/算法图片/执行上下文.png -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/算法图片/新建 DOCX 文档.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/算法图片/新建 DOCX 文档.docx -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/算法图片/算法篇.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/算法图片/算法篇.docx -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/算法图片/雅虎35条军规.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/算法图片/雅虎35条军规.jpg -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/算法图片/项目开发-E-01-4.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/算法图片/项目开发-E-01-4.xlsx -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/脚手架图片/2022cli.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/脚手架图片/2022cli.jpg -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/脚手架图片/init-y.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/脚手架图片/init-y.png -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/脚手架图片/link.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/脚手架图片/link.jpg -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/脚手架图片/linksuccess.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/脚手架图片/linksuccess.jpg -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/脚手架图片/list.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/脚手架图片/list.jpg -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/脚手架图片/publish.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/脚手架图片/publish.jpg -------------------------------------------------------------------------------- /image/10万字前端知识体系总结/脚手架图片/text8.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/10万字前端知识体系总结/脚手架图片/text8.gif -------------------------------------------------------------------------------- /image/20个常见的前端算法题/VCG41N1134937311.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/20个常见的前端算法题/VCG41N1134937311.jpg -------------------------------------------------------------------------------- /image/20个常见的前端算法题/bubble.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/20个常见的前端算法题/bubble.gif -------------------------------------------------------------------------------- /image/20个常见的前端算法题/face.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/20个常见的前端算法题/face.png -------------------------------------------------------------------------------- /image/20个常见的前端算法题/mathBg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/20个常见的前端算法题/mathBg.jpg -------------------------------------------------------------------------------- /image/20个常见的前端算法题/merge.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/20个常见的前端算法题/merge.gif -------------------------------------------------------------------------------- /image/20个常见的前端算法题/sort.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/20个常见的前端算法题/sort.gif -------------------------------------------------------------------------------- /image/webworker图片/35.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/webworker图片/35.jpg -------------------------------------------------------------------------------- /image/webworker图片/R-C (1).gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/webworker图片/R-C (1).gif -------------------------------------------------------------------------------- /image/webworker图片/R-C (2).gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/webworker图片/R-C (2).gif -------------------------------------------------------------------------------- /image/webworker图片/R-C (3).gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/webworker图片/R-C (3).gif -------------------------------------------------------------------------------- /image/webworker图片/R-C.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/webworker图片/R-C.gif -------------------------------------------------------------------------------- /image/webworker图片/WebWorkers.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/webworker图片/WebWorkers.jpg -------------------------------------------------------------------------------- /image/webworker图片/boom2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/webworker图片/boom2.gif -------------------------------------------------------------------------------- /image/webworker图片/cricle.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/webworker图片/cricle.gif -------------------------------------------------------------------------------- /image/webworker图片/face.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/webworker图片/face.jpg -------------------------------------------------------------------------------- /image/webworker图片/good.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/webworker图片/good.gif -------------------------------------------------------------------------------- /image/webworker图片/jing.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/webworker图片/jing.jpg -------------------------------------------------------------------------------- /image/webworker图片/load.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/webworker图片/load.png -------------------------------------------------------------------------------- /image/webworker图片/nai.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/webworker图片/nai.png -------------------------------------------------------------------------------- /image/webworker图片/performance.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/webworker图片/performance.png -------------------------------------------------------------------------------- /image/webworker图片/src=http___img.soogif.com_n7sySW0OULhVlH5j7OrXHpbqEiM9hDsr.gif&refer=http___img.soogif.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/webworker图片/src=http___img.soogif.com_n7sySW0OULhVlH5j7OrXHpbqEiM9hDsr.gif&refer=http___img.soogif.gif -------------------------------------------------------------------------------- /image/webworker图片/table.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/webworker图片/table.gif -------------------------------------------------------------------------------- /image/webworker图片/table.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/webworker图片/table.jpg -------------------------------------------------------------------------------- /image/webworker图片/table.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/webworker图片/table.png -------------------------------------------------------------------------------- /image/webworker图片/time.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/webworker图片/time.png -------------------------------------------------------------------------------- /image/webworker图片/time1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/webworker图片/time1.png -------------------------------------------------------------------------------- /image/webworker图片/time3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/webworker图片/time3.png -------------------------------------------------------------------------------- /image/webworker图片/total.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/webworker图片/total.png -------------------------------------------------------------------------------- /image/webworker图片/绝望.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/webworker图片/绝望.jpg -------------------------------------------------------------------------------- /image/一文彻底弄懂浏览器缓存,只需动手操作一次/53.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/一文彻底弄懂浏览器缓存,只需动手操作一次/53.png -------------------------------------------------------------------------------- /image/一文彻底弄懂浏览器缓存,只需动手操作一次/82.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/一文彻底弄懂浏览器缓存,只需动手操作一次/82.png -------------------------------------------------------------------------------- /image/一文彻底弄懂浏览器缓存,只需动手操作一次/Disable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/一文彻底弄懂浏览器缓存,只需动手操作一次/Disable.png -------------------------------------------------------------------------------- /image/一文彻底弄懂浏览器缓存,只需动手操作一次/cache.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/一文彻底弄懂浏览器缓存,只需动手操作一次/cache.png -------------------------------------------------------------------------------- /image/一文彻底弄懂浏览器缓存,只需动手操作一次/cacheBg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/一文彻底弄懂浏览器缓存,只需动手操作一次/cacheBg.png -------------------------------------------------------------------------------- /image/一文彻底弄懂浏览器缓存,只需动手操作一次/disablecache.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/一文彻底弄懂浏览器缓存,只需动手操作一次/disablecache.png -------------------------------------------------------------------------------- /image/一文彻底弄懂浏览器缓存,只需动手操作一次/disk.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/一文彻底弄懂浏览器缓存,只需动手操作一次/disk.jpg -------------------------------------------------------------------------------- /image/一文彻底弄懂浏览器缓存,只需动手操作一次/etag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/一文彻底弄懂浏览器缓存,只需动手操作一次/etag.png -------------------------------------------------------------------------------- /image/一文彻底弄懂浏览器缓存,只需动手操作一次/if-modified-since.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/一文彻底弄懂浏览器缓存,只需动手操作一次/if-modified-since.png -------------------------------------------------------------------------------- /image/一文彻底弄懂浏览器缓存,只需动手操作一次/if-none-match.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/一文彻底弄懂浏览器缓存,只需动手操作一次/if-none-match.png -------------------------------------------------------------------------------- /image/一文彻底弄懂浏览器缓存,只需动手操作一次/last-modified.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/一文彻底弄懂浏览器缓存,只需动手操作一次/last-modified.png -------------------------------------------------------------------------------- /image/一文彻底弄懂浏览器缓存,只需动手操作一次/lighthouse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/一文彻底弄懂浏览器缓存,只需动手操作一次/lighthouse.png -------------------------------------------------------------------------------- /image/一文彻底弄懂浏览器缓存,只需动手操作一次/load.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/一文彻底弄懂浏览器缓存,只需动手操作一次/load.png -------------------------------------------------------------------------------- /image/一文彻底弄懂浏览器缓存,只需动手操作一次/memory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/一文彻底弄懂浏览器缓存,只需动手操作一次/memory.png -------------------------------------------------------------------------------- /image/一文彻底弄懂浏览器缓存,只需动手操作一次/memorycache.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/一文彻底弄懂浏览器缓存,只需动手操作一次/memorycache.png -------------------------------------------------------------------------------- /image/一文彻底弄懂浏览器缓存,只需动手操作一次/nocache.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/一文彻底弄懂浏览器缓存,只需动手操作一次/nocache.png -------------------------------------------------------------------------------- /image/一文彻底弄懂浏览器缓存,只需动手操作一次/response.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/一文彻底弄懂浏览器缓存,只需动手操作一次/response.png -------------------------------------------------------------------------------- /image/一文彻底弄懂浏览器缓存,只需动手操作一次/缓存流程.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/一文彻底弄懂浏览器缓存,只需动手操作一次/缓存流程.png -------------------------------------------------------------------------------- /image/从0到1搭建前端监控平台,面试必备的亮点项目/ScriptError1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/从0到1搭建前端监控平台,面试必备的亮点项目/ScriptError1.jpg -------------------------------------------------------------------------------- /image/从0到1搭建前端监控平台,面试必备的亮点项目/autumn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/从0到1搭建前端监控平台,面试必备的亮点项目/autumn.png -------------------------------------------------------------------------------- /image/从0到1搭建前端监控平台,面试必备的亮点项目/bread.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/从0到1搭建前端监控平台,面试必备的亮点项目/bread.png -------------------------------------------------------------------------------- /image/从0到1搭建前端监控平台,面试必备的亮点项目/cool.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/从0到1搭建前端监控平台,面试必备的亮点项目/cool.jpg -------------------------------------------------------------------------------- /image/从0到1搭建前端监控平台,面试必备的亮点项目/entry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/从0到1搭建前端监控平台,面试必备的亮点项目/entry.png -------------------------------------------------------------------------------- /image/从0到1搭建前端监控平台,面试必备的亮点项目/error.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/从0到1搭建前端监控平台,面试必备的亮点项目/error.jpg -------------------------------------------------------------------------------- /image/从0到1搭建前端监控平台,面试必备的亮点项目/error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/从0到1搭建前端监控平台,面试必备的亮点项目/error.png -------------------------------------------------------------------------------- /image/从0到1搭建前端监控平台,面试必备的亮点项目/error2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/从0到1搭建前端监控平台,面试必备的亮点项目/error2.jpg -------------------------------------------------------------------------------- /image/从0到1搭建前端监控平台,面试必备的亮点项目/errorCode.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/从0到1搭建前端监控平台,面试必备的亮点项目/errorCode.jpg -------------------------------------------------------------------------------- /image/从0到1搭建前端监控平台,面试必备的亮点项目/install.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/从0到1搭建前端监控平台,面试必备的亮点项目/install.jpg -------------------------------------------------------------------------------- /image/从0到1搭建前端监控平台,面试必备的亮点项目/install.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/从0到1搭建前端监控平台,面试必备的亮点项目/install.png -------------------------------------------------------------------------------- /image/从0到1搭建前端监控平台,面试必备的亮点项目/list.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/从0到1搭建前端监控平台,面试必备的亮点项目/list.jpg -------------------------------------------------------------------------------- /image/从0到1搭建前端监控平台,面试必备的亮点项目/load.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/从0到1搭建前端监控平台,面试必备的亮点项目/load.jpg -------------------------------------------------------------------------------- /image/从0到1搭建前端监控平台,面试必备的亮点项目/queue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/从0到1搭建前端监控平台,面试必备的亮点项目/queue.png -------------------------------------------------------------------------------- /image/从0到1搭建前端监控平台,面试必备的亮点项目/record.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/从0到1搭建前端监控平台,面试必备的亮点项目/record.gif -------------------------------------------------------------------------------- /image/从0到1搭建前端监控平台,面试必备的亮点项目/replace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/从0到1搭建前端监控平台,面试必备的亮点项目/replace.png -------------------------------------------------------------------------------- /image/从0到1搭建前端监控平台,面试必备的亮点项目/scriptError.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/从0到1搭建前端监控平台,面试必备的亮点项目/scriptError.jpg -------------------------------------------------------------------------------- /image/从0到1搭建前端监控平台,面试必备的亮点项目/sdk.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/从0到1搭建前端监控平台,面试必备的亮点项目/sdk.jpg -------------------------------------------------------------------------------- /image/从0到1搭建前端监控平台,面试必备的亮点项目/sdk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/从0到1搭建前端监控平台,面试必备的亮点项目/sdk.png -------------------------------------------------------------------------------- /image/从0到1搭建前端监控平台,面试必备的亮点项目/sdkProcess.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/从0到1搭建前端监控平台,面试必备的亮点项目/sdkProcess.jpg -------------------------------------------------------------------------------- /image/从0到1搭建前端监控平台,面试必备的亮点项目/sea.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/从0到1搭建前端监控平台,面试必备的亮点项目/sea.png -------------------------------------------------------------------------------- /image/从0到1搭建前端监控平台,面试必备的亮点项目/see.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/从0到1搭建前端监控平台,面试必备的亮点项目/see.jpg -------------------------------------------------------------------------------- /image/从0到1搭建前端监控平台,面试必备的亮点项目/send.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/从0到1搭建前端监控平台,面试必备的亮点项目/send.png -------------------------------------------------------------------------------- /image/从0到1搭建前端监控平台,面试必备的亮点项目/sentry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/从0到1搭建前端监控平台,面试必备的亮点项目/sentry.png -------------------------------------------------------------------------------- /image/从0到1搭建前端监控平台,面试必备的亮点项目/spa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/从0到1搭建前端监控平台,面试必备的亮点项目/spa.png -------------------------------------------------------------------------------- /image/从0到1搭建前端监控平台,面试必备的亮点项目/system.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/从0到1搭建前端监控平台,面试必备的亮点项目/system.png -------------------------------------------------------------------------------- /image/从0到1搭建前端监控平台,面试必备的亮点项目/task.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/从0到1搭建前端监控平台,面试必备的亮点项目/task.png -------------------------------------------------------------------------------- /image/从0到1搭建前端监控平台,面试必备的亮点项目/timing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/从0到1搭建前端监控平台,面试必备的亮点项目/timing.png -------------------------------------------------------------------------------- /image/从0到1搭建前端监控平台,面试必备的亮点项目/title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/从0到1搭建前端监控平台,面试必备的亮点项目/title.png -------------------------------------------------------------------------------- /image/从0到1搭建前端监控平台,面试必备的亮点项目/userlist.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/从0到1搭建前端监控平台,面试必备的亮点项目/userlist.jpg -------------------------------------------------------------------------------- /image/从0到1搭建前端监控平台,面试必备的亮点项目/vueError.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/从0到1搭建前端监控平台,面试必备的亮点项目/vueError.jpg -------------------------------------------------------------------------------- /image/从0到1搭建前端监控平台,面试必备的亮点项目/vueError.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/从0到1搭建前端监控平台,面试必备的亮点项目/vueError.png -------------------------------------------------------------------------------- /image/从0到1搭建前端监控平台,面试必备的亮点项目/waterfall .png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/从0到1搭建前端监控平台,面试必备的亮点项目/waterfall .png -------------------------------------------------------------------------------- /image/前端白屏的检测方案,让你知道自己的页面白了/cannot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/前端白屏的检测方案,让你知道自己的页面白了/cannot.png -------------------------------------------------------------------------------- /image/前端白屏的检测方案,让你知道自己的页面白了/hand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/前端白屏的检测方案,让你知道自己的页面白了/hand.png -------------------------------------------------------------------------------- /image/前端白屏的检测方案,让你知道自己的页面白了/html.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/前端白屏的检测方案,让你知道自己的页面白了/html.png -------------------------------------------------------------------------------- /image/前端白屏的检测方案,让你知道自己的页面白了/lcp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/前端白屏的检测方案,让你知道自己的页面白了/lcp.png -------------------------------------------------------------------------------- /image/前端白屏的检测方案,让你知道自己的页面白了/longTime.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/前端白屏的检测方案,让你知道自己的页面白了/longTime.png -------------------------------------------------------------------------------- /image/前端白屏的检测方案,让你知道自己的页面白了/point.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/前端白屏的检测方案,让你知道自己的页面白了/point.png -------------------------------------------------------------------------------- /image/前端白屏的检测方案,让你知道自己的页面白了/screen.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/前端白屏的检测方案,让你知道自己的页面白了/screen.jpg -------------------------------------------------------------------------------- /image/前端白屏的检测方案,让你知道自己的页面白了/skeleton.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/前端白屏的检测方案,让你知道自己的页面白了/skeleton.gif -------------------------------------------------------------------------------- /image/前端白屏的检测方案,让你知道自己的页面白了/white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/前端白屏的检测方案,让你知道自己的页面白了/white.png -------------------------------------------------------------------------------- /image/前端白屏的检测方案,让你知道自己的页面白了/未命名绘图.drawio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/前端白屏的检测方案,让你知道自己的页面白了/未命名绘图.drawio.png -------------------------------------------------------------------------------- /image/动漫壁纸/bg1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/动漫壁纸/bg1.jpg -------------------------------------------------------------------------------- /image/动漫壁纸/bg10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/动漫壁纸/bg10.jpg -------------------------------------------------------------------------------- /image/动漫壁纸/bg11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/动漫壁纸/bg11.jpg -------------------------------------------------------------------------------- /image/动漫壁纸/bg12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/动漫壁纸/bg12.jpg -------------------------------------------------------------------------------- /image/动漫壁纸/bg13.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/动漫壁纸/bg13.jpg -------------------------------------------------------------------------------- /image/动漫壁纸/bg14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/动漫壁纸/bg14.jpg -------------------------------------------------------------------------------- /image/动漫壁纸/bg15.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/动漫壁纸/bg15.jpg -------------------------------------------------------------------------------- /image/动漫壁纸/bg16.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/动漫壁纸/bg16.jpg -------------------------------------------------------------------------------- /image/动漫壁纸/bg17.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/动漫壁纸/bg17.jpg -------------------------------------------------------------------------------- /image/动漫壁纸/bg18.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/动漫壁纸/bg18.jpg -------------------------------------------------------------------------------- /image/动漫壁纸/bg19.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/动漫壁纸/bg19.jpg -------------------------------------------------------------------------------- /image/动漫壁纸/bg2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/动漫壁纸/bg2.jpg -------------------------------------------------------------------------------- /image/动漫壁纸/bg20.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/动漫壁纸/bg20.jpg -------------------------------------------------------------------------------- /image/动漫壁纸/bg21.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/动漫壁纸/bg21.jpg -------------------------------------------------------------------------------- /image/动漫壁纸/bg22.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/动漫壁纸/bg22.jpg -------------------------------------------------------------------------------- /image/动漫壁纸/bg23.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/动漫壁纸/bg23.jpg -------------------------------------------------------------------------------- /image/动漫壁纸/bg24.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/动漫壁纸/bg24.jpg -------------------------------------------------------------------------------- /image/动漫壁纸/bg25.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/动漫壁纸/bg25.jpg -------------------------------------------------------------------------------- /image/动漫壁纸/bg26.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/动漫壁纸/bg26.jpeg -------------------------------------------------------------------------------- /image/动漫壁纸/bg26.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/动漫壁纸/bg26.jpg -------------------------------------------------------------------------------- /image/动漫壁纸/bg27.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/动漫壁纸/bg27.jpg -------------------------------------------------------------------------------- /image/动漫壁纸/bg28.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/动漫壁纸/bg28.jpg -------------------------------------------------------------------------------- /image/动漫壁纸/bg29.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/动漫壁纸/bg29.jpg -------------------------------------------------------------------------------- /image/动漫壁纸/bg3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/动漫壁纸/bg3.jpg -------------------------------------------------------------------------------- /image/动漫壁纸/bg30.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/动漫壁纸/bg30.jpg -------------------------------------------------------------------------------- /image/动漫壁纸/bg31.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/动漫壁纸/bg31.jpg -------------------------------------------------------------------------------- /image/动漫壁纸/bg4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/动漫壁纸/bg4.jpg -------------------------------------------------------------------------------- /image/动漫壁纸/bg5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/动漫壁纸/bg5.jpg -------------------------------------------------------------------------------- /image/动漫壁纸/bg6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/动漫壁纸/bg6.jpg -------------------------------------------------------------------------------- /image/动漫壁纸/bg7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/动漫壁纸/bg7.jpg -------------------------------------------------------------------------------- /image/动漫壁纸/bg8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/动漫壁纸/bg8.jpg -------------------------------------------------------------------------------- /image/动漫壁纸/bg9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/动漫壁纸/bg9.jpg -------------------------------------------------------------------------------- /image/大厂面试避坑指南/R-C (1).jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/大厂面试避坑指南/R-C (1).jpg -------------------------------------------------------------------------------- /image/大厂面试避坑指南/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/大厂面试避坑指南/bg.jpg -------------------------------------------------------------------------------- /image/大厂面试避坑指南/direct.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/大厂面试避坑指南/direct.png -------------------------------------------------------------------------------- /image/大厂面试避坑指南/前端知识体系导图.xmind: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/大厂面试避坑指南/前端知识体系导图.xmind -------------------------------------------------------------------------------- /image/大厂面试避坑指南/微信图片_20220906145732_副本.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/大厂面试避坑指南/微信图片_20220906145732_副本.jpg -------------------------------------------------------------------------------- /image/大厂面试避坑指南/微信图片_20220906145739.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/大厂面试避坑指南/微信图片_20220906145739.jpg -------------------------------------------------------------------------------- /image/如何给所有的async函数添加trycatch?/addBg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/如何给所有的async函数添加trycatch?/addBg.gif -------------------------------------------------------------------------------- /image/如何给所有的async函数添加trycatch?/ast-a.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/如何给所有的async函数添加trycatch?/ast-a.jpg -------------------------------------------------------------------------------- /image/如何给所有的async函数添加trycatch?/ast-a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/如何给所有的async函数添加trycatch?/ast-a.png -------------------------------------------------------------------------------- /image/如何给所有的async函数添加trycatch?/async.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/如何给所有的async函数添加trycatch?/async.jpg -------------------------------------------------------------------------------- /image/如何给所有的async函数添加trycatch?/asyncTrue.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/如何给所有的async函数添加trycatch?/asyncTrue.jpg -------------------------------------------------------------------------------- /image/如何给所有的async函数添加trycatch?/await.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/如何给所有的async函数添加trycatch?/await.jpg -------------------------------------------------------------------------------- /image/如何给所有的async函数添加trycatch?/babelBg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/如何给所有的async函数添加trycatch?/babelBg.png -------------------------------------------------------------------------------- /image/如何给所有的async函数添加trycatch?/babelbg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/如何给所有的async函数添加trycatch?/babelbg.jpg -------------------------------------------------------------------------------- /image/如何给所有的async函数添加trycatch?/error.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/如何给所有的async函数添加trycatch?/error.jpg -------------------------------------------------------------------------------- /image/如何给所有的async函数添加trycatch?/nice.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/如何给所有的async函数添加trycatch?/nice.gif -------------------------------------------------------------------------------- /image/如何给所有的async函数添加trycatch?/npm.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/如何给所有的async函数添加trycatch?/npm.jpg -------------------------------------------------------------------------------- /image/如何给所有的async函数添加trycatch?/try.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/如何给所有的async函数添加trycatch?/try.jpg -------------------------------------------------------------------------------- /image/如何给所有的async函数添加trycatch?/webbg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/如何给所有的async函数添加trycatch?/webbg.gif -------------------------------------------------------------------------------- /image/工作总结/VCG211319227895.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/工作总结/VCG211319227895.jpg -------------------------------------------------------------------------------- /image/工作总结/bird.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/工作总结/bird.jpg -------------------------------------------------------------------------------- /image/工作总结/text1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/工作总结/text1.gif -------------------------------------------------------------------------------- /image/性能优化-代码层面优化/FP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-代码层面优化/FP.png -------------------------------------------------------------------------------- /image/性能优化-代码层面优化/FPoriginal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-代码层面优化/FPoriginal.png -------------------------------------------------------------------------------- /image/性能优化-代码层面优化/appTotal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-代码层面优化/appTotal.png -------------------------------------------------------------------------------- /image/性能优化-代码层面优化/appcssTotal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-代码层面优化/appcssTotal.png -------------------------------------------------------------------------------- /image/性能优化-代码层面优化/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-代码层面优化/bg.png -------------------------------------------------------------------------------- /image/性能优化-代码层面优化/clickdialog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-代码层面优化/clickdialog.png -------------------------------------------------------------------------------- /image/性能优化-代码层面优化/codeBg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-代码层面优化/codeBg.png -------------------------------------------------------------------------------- /image/性能优化-代码层面优化/deepclone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-代码层面优化/deepclone.png -------------------------------------------------------------------------------- /image/性能优化-代码层面优化/dialogInfo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-代码层面优化/dialogInfo.png -------------------------------------------------------------------------------- /image/性能优化-代码层面优化/htmlPreload.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-代码层面优化/htmlPreload.png -------------------------------------------------------------------------------- /image/性能优化-代码层面优化/iconfont.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-代码层面优化/iconfont.png -------------------------------------------------------------------------------- /image/性能优化-代码层面优化/imgAfter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-代码层面优化/imgAfter.png -------------------------------------------------------------------------------- /image/性能优化-代码层面优化/imgOriginal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-代码层面优化/imgOriginal.png -------------------------------------------------------------------------------- /image/性能优化-代码层面优化/lazyCss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-代码层面优化/lazyCss.png -------------------------------------------------------------------------------- /image/性能优化-代码层面优化/lazyImg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-代码层面优化/lazyImg.gif -------------------------------------------------------------------------------- /image/性能优化-代码层面优化/lazyRouter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-代码层面优化/lazyRouter.png -------------------------------------------------------------------------------- /image/性能优化-代码层面优化/longList.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-代码层面优化/longList.png -------------------------------------------------------------------------------- /image/性能优化-代码层面优化/longTask.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-代码层面优化/longTask.jpg -------------------------------------------------------------------------------- /image/性能优化-代码层面优化/longTask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-代码层面优化/longTask.png -------------------------------------------------------------------------------- /image/性能优化-代码层面优化/prefetch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-代码层面优化/prefetch.png -------------------------------------------------------------------------------- /image/性能优化-代码层面优化/preload.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-代码层面优化/preload.png -------------------------------------------------------------------------------- /image/性能优化-代码层面优化/taobao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-代码层面优化/taobao.png -------------------------------------------------------------------------------- /image/性能优化-代码层面优化/total.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-代码层面优化/total.jpg -------------------------------------------------------------------------------- /image/性能优化-代码层面优化/total.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-代码层面优化/total.png -------------------------------------------------------------------------------- /image/性能优化-代码层面优化/virtual.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-代码层面优化/virtual.png -------------------------------------------------------------------------------- /image/性能优化-代码层面优化/virtualList.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-代码层面优化/virtualList.png -------------------------------------------------------------------------------- /image/性能优化-代码层面优化/各项目完成情况汇总.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-代码层面优化/各项目完成情况汇总.png -------------------------------------------------------------------------------- /image/性能优化-代码层面优化/性能优化.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-代码层面优化/性能优化.txt -------------------------------------------------------------------------------- /image/性能优化-内存优化/Tom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-内存优化/Tom.png -------------------------------------------------------------------------------- /image/性能优化-内存优化/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-内存优化/bg.jpg -------------------------------------------------------------------------------- /image/性能优化-内存优化/console.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-内存优化/console.png -------------------------------------------------------------------------------- /image/性能优化-内存优化/treeList.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-内存优化/treeList.png -------------------------------------------------------------------------------- /image/性能优化-内存优化/淘宝.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-内存优化/淘宝.png -------------------------------------------------------------------------------- /image/性能优化-打包构建篇/babel-plugin-component-size.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-打包构建篇/babel-plugin-component-size.png -------------------------------------------------------------------------------- /image/性能优化-打包构建篇/babel-plugin-component.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-打包构建篇/babel-plugin-component.png -------------------------------------------------------------------------------- /image/性能优化-打包构建篇/babel-plugin-componentTime.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-打包构建篇/babel-plugin-componentTime.png -------------------------------------------------------------------------------- /image/性能优化-打包构建篇/babelCss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-打包构建篇/babelCss.png -------------------------------------------------------------------------------- /image/性能优化-打包构建篇/build.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-打包构建篇/build.png -------------------------------------------------------------------------------- /image/性能优化-打包构建篇/externals.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-打包构建篇/externals.png -------------------------------------------------------------------------------- /image/性能优化-打包构建篇/externalsSize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-打包构建篇/externalsSize.png -------------------------------------------------------------------------------- /image/性能优化-打包构建篇/externalsTime.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-打包构建篇/externalsTime.png -------------------------------------------------------------------------------- /image/性能优化-打包构建篇/gZip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-打包构建篇/gZip.png -------------------------------------------------------------------------------- /image/性能优化-打包构建篇/gzipFinal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-打包构建篇/gzipFinal.png -------------------------------------------------------------------------------- /image/性能优化-打包构建篇/happyPackTime.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-打包构建篇/happyPackTime.png -------------------------------------------------------------------------------- /image/性能优化-打包构建篇/momentJs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-打包构建篇/momentJs.png -------------------------------------------------------------------------------- /image/性能优化-打包构建篇/momentJsSize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-打包构建篇/momentJsSize.png -------------------------------------------------------------------------------- /image/性能优化-打包构建篇/momentJsTime.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-打包构建篇/momentJsTime.png -------------------------------------------------------------------------------- /image/性能优化-打包构建篇/original.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-打包构建篇/original.png -------------------------------------------------------------------------------- /image/性能优化-打包构建篇/originalCss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-打包构建篇/originalCss.png -------------------------------------------------------------------------------- /image/性能优化-打包构建篇/originalSize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-打包构建篇/originalSize.png -------------------------------------------------------------------------------- /image/性能优化-打包构建篇/totalTime.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/性能优化-打包构建篇/totalTime.png -------------------------------------------------------------------------------- /image/最全文件.xmind: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/最全文件.xmind -------------------------------------------------------------------------------- /image/错误还原/Canvas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/错误还原/Canvas.png -------------------------------------------------------------------------------- /image/错误还原/canvas.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/错误还原/canvas.gif -------------------------------------------------------------------------------- /image/错误还原/canvas.gif.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/错误还原/canvas.gif.gif -------------------------------------------------------------------------------- /image/错误还原/code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/错误还原/code.png -------------------------------------------------------------------------------- /image/错误还原/codeErr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/错误还原/codeErr.png -------------------------------------------------------------------------------- /image/错误还原/echart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/错误还原/echart.png -------------------------------------------------------------------------------- /image/错误还原/length.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/错误还原/length.png -------------------------------------------------------------------------------- /image/错误还原/result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/错误还原/result.png -------------------------------------------------------------------------------- /image/错误还原/sourcemap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/错误还原/sourcemap.png -------------------------------------------------------------------------------- /image/错误还原/stack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/错误还原/stack.png -------------------------------------------------------------------------------- /image/错误还原/stackFrame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/错误还原/stackFrame.png -------------------------------------------------------------------------------- /image/错误还原/video.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/错误还原/video.gif -------------------------------------------------------------------------------- /image/闭包会造成内存泄露?/Memory.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/闭包会造成内存泄露?/Memory.jpg -------------------------------------------------------------------------------- /image/闭包会造成内存泄露?/a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/闭包会造成内存泄露?/a.png -------------------------------------------------------------------------------- /image/闭包会造成内存泄露?/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/闭包会造成内存泄露?/bg.png -------------------------------------------------------------------------------- /image/闭包会造成内存泄露?/delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/闭包会造成内存泄露?/delete.png -------------------------------------------------------------------------------- /image/闭包会造成内存泄露?/fn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/闭包会造成内存泄露?/fn.png -------------------------------------------------------------------------------- /image/闭包会造成内存泄露?/info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/闭包会造成内存泄露?/info.png -------------------------------------------------------------------------------- /image/闭包会造成内存泄露?/infoClosure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/闭包会造成内存泄露?/infoClosure.png -------------------------------------------------------------------------------- /image/闭包会造成内存泄露?/infoInner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/闭包会造成内存泄露?/infoInner.png -------------------------------------------------------------------------------- /image/闭包会造成内存泄露?/infoOut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/闭包会造成内存泄露?/infoOut.png -------------------------------------------------------------------------------- /image/闭包会造成内存泄露?/innerDel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/闭包会造成内存泄露?/innerDel.png -------------------------------------------------------------------------------- /image/闭包会造成内存泄露?/link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/闭包会造成内存泄露?/link.png -------------------------------------------------------------------------------- /image/闭包会造成内存泄露?/normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/闭包会造成内存泄露?/normal.png -------------------------------------------------------------------------------- /image/闭包会造成内存泄露?/originalB.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/闭包会造成内存泄露?/originalB.jpg -------------------------------------------------------------------------------- /image/闭包会造成内存泄露?/pageA.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/闭包会造成内存泄露?/pageA.jpg -------------------------------------------------------------------------------- /image/闭包会造成内存泄露?/pageB.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/闭包会造成内存泄露?/pageB.jpg -------------------------------------------------------------------------------- /image/闭包会造成内存泄露?/pageB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/闭包会造成内存泄露?/pageB.png -------------------------------------------------------------------------------- /image/闭包会造成内存泄露?/scope.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/闭包会造成内存泄露?/scope.jpg -------------------------------------------------------------------------------- /image/闭包会造成内存泄露?/utilClosure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/闭包会造成内存泄露?/utilClosure.png -------------------------------------------------------------------------------- /image/闭包会造成内存泄露?/内存.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/闭包会造成内存泄露?/内存.txt -------------------------------------------------------------------------------- /image/阿里面试官:请设计一个不能操作DOM和调接口的环境/boxBg3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/阿里面试官:请设计一个不能操作DOM和调接口的环境/boxBg3.jpg -------------------------------------------------------------------------------- /image/阿里面试官:请设计一个不能操作DOM和调接口的环境/bug.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/阿里面试官:请设计一个不能操作DOM和调接口的环境/bug.png -------------------------------------------------------------------------------- /image/阿里面试官:请设计一个不能操作DOM和调接口的环境/document.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/阿里面试官:请设计一个不能操作DOM和调接口的环境/document.png -------------------------------------------------------------------------------- /image/阿里面试官:请设计一个不能操作DOM和调接口的环境/error.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/阿里面试官:请设计一个不能操作DOM和调接口的环境/error.jpg -------------------------------------------------------------------------------- /image/阿里面试官:请设计一个不能操作DOM和调接口的环境/nouse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/阿里面试官:请设计一个不能操作DOM和调接口的环境/nouse.png -------------------------------------------------------------------------------- /image/阿里面试官:请设计一个不能操作DOM和调接口的环境/shaboxbg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/阿里面试官:请设计一个不能操作DOM和调接口的环境/shaboxbg.png -------------------------------------------------------------------------------- /image/阿里面试官:请设计一个不能操作DOM和调接口的环境/worker.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/image/阿里面试官:请设计一个不能操作DOM和调接口的环境/worker.jpg -------------------------------------------------------------------------------- /markdown/elementUI 源码-打造自己的组件库,系列一:经典永不过时.md: -------------------------------------------------------------------------------- 1 | 本着够用的原则,这个源码系列,先易后难(狗头,难的我也不会)。先不讲 element build 目录下工程化的配置,这些等用到的时候再说,先从组件源码,样式规范一点点铺展开来 2 | 3 | 虽然 vue3 已经逐步取代了 vue2,新的 UI 框架也款款而来,但不妨碍 elementUI 依然作为我心中的最佳,每每阅读总有源源不断的知识点可以学习,`经典永不过时` 4 | 5 | ## 背景 6 | 7 | 使用了 elementUI 也有两三年了,但好像从没有认真阅读过 elementUI 的官方文档,只是用到的时候翻一翻,源码更没有看过。机会来了,终于睡服领导,同意打造公司的组件库(其实又是一次大型的粘贴复制)。 8 | 领导本着凡事三板斧的原则,必要问个所以然。答案必然要备好,免得打脸。 9 | **1、为什么要打造自己的组件库?** 10 | 答: 项目中,大量需要针对 elementUI 的样式进行二次修改,开发效率低。项目满眼的/deep/,满眼的泪 11 | **2、开发组件库有何收益?** 12 | 答:通过开发组件库,实现相似产品线的整合,实现产品 UI 风格的统一 13 | **3、开发组件的人力投入如何?** 14 | 答:分为两期,一期 2 人月,基本完成对原有组件的样式修改和文档补充;二期 2 人月,新增图形、复杂表格等组件 15 | 16 | ## 发车了 17 | 18 | ### 老规矩,Ctrl c\Ctrl v 19 | 20 | 从 github 上下载 elementUI 的源码,我的版本是**2.15.7** 21 | 22 | ### 项目结构总览 23 | 24 | | 目录 | 内容 | 25 | | :------- | :---------------------------------------------------------------------------- | 26 | | build | 工程化相关配置和脚本(越到后越感叹 element 的工程化程度如此之高) | 27 | | examples | 官方文档项目(没想到 elementUI 官方文档也在组件库中,厉害,原谅我这碗水太浅) | 28 | | lib | 组件库打包后生成的文件(执行 npm run dist 即可生成) | 29 | | packages | 组件库源码(各组件源码都在该目录,样式文件在 theme-chalk 中) | 30 | | src | 封装的公共方法和指令 | 31 | | test | 测试脚本 | 32 | | types | 定义组件的类型 | 33 | 34 | ### package.json 简单介绍 35 | 36 | | 命令 | 作用 | 37 | | -------- | ------------------------------------------------------------------------- | 38 | | dev | 启动组件库的本地开发环境,npm run dev,生成组件库的开发文档 | 39 | | dev:play | 启动组件测试项目,npm run dev:play,用于验证开发的组件 | 40 | | dist | 构建组件库, 生成 lib 文件,通过 npm 引入 elementUI,就是使用 lib 中的内容 | 41 | 42 | ## 如何二次开发? 43 | 44 | ### 基本流程 45 | 46 | 1、npm i 安装项目依赖 47 | 2、修改 build/webpack.demo.js 中的 host 路径,注释掉 // host: '0.0.0.0' 48 | 3、在 examples/play/index.vue 中引入组件库中的任意组件 49 | 4、执行 npm run dev:play 50 | 5、浏览器打开 http://localhost:8085 就可以进入组件测试页面 51 | 52 | ### 二次开发哪些内容? 53 | 54 | 1、自定义一套新的 UI 样式、多套主题颜色、支持一键换肤 55 | 2、自定义组件名称,将所有以 el 开头的组件,改成以 ld 开头,如按钮组件变为 ld-button 56 | 3、新增复杂表格组件、图形组件、关系图谱组件等等 57 | 4、引入自己的图标库,图标库要支持彩色图标,同时兼容 elementUI 本身的图标 58 | 5、结合公司业务,修改多个组件的交互逻辑,如级联组件、下拉框组件、tree 组件等等 59 | 6、…… 60 | 61 | ### 自定义主题颜色 62 | 63 | 1、打开**packages/theme-chalk/src/common/var.scss** 64 | 该文件定义组件库统一的色板与样式。各样式分类清晰,方便各组件统一引用,为后期的换肤打好基础。 65 | 2、修改各主题色: 66 | \$--color-primary、\$--color-success、\$--color-warning、\$--color-danger、\$--color-info 67 | 3、按照新的 UI 修改色板中的其他颜色,尽量先不要删除色板中变量,以免造成编译失败 68 | 4、非常好用[Mix()](https://www.cnblogs.com/qjuly/p/9125219.html)函数 69 | **作用:** 70 | Mix 函数是将两种颜色根据一定的比例混合在一起,生成另一种颜色。\$color-1 和 \$color-2  指的是需要合并的颜色,\$weight  为合并的比例,默认值为 50% 71 | **语法如下:** 72 | 73 | ```js 74 | mix($color-1,$color-2,$weight) 75 | @debug mix(#f00, #00f, 25%) // #4f00bf 76 | ``` 77 | 78 | 5、**elementUI 为何要使用 Mix 函数?** 79 | `通过Mix函数,可以实现定义一套样式规则,实现了UI色板规则的统一` 80 | 组件颜色有各种状态,比如 hover、focus、active 等 81 | 以 primary 主题色为例: 82 | hover 颜色:\$--color-primary-hover: mix(\$--color-white, \$--color-primary, 20%) --白色与主色混入 83 | active 颜色:\$--color-primary-active: mix(\$--color-black, \$--color-primary, 20%) --黑色与主色混入 84 | 这样 success、warning、danger、info 等主题色都可以按照这个混入规则生成对应状态的颜色**yyds** 85 | 86 | ### 自定义组件名前缀 87 | 88 | **将所有以 el 开头的组件,改成以 ld 开头** 89 | 以 button 按钮组件为例,标签名变为 ld-button 90 | 1、**打开 packages/button/src/button.vue** 91 | 将 template 模板中,将 class 所有 el 开头的替换成 ld,注意 el-icon 开头的 class 不要替换(这是 element 的图标名)。export default 中 name: 'ElButton' → name: 'LdButton' 92 | 2、**打开 packages/theme-chalk/src/button.scss** 93 | 将所有以 el 开头的 class 类名替换成 ld,同样 el-icon 开头的 class 不要替换 94 | 3、**打开 packages/theme-chalk/src/mixins/config.scss** 95 | 将\$namespace: 'el' 替换成 \$namespace: 'ld' 96 | 4、**打开 examples/play/index.vue** 97 | 引入 ld-button 组件 98 | 99 | ```js 100 | 默认按钮 101 | ``` 102 | 103 | 5、npm run dev:play,打开 http://localhost:8085 页面,即可看到新生成的 ld-button 按钮组件 104 | 105 | ## 到达第一站 106 | 107 | 到这里铁子们已初步了解 elementUI 源码架构和基本开发步骤。说不多说,开始着手打造自己的组件库吧。 108 | 下一篇将讲解  `elementUI 源码系列二:BEM实现 Sass语法 Css编码规范` ,我们继续发车 109 | 110 | ## 参考链接 111 | 112 | [如何快速为团队打造自己的组件库(上)—— Element 源码架构](https://juejin.cn/post/6935977815342841892#heading-42) 113 | [如何快速为团队打造自己的组件库(下)—— 基于 element-ui 为团队打造自己的组件库](https://juejin.cn/post/6937449598143168549) 114 | -------------------------------------------------------------------------------- /mini-vue/手写mvvm.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | vue的MVVM简单实现 6 | 7 |
8 |

姓名: {{name}}

9 |

年龄: {{age}}

10 |
11 | 94 | 95 | -------------------------------------------------------------------------------- /mini-vue/手写v-model双向绑定.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | vue双向绑定的简单实现 9 | 10 | 11 |
12 |
年龄: {{info.person.name}}
13 |

{{job}}

14 | 15 |
16 | 17 | 144 | 145 | -------------------------------------------------------------------------------- /mini-webpack/dist/main.js: -------------------------------------------------------------------------------- 1 | // 文件里是一个立即执行函数 2 | (function(modules) { 3 | function require(id) { 4 | const [fn, mapping] = modules[id]; 5 | function localRequire(name) { 6 | // ⬅️ 第四步 跳转到这里 此时mapping[name] = 1,继续执行require(1) 7 | // ⬅️ 第六步 又跳转到这里 此时mapping[name] = 2,继续执行require(2) 8 | return require(mapping[name]); 9 | } 10 | // 创建module对象 11 | const module = { exports: {} }; 12 | // ⬅️ 第二步 执行fn 13 | fn(localRequire, module, module.exports); 14 | 15 | return module.exports; 16 | } 17 | // ⬅️ 第一步 执行require(0) 18 | require(0); 19 | })({ 20 | // 立即执行函数的参数是一个对象,该对象有3个属性 21 | // 0 代表entry.js; 22 | // 1 代表message.js 23 | // 2 代表name.js 24 | 0: [ 25 | function(require, module, exports) { 26 | 'use strict'; 27 | // ⬅️ 第三步 跳转到这里 继续执行require('./message.js') 28 | var _message = require('./message.js'); 29 | // ⬅️ 第九步 跳到这里 此时_message为 {default: 'hello Webpack!'} 30 | var _message2 = _interopRequireDefault(_message); 31 | 32 | function _interopRequireDefault(obj) { 33 | return obj && obj.__esModule ? obj : { default: obj }; 34 | } 35 | 36 | var p = document.createElement('p'); 37 | // ⬅️ 最后一步 将_message2.default: 'hello Webpack!'写到p标签中 38 | p.innerHTML = _message2.default; 39 | document.body.appendChild(p); 40 | }, 41 | { './message.js': 1 } 42 | ], 43 | 1: [ 44 | function(require, module, exports) { 45 | 'use strict'; 46 | 47 | Object.defineProperty(exports, '__esModule', { 48 | value: true 49 | }); 50 | // ⬅️ 第五步 跳转到这里 继续执行require('./name.js') 51 | var _name = require('./name.js'); 52 | // ⬅️ 第八步 跳到这里 此时_name为{name: 'Webpack'}, 在exports对象上设置default属性,值为'hello Webpack!' 53 | exports.default = 'hello ' + _name.name + '!'; 54 | }, 55 | { './name.js': 2 } 56 | ], 57 | 2: [ 58 | function(require, module, exports) { 59 | 'use strict'; 60 | 61 | Object.defineProperty(exports, '__esModule', { 62 | value: true 63 | }); 64 | // ⬅️ 第七步 跳到这里 在传入的exports对象上添加name属性,值为'Webpack' 65 | var name = (exports.name = 'Webpack'); 66 | }, 67 | {} 68 | ] 69 | }); 70 | -------------------------------------------------------------------------------- /mini-webpack/example/entry.js: -------------------------------------------------------------------------------- 1 | import message from './message.js'; 2 | 3 | // 将message的内容 输出到页面中 4 | let p = document.createElement('p'); 5 | p.innerHTML = message; 6 | document.body.appendChild(p); 7 | -------------------------------------------------------------------------------- /mini-webpack/example/message.js: -------------------------------------------------------------------------------- 1 | import { name } from './name.js'; 2 | export default `hello ${name}!`; 3 | -------------------------------------------------------------------------------- /mini-webpack/example/name.js: -------------------------------------------------------------------------------- 1 | export const name = 'Webpack'; 2 | -------------------------------------------------------------------------------- /mini-webpack/fs/express.js: -------------------------------------------------------------------------------- 1 | const express = require("express") 2 | const app = express() 3 | const fs = require("fs") 4 | const babylon = require("babylon") 5 | const code = "const a = 1" 6 | const express = babylon.parse(code) 7 | var readline = require('readline'); // 逐行读取文件,保证读取的内容原样输出 8 | 9 | 10 | app.get("/express", function(req, res) { 11 | res.send(express) 12 | }) 13 | app.get("/readFileSync", function(req, res) { 14 | let content = fs.readFileSync('../example/entry.js', 'utf-8'); 15 | res.send(content) 16 | }) 17 | 18 | // 逐行读取文件 19 | app.get('/readline', function (req,res) { 20 | var fRead = fs.createReadStream('package.json'); 21 | var objReadline = readline.createInterface({ 22 | input:fRead 23 | }); 24 | var arr = new Array(); 25 | objReadline.on('line',function (line) { 26 | arr.push(`
${line}`); 27 | }); 28 | objReadline.on('close',function () { 29 | res.send(arr.toString().replace(/,,/g, ',').replace(/{,/g, '{').replace(/},/g, '}')) 30 | }); 31 | }) 32 | 33 | 34 | app.get('/rmdir', function (req,res,next) { 35 | fs.rmdir('css', err => { 36 | if (err) { 37 | console.log(err) 38 | res.send(err) 39 | } else { 40 | res.send('目录删除成功') 41 | } 42 | }) 43 | }) 44 | // fs.writeFile 写入文件 45 | app.get('/writeFile', function (req,res,next) { 46 | fs.writeFile('fs/index.js', '写入内容', err => { // 如果要写入的文件(index.js)不存在, 系统会自动创建一个index.js文件,并将内容写入文件,注意: 该函数不能连续写入,只能写入一次,不能连续写入 47 | if (err) { 48 | console.log(err) 49 | res.send(err) 50 | } else { 51 | res.send('写入成功') 52 | } 53 | }) 54 | }) 55 | // fs.writeFile 连续写入文件 56 | app.get('/appendFile', function (req,res,next) { 57 | fs.appendFile('fs/fs.js', `\n追加内容写入的内容`, err => { // 如果要写入的文件(index.js)不存在, 系统会自动创建一个index.js文件,并将内容连续写入文件 58 | if (err) { 59 | console.log(err) 60 | res.send(err) 61 | } else { 62 | res.send('追加成功') 63 | } 64 | }) 65 | }) 66 | 67 | 68 | app.listen(8088) 69 | -------------------------------------------------------------------------------- /mini-webpack/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Webpack App 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /mini-webpack/loader/async-loader.js: -------------------------------------------------------------------------------- 1 | function loader (source) { 2 | console.log("async-loader"); 3 | let cb = this.async() 4 | setTimeout(() => { 5 | console.log('ok'); 6 | // 在异步回调中手动调用 cb 返回处理结果 7 | cb(null, source); 8 | }, 3000) 9 | } 10 | 11 | module.exports = loader 12 | -------------------------------------------------------------------------------- /mini-webpack/loader/style-loader.js: -------------------------------------------------------------------------------- 1 | // 作用:将css内容,通过style标签插入到页面中 2 | // source为要处理的css源文件 3 | function loader(source) { 4 | let style = ` 5 | let style = document.createElement('style'); 6 | style.setAttribute("type", "text/css"); 7 | style.innerHTML = ${source}; 8 | document.head.appendChild(style)`; 9 | return style; 10 | } 11 | // loader上的pitch方法,非必须 12 | module.exports.pitch = function() { 13 | console.log('style-pitch'); 14 | }; 15 | 16 | module.exports = loader; 17 | -------------------------------------------------------------------------------- /mini-webpack/minipack.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | const path = require('path'); 3 | // babylon解析js语法,生产AST 语法树 4 | // ast将js代码转化为一种JSON数据结构,ast 解析 https://astexplorer.net/ , ast教程 https://segmentfault.com/a/1190000017992387 5 | const babylon = require('babylon'); 6 | // babel-traverse是一个对ast进行遍历的工具, 对ast进行替换 7 | const traverse = require('babel-traverse').default; 8 | // 将es6 es7 等高级的语法转化为es5的语法 9 | const { transformFromAst } = require('babel-core'); 10 | 11 | // 每一个js文件,对应一个id 12 | let ID = 0; 13 | 14 | // filename参数为文件路径, 读取内容并提取它的依赖关系 15 | function createAsset(filename) { 16 | const content = fs.readFileSync(filename, 'utf-8'); 17 | 18 | // 获取该文件对应的ast 抽象语法树 19 | const ast = babylon.parse(content, { 20 | sourceType: 'module' 21 | }); 22 | 23 | // 这个数组将保存这个模块依赖的模块的相对路径 24 | const dependencies = []; 25 | 26 | // 通过查找import节点,找到该文件的依赖关系 27 | // 因为项目中我们都是通过 import 引入其他文件的,找到了import节点,就找到这个文件引用了哪些文件 28 | traverse(ast, { 29 | ImportDeclaration: ({ node }) => { 30 | // 查找import节点 31 | dependencies.push(node.source.value); 32 | } 33 | }); 34 | 35 | // 通过递增简单计数器为此模块分配唯一标识符, 用于缓存已解析过的文件 36 | const id = ID++; 37 | // 该`presets`选项是一组规则,告诉`babel`如何传输我们的代码. 38 | // 用`babel-preset-env`将代码转换为浏览器可以运行的东西. 39 | const { code } = transformFromAst(ast, null, { 40 | presets: ['env'] 41 | }); 42 | 43 | // 返回有关此模块的信息 44 | return { 45 | id, // 文件id 46 | filename, // 文件路径 47 | dependencies, // 文件的依赖关系 48 | code // 文件的代码 49 | }; 50 | } 51 | 52 | // 我们将提取它的每一个依赖关系的依赖关系. 循环下去,找到对应这个项目的`依赖图`. 53 | function createGraph(entry) { 54 | // 得到入口文件的依赖关系 55 | const mainAsset = createAsset(entry); 56 | const queue = [mainAsset]; 57 | for (const asset of queue) { 58 | asset.mapping = {}; 59 | // 获取这个模块所在的目录 60 | const dirname = path.dirname(asset.filename); 61 | asset.dependencies.forEach((relativePath) => { 62 | // 通过将相对路径与父资源目录的路径连接,将相对路径转变为绝对路径 63 | // 每个文件的绝对路径是固定、唯一的 64 | const absolutePath = path.join(dirname, relativePath); 65 | // 递归解析,其中所引入的其他资源 66 | const child = createAsset(absolutePath); 67 | asset.mapping[relativePath] = child.id; 68 | // 将`child`推入队列, 通过递归实现了这样它的依赖关系解析 69 | queue.push(child); 70 | }); 71 | } 72 | 73 | // queue这就是最终的依赖关系图谱 74 | return queue; 75 | } 76 | 77 | // 自定义实现了require 方法,找到导出变量的引用逻辑 78 | function bundle(graph) { 79 | let modules = ''; 80 | graph.forEach((mod) => { 81 | modules += `${mod.id}: [ 82 | function (require, module, exports) { ${mod.code} }, 83 | ${JSON.stringify(mod.mapping)}, 84 | ],`; 85 | }); 86 | const result = ` 87 | (function(modules) { 88 | function require(id) { 89 | const [fn, mapping] = modules[id]; 90 | function localRequire(name) { 91 | return require(mapping[name]); 92 | } 93 | const module = { exports : {} }; 94 | fn(localRequire, module, module.exports); 95 | return module.exports; 96 | } 97 | require(0); 98 | })({${modules}}) 99 | `; 100 | return result; 101 | } 102 | 103 | // 项目的入口文件 104 | const graph = createGraph('./example/entry.js'); 105 | const result = bundle(graph); 106 | 107 | // 创建dist目录,将打包的内容写入main.js中 108 | fs.mkdir('dist', (err) => { 109 | if (!err) 110 | fs.writeFile('dist/main.js', result, (err1) => { 111 | if (!err1) console.log('打包成功'); 112 | }); 113 | }); 114 | -------------------------------------------------------------------------------- /mini-webpack/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "minipack-explain", 3 | "version": "1.0.0", 4 | "description": "", 5 | "author": "webpack", 6 | "license": "MIT", 7 | "private": true, 8 | "scripts": { 9 | "pre": "npx webpack -pre", 10 | "prd": "npx webpack -prd", 11 | "debug": "node --inspect --inspect-brk node_modules/webpack/bin/webpack.js" 12 | }, 13 | "dependencies": { 14 | "babel-core": "^6.26.0", 15 | "babel-preset-env": "^1.6.1", 16 | "babel-preset-es2015": "^6.24.1", 17 | "babel-traverse": "^6.26.0", 18 | "babylon": "^6.18.0", 19 | "express": "^4.17.1", 20 | "node": "^14.4.0", 21 | "webpack": "^4.43.0", 22 | "webpack-cli": "^3.3.12" 23 | }, 24 | "devDependencies": { 25 | "html-webpack-plugin": "^4.3.0", 26 | "prettier": "^1.10.2", 27 | "webpack-cli": "^3.3.12" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /mini-webpack/plugins/FileListPlugin.js: -------------------------------------------------------------------------------- 1 | function FileListPlugin(options) {} 2 | 3 | FileListPlugin.prototype.apply = function(compiler) { 4 | compiler.hooks.emit.tapAsync('FileListPlugin', function(compilation, callback) { 5 | // 在生成文件中,创建一个头部字符串: 6 | var filelist = 'In this build:\n\n'; 7 | 8 | // 遍历所有编译过的资源文件, 9 | // 对于每个文件名称,都添加一行内容。 10 | for (var filename in compilation.assets) { 11 | filelist += ('- '+ filename +'\n'); 12 | } 13 | 14 | // 将这个列表作为一个新的文件资源,插入到 webpack 构建中: 15 | compilation.assets['filelist.md'] = { 16 | source: function() { 17 | return filelist; 18 | }, 19 | size: function() { 20 | return filelist.length; 21 | } 22 | }; 23 | 24 | callback(); 25 | }); 26 | }; 27 | 28 | module.exports = FileListPlugin; 29 | -------------------------------------------------------------------------------- /mini-webpack/plugins/MyPlugin.js: -------------------------------------------------------------------------------- 1 | // 自定义一个名为MyPlugin插件,该插件在打包完成后,在控制台输出"打包已完成" 2 | class MyPlugin { 3 | // 原型上需要定义apply 的方法 4 | apply(compiler) { 5 | // 通过compiler获取webpack内部的钩子 6 | compiler.hooks.done.tap('My Plugin', (compilation, cb) => { 7 | console.log('打包已完成'); 8 | // 分为同步和异步的钩子,异步钩子必须执行对应的回调 9 | cb(); 10 | }); 11 | } 12 | } 13 | module.exports = MyPlugin; 14 | -------------------------------------------------------------------------------- /mini-webpack/plugins/qiniu-webpack-plugin.js: -------------------------------------------------------------------------------- 1 | const qiniu = require('qiniu') 2 | const path = require('path') 3 | 4 | /** 5 | * 本地打包静态资源上传到七牛云空间 6 | * accessKey 7 | * secretKey 8 | * bucket 七牛云空间名称 9 | * keyPrefix 文件上传路径 10 | */ 11 | class QiniuWebpackPlugin { 12 | constructor (options) { 13 | this.options = options || {} 14 | this.checkQiniuConfig() 15 | // 上传凭证之前,我们需要定义好其中鉴权对象mac: 16 | const { accessKey, secretKey } = this.options.qiniu 17 | this.mac = new qiniu.auth.digest.Mac(accessKey, secretKey) 18 | } 19 | 20 | // 检测七牛云配置 21 | checkQiniuConfig () { 22 | const { QINIU_ACCESS_KEY, QINIU_SECRET_KEY, QINIU_BUCKET, QINIU_KEY_PREFIX } = process.env 23 | if (!this.options.qiniu) { 24 | this.options.qiniu = { 25 | accessKey: QINIU_ACCESS_KEY, 26 | secretKey: QINIU_SECRET_KEY, 27 | bucket: QINIU_BUCKET, 28 | keyPrefix: QINIU_KEY_PREFIX || '' 29 | } 30 | } 31 | const { qiniu } = this.options 32 | if (!qiniu.accessKey || !qiniu.secretKey || !qiniu.bucket) { 33 | throw new Error('七牛云 Config Invalid!') 34 | } 35 | } 36 | 37 | apply (compiler) { 38 | compiler.hooks.afterEmit.tapPromise('QiniuWebpackPlugin', (compilation) => { 39 | // console.log(Object.keys(compilation.assets)) 40 | return new Promise((resolve, reject) => { 41 | // 编译后资源文件 42 | const assets = Object.keys(compilation.assets) 43 | 44 | // 本地路径 45 | const localFile = compilation.outputOptions.path 46 | 47 | // 要上传文件数量 48 | const nUploadCount = assets.length 49 | const { bucket, keyPrefix } = this.options.qiniu 50 | let currentUploadedCount = 0 51 | 52 | // 最简单的上传凭证只需要AccessKey,SecretKey和Bucket就可以 53 | // 自定义凭证有效期(示例2小时,expires单位为秒,为上传凭证的有效时间) 54 | const putPolicy = new qiniu.rs.PutPolicy({ scope: bucket, expires: 7200 }) 55 | const uploadToken = putPolicy.uploadToken(this.mac) 56 | 57 | // 空间对应的机房 华东:qiniu.zone.Zone_z0|华北:qiniu.zone.Zone_z1|华南:qiniu.zone.Zone_z2|北美:qiniu.zone.Zone_na0 58 | const config = new qiniu.conf.Config() 59 | config.zone = qiniu.zone.Zone_z2 60 | // 文件上传(表单方式) 最简单的就是上传本地文件,直接指定文件的完整路径即可上传 61 | const formUploader = new qiniu.form_up.FormUploader() 62 | // 文件上传的路径 63 | const putExtra = new qiniu.form_up.PutExtra() 64 | 65 | // 全局是否有上传失败标识 66 | let uploadError = null 67 | 68 | // 遍历编译资源文件 69 | for (const filename of assets) { 70 | const localPath = path.resolve(localFile, filename) 71 | // Form 表单文件上传 72 | formUploader.putFile( 73 | uploadToken, 74 | keyPrefix + filename, 75 | localPath, 76 | putExtra, 77 | (err) => { 78 | // console.log(`uploade ${filename} result: ${err ? `Error:${err.message}` : 'Success'}`) 79 | currentUploadedCount++ 80 | if (err) { 81 | uploadError = err 82 | } 83 | 84 | if (currentUploadedCount === nUploadCount) { 85 | uploadError ? reject(uploadError) : resolve() 86 | } 87 | } 88 | ) 89 | } 90 | }) 91 | }) 92 | } 93 | } 94 | 95 | module.exports = QiniuWebpackPlugin 96 | -------------------------------------------------------------------------------- /my-app/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | 6 | # local env files 7 | .env.local 8 | .env.*.local 9 | 10 | # Log files 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | pnpm-debug.log* 15 | 16 | # Editor directories and files 17 | .idea 18 | .vscode 19 | *.suo 20 | *.ntvs* 21 | *.njsproj 22 | *.sln 23 | *.sw? 24 | -------------------------------------------------------------------------------- /my-app/README.md: -------------------------------------------------------------------------------- 1 | # 测试 babel-plugin-await-add-trycatch 插件的 demo 2 | 3 | # 测试代码有两处 4 | 5 | 1. main.js 对应的方法为 fn 6 | 2. App.vue 对应的方法为 func 7 | -------------------------------------------------------------------------------- /my-app/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['@vue/cli-plugin-babel/preset'], 3 | plugins: [ 4 | [ 5 | require('babel-plugin-await-add-trycatch'), 6 | { 7 | exclude: [], 8 | include: [], 9 | customLog: 'Error' 10 | } 11 | ] 12 | ] 13 | }; 14 | -------------------------------------------------------------------------------- /my-app/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "module": "esnext", 5 | "baseUrl": "./", 6 | "moduleResolution": "node", 7 | "paths": { 8 | "@/*": [ 9 | "src/*" 10 | ] 11 | }, 12 | "lib": [ 13 | "esnext", 14 | "dom", 15 | "dom.iterable", 16 | "scripthost" 17 | ] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /my-app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue2", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build", 8 | "lint": "vue-cli-service lint" 9 | }, 10 | "dependencies": { 11 | "ant-design-vue": "^1.7.8", 12 | "babel-await-add-catch": "0.0.1", 13 | "core-js": "^3.8.3", 14 | "deepmerge": "^4.2.2", 15 | "vue": "^2.6.14" 16 | }, 17 | "devDependencies": { 18 | "@babel/core": "^7.12.16", 19 | "@babel/eslint-parser": "^7.12.16", 20 | "@vue/cli-plugin-babel": "~5.0.0", 21 | "@vue/cli-plugin-eslint": "~5.0.0", 22 | "@vue/cli-service": "~5.0.0", 23 | "babel-plugin-await-add-trycatch": "^1.0.1", 24 | "babel-template": "^6.26.0", 25 | "eslint": "^7.32.0", 26 | "eslint-plugin-vue": "^8.0.3", 27 | "vue-template-compiler": "^2.6.14" 28 | }, 29 | "eslintConfig": { 30 | "root": true, 31 | "env": { 32 | "node": true 33 | }, 34 | "extends": [ 35 | "plugin:vue/essential", 36 | "eslint:recommended" 37 | ], 38 | "parserOptions": { 39 | "parser": "@babel/eslint-parser" 40 | }, 41 | "rules": {} 42 | }, 43 | "browserslist": [ 44 | "> 1%", 45 | "last 2 versions", 46 | "not dead" 47 | ] 48 | } 49 | -------------------------------------------------------------------------------- /my-app/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/my-app/public/favicon.ico -------------------------------------------------------------------------------- /my-app/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | <%= htmlWebpackPlugin.options.title %> 11 | 12 | 13 | 14 | 15 | 19 |
20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /my-app/src/App.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 34 | 35 | 45 | -------------------------------------------------------------------------------- /my-app/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/my-app/src/assets/logo.png -------------------------------------------------------------------------------- /my-app/src/components/HelloWorld.vue: -------------------------------------------------------------------------------- 1 | 32 | 33 | 41 | 42 | 43 | 59 | -------------------------------------------------------------------------------- /my-app/src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import App from './App.vue'; 3 | 4 | Vue.config.productionTip = false; 5 | import Antd from 'ant-design-vue'; 6 | import 'ant-design-vue/dist/antd.css'; 7 | 8 | Vue.use(Antd); 9 | new Vue({ 10 | render: (h) => h(App) 11 | }).$mount('#app'); 12 | 13 | async function fn() { 14 | await new Promise((resolve, reject) => reject('报错111')); 15 | await new Promise((resolve) => resolve(1)); 16 | console.log('do something...'); 17 | } 18 | fn(); 19 | -------------------------------------------------------------------------------- /my-app/vue.config.js: -------------------------------------------------------------------------------- 1 | const { defineConfig } = require('@vue/cli-service'); 2 | module.exports = defineConfig({ 3 | transpileDependencies: true, 4 | productionSourceMap: false, 5 | chainWebpack(config) { 6 | config.optimization.minimize(false); 7 | } 8 | }); 9 | -------------------------------------------------------------------------------- /my-build-cli/README.md: -------------------------------------------------------------------------------- 1 | ## my-2022-cli 2 | 3 | 一个 mini 版的自定义脚手架 4 | 5 | ### 安装 6 | 7 | npm install my-2022-cli -g 8 | 9 | ### 使用说明 10 | 11 | 1)通过 my-2022-cli create appName 创建项目 12 | 13 | 2)author? 输入项目作者 14 | 15 | 3)description? 输入项目描述 16 | 17 | 4)选择项目模块 appDemo or pcDemo 18 | 19 | 5)安装选择的模板 20 | 21 | ### 演示示例 22 | 23 | ![Image text](https://wx1.sinaimg.cn/mw2000/927e36bfgy1h69k6ee9z1g20rs0jfwit.gif) 24 | -------------------------------------------------------------------------------- /my-build-cli/bin/ask.js: -------------------------------------------------------------------------------- 1 | // 配置ask 选项 2 | // 输入 作者 和 项目描述 3 | module.exports = [ 4 | { 5 | type: 'input', 6 | name: 'author', 7 | message: 'author?' 8 | }, 9 | { 10 | type: 'input', 11 | name: 'description', 12 | message: 'description?' 13 | } 14 | ]; 15 | -------------------------------------------------------------------------------- /my-build-cli/bin/create.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const fs = require('fs-extra'); 3 | const inquirer = require('inquirer'); 4 | const Generator = require('./generator'); 5 | 6 | module.exports = async function (name, options) { 7 | // process.cwd获取当前的工作目录 8 | const cwd = process.cwd(); 9 | // path.join拼接 要创建项目的目录 10 | const targetAir = path.join(cwd, name); 11 | 12 | // 如果该目录已存在 13 | if (fs.existsSync(targetAir)) { 14 | // 强制删除 15 | if (options.force) { 16 | await fs.remove(targetAir); 17 | } else { 18 | // 通过inquirer:询问用户是否确定要覆盖 or 取消 19 | let { action } = await inquirer.prompt([ 20 | { 21 | name: 'action', 22 | type: 'list', 23 | message: 'Target already exists', 24 | choices: [ 25 | { 26 | name: 'overwrite', 27 | value: 'overwrite' 28 | }, 29 | { 30 | name: 'cancel', 31 | value: false 32 | } 33 | ] 34 | } 35 | ]); 36 | if (!action) { 37 | return; 38 | } else { 39 | // 删除文件夹 40 | await fs.remove(targetAir); 41 | } 42 | } 43 | } 44 | 45 | const args = require('./ask'); 46 | 47 | // 通过inquirer,让用户的输入的项目内容:作者和描述 48 | const ask = await inquirer.prompt(args); 49 | // 创建项目 50 | const generator = new Generator(name, targetAir, ask); 51 | generator.create(); 52 | }; 53 | -------------------------------------------------------------------------------- /my-build-cli/bin/generator.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const fs = require('fs-extra'); 3 | // 引入ora工具:命令行loading 动效 4 | const ora = require('ora'); 5 | const inquirer = require('inquirer'); 6 | // 引入download-git-repo工具 7 | const downloadGitRepo = require('download-git-repo'); 8 | // download-git-repo 默认不支持异步调用,需要使用util插件的util.promisify 进行转换 9 | const util = require('util'); 10 | // 获取git项目列表 11 | const { getRepolist } = require('./http'); 12 | 13 | async function wrapLoading(fn, message, ...args) { 14 | const spinner = ora(message); 15 | // 下载开始 16 | spinner.start(); 17 | 18 | try { 19 | const result = await fn(...args); 20 | // 下载成功 21 | spinner.succeed(); 22 | return result; 23 | } catch (e) { 24 | // 下载失败 25 | spinner.fail('Request failed ……'); 26 | } 27 | } 28 | 29 | // 创建项目类 30 | class Generator { 31 | // name 项目名称 32 | // target 创建项目的路径 33 | // 用户输入的 作者和项目描述 信息 34 | constructor(name, target, ask) { 35 | this.name = name; 36 | this.target = target; 37 | this.ask = ask; 38 | // download-git-repo 默认不支持异步调用,需要使用util插件的util.promisify 进行转换 39 | this.downloadGitRepo = util.promisify(downloadGitRepo); 40 | } 41 | async getRepo() { 42 | // 获取git仓库的项目列表 43 | const repolist = await wrapLoading(getRepolist, 'waiting fetch template'); 44 | if (!repolist) return; 45 | 46 | const repos = repolist.map((item) => item.name); 47 | 48 | // 通过inquirer 让用户选择要下载的项目模板 49 | const { repo } = await inquirer.prompt({ 50 | name: 'repo', 51 | type: 'list', 52 | choices: repos, 53 | message: 'Please choose a template' 54 | }); 55 | 56 | return repo; 57 | } 58 | 59 | // 下载用户选择的项目模板 60 | async download(repo, tag) { 61 | const requestUrl = `yuan-cli/${repo}`; 62 | await wrapLoading(this.downloadGitRepo, 'waiting download template', requestUrl, path.resolve(process.cwd(), this.target)); 63 | } 64 | 65 | // 文件入口,在create.js中 执行generator.create(); 66 | async create() { 67 | const repo = await this.getRepo(); 68 | console.log('用户选择了', repo); 69 | 70 | // 下载用户选择的项目模板 71 | await this.download(repo); 72 | 73 | // 下载完成后,获取项目里的package.json 74 | // 将用户创建项目的填写的信息(项目名称、作者名字、描述),写入到package.json中 75 | let targetPath = path.resolve(process.cwd(), this.target); 76 | 77 | let jsonPath = path.join(targetPath, 'package.json'); 78 | 79 | if (fs.existsSync(jsonPath)) { 80 | // 读取已下载模板中package.json的内容 81 | const data = fs.readFileSync(jsonPath).toString(); 82 | let json = JSON.parse(data); 83 | json.name = this.name; 84 | // 让用户输入的内容 替换到 package.json中对应的字段 85 | Object.keys(this.ask).forEach((item) => { 86 | json[item] = this.ask[item]; 87 | }); 88 | 89 | //修改项目文件夹中 package.json 文件 90 | fs.writeFileSync(jsonPath, JSON.stringify(json, null, '\t'), 'utf-8'); 91 | } 92 | } 93 | } 94 | 95 | module.exports = Generator; 96 | -------------------------------------------------------------------------------- /my-build-cli/bin/http.js: -------------------------------------------------------------------------------- 1 | const axios = require('axios'); 2 | 3 | axios.interceptors.response.use((res) => { 4 | return res.data; 5 | }); 6 | 7 | // 获取git上的项目列表 8 | async function getRepolist() { 9 | return axios.get('https://api.github.com/orgs/yuan-cli/repos'); 10 | } 11 | 12 | module.exports = { 13 | getRepolist 14 | }; 15 | -------------------------------------------------------------------------------- /my-build-cli/bin/www.js: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env node 2 | 3 | const program = require('commander'); 4 | 5 | program 6 | // 创建create 命令,用户可以通过 my-cli creat appName 创建项目 7 | .command('create ') 8 | // 命名的描述 9 | .description('create a new project') 10 | // create命令的选项 11 | .option('-f, --force', 'overwrite target if it exist') 12 | .action((name, options) => { 13 | // 执行'./create.js',传入项目名称和 用户选项 14 | require('./create')(name, options); 15 | }); 16 | 17 | program.parse(); 18 | -------------------------------------------------------------------------------- /my-build-cli/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "my-build-cli", 3 | "version": "1.0.0", 4 | "lockfileVersion": 1 5 | } 6 | -------------------------------------------------------------------------------- /my-build-cli/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "my-2022-cli", 3 | "version": "1.1.0", 4 | "description": "一个mini版的脚手架", 5 | "main": "./bin/www.js", 6 | "bin": "./bin/www.js", 7 | "scripts": { 8 | "test": "echo \"Error: no test specified\" && exit 1" 9 | }, 10 | "files": [ 11 | "bin" 12 | ], 13 | "keywords": [ 14 | "my-yuan-cli", 15 | "自定义脚手架" 16 | ], 17 | "author": "海阔天空", 18 | "license": "ISC", 19 | "dependencies": { 20 | "axios": "^0.24.0", 21 | "commander": "^8.3.0", 22 | "download-git-repo": "^3.0.2", 23 | "fs-extra": "^10.0.0", 24 | "inquirer": "^8.2.0", 25 | "ora": "^5.4.1", 26 | "util": "^0.12.4" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /performance-demo/.browserslistrc: -------------------------------------------------------------------------------- 1 | > 1% 2 | last 2 versions 3 | not dead 4 | -------------------------------------------------------------------------------- /performance-demo/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { 4 | node: true 5 | }, 6 | 'extends': [ 7 | 'plugin:vue/essential', 8 | 'eslint:recommended' 9 | ], 10 | parserOptions: { 11 | parser: '@babel/eslint-parser' 12 | }, 13 | rules: { 14 | 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 15 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off' 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /performance-demo/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | 6 | # local env files 7 | .env.local 8 | .env.*.local 9 | 10 | # Log files 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | pnpm-debug.log* 15 | 16 | # Editor directories and files 17 | .idea 18 | .vscode 19 | *.suo 20 | *.ntvs* 21 | *.njsproj 22 | *.sln 23 | *.sw? 24 | -------------------------------------------------------------------------------- /performance-demo/README.md: -------------------------------------------------------------------------------- 1 | 列举一些 `常规且有效` 的性能优化建议 2 | 3 | 1、main 分支是优化后的项目 4 | 5 | 2、test 分支为原始项目 6 | -------------------------------------------------------------------------------- /performance-demo/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | // presets: ['@vue/cli-plugin-babel/preset'], 3 | presets: ['@vue/app'], 4 | plugins: [ 5 | [ 6 | 'component', 7 | { 8 | libraryName: 'element-ui', 9 | styleLibraryName: 'theme-chalk' 10 | } 11 | ] 12 | ] 13 | }; 14 | -------------------------------------------------------------------------------- /performance-demo/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "performance-demo", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build --report", 8 | "lint": "vue-cli-service lint" 9 | }, 10 | "dependencies": { 11 | "axios": "^1.2.2", 12 | "core-js": "^3.8.3", 13 | "echarts": "^5.4.1", 14 | "element-ui": "^2.15.12", 15 | "moment": "^2.29.4", 16 | "vue": "^2.6.14", 17 | "vue-lazyload": "^1.3.4", 18 | "vue-router": "^3.5.1", 19 | "vuex": "^3.6.2" 20 | }, 21 | "devDependencies": { 22 | "@babel/core": "^7.12.16", 23 | "@babel/eslint-parser": "^7.12.16", 24 | "@vue/cli-plugin-babel": "~5.0.0", 25 | "@vue/cli-plugin-eslint": "~5.0.0", 26 | "@vue/cli-plugin-router": "~5.0.0", 27 | "@vue/cli-plugin-vuex": "~5.0.0", 28 | "@vue/cli-service": "~5.0.0", 29 | "babel-plugin-component": "^1.1.1", 30 | "compression-webpack-plugin": "^10.0.0", 31 | "eslint": "^7.32.0", 32 | "eslint-plugin-vue": "^8.0.3", 33 | "happypack": "^5.0.1", 34 | "less": "^4.0.0", 35 | "less-loader": "^8.0.0", 36 | "moment-locales-webpack-plugin": "^1.2.0", 37 | "vue-template-compiler": "^2.6.14" 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /performance-demo/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/performance-demo/public/favicon.ico -------------------------------------------------------------------------------- /performance-demo/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | <%= htmlWebpackPlugin.options.title %> 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /performance-demo/src/App.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 33 | -------------------------------------------------------------------------------- /performance-demo/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/performance-demo/src/assets/logo.png -------------------------------------------------------------------------------- /performance-demo/src/components/dialogInfo.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 45 | 50 | -------------------------------------------------------------------------------- /performance-demo/src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import App from './App.vue'; 3 | import router from './router'; 4 | import store from './store'; 5 | import { Table, TableColumn, Form, FormItem, Input, Select, Option, TimePicker, Switch, Checkbox, CheckboxGroup, Radio, RadioGroup, Button, Dialog } from 'element-ui'; 6 | import moment from 'moment'; 7 | import * as echarts from 'echarts'; 8 | import VueLazyLoad from 'vue-lazyload'; 9 | 10 | Vue.use(VueLazyLoad, { 11 | preLoad: 1, 12 | attempt: 2 13 | }); 14 | Vue.prototype.$moment = moment; 15 | Vue.prototype.$echarts = echarts; 16 | Vue.config.productionTip = false; 17 | 18 | Vue.use(Dialog); 19 | Vue.use(Table); 20 | Vue.use(TableColumn); 21 | Vue.use(Form); 22 | Vue.use(FormItem); 23 | Vue.use(Input); 24 | Vue.use(Select); 25 | Vue.use(TimePicker); 26 | Vue.use(Option); 27 | Vue.use(Switch); 28 | Vue.use(Checkbox); 29 | Vue.use(Radio); 30 | Vue.use(RadioGroup); 31 | Vue.use(Button); 32 | Vue.use(CheckboxGroup); 33 | 34 | new Vue({ 35 | router, 36 | store, 37 | render: (h) => h(App) 38 | }).$mount('#app'); 39 | -------------------------------------------------------------------------------- /performance-demo/src/router/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import VueRouter from 'vue-router'; 3 | // import HomeView from '../views/HomeView.vue'; 4 | // import AboutView from '../views/AboutView.vue'; 5 | 6 | Vue.use(VueRouter); 7 | 8 | const routes = [ 9 | { 10 | path: '/', 11 | name: 'home', 12 | component: () => import(/* webpackChunkName: "home" */ '../views/HomeView.vue') 13 | // component: HomeView 14 | }, 15 | { 16 | path: '/about', 17 | name: 'about', 18 | component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue') 19 | // component: AboutView 20 | } 21 | ]; 22 | 23 | const router = new VueRouter({ 24 | routes 25 | }); 26 | 27 | export default router; 28 | -------------------------------------------------------------------------------- /performance-demo/src/store/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Vuex from 'vuex' 3 | 4 | Vue.use(Vuex) 5 | 6 | export default new Vuex.Store({ 7 | state: { 8 | }, 9 | getters: { 10 | }, 11 | mutations: { 12 | }, 13 | actions: { 14 | }, 15 | modules: { 16 | } 17 | }) 18 | -------------------------------------------------------------------------------- /performance-demo/src/util/axiosWrap.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | 3 | const Axios = axios.create(); 4 | Axios.defaults.timeout = 8000; 5 | Axios.defaults.withCredentials = true; 6 | Axios.defaults.dataType = 'JSON'; 7 | 8 | // 请求拦截器 9 | Axios.interceptors.request.use( 10 | (config) => { 11 | return config; 12 | }, 13 | (error) => { 14 | return Promise.reject(error); 15 | } 16 | ); 17 | 18 | // 响应拦截器 19 | Axios.interceptors.response.use( 20 | (response) => { 21 | if (response.status === 200) { 22 | return Promise.resolve(response); 23 | } else { 24 | return Promise.reject(response); 25 | } 26 | }, 27 | (error) => { 28 | if (error.response.status) { 29 | switch (error.response.status) { 30 | case 404: 31 | console.log('网络请求不存在'); 32 | break; 33 | case 500: 34 | console.log('网络接口失败'); 35 | break; 36 | // 其他错误,直接抛出错误提示 37 | default: 38 | } 39 | return Promise.reject(error.response); 40 | } 41 | return Promise.reject(error.response); 42 | } 43 | ); 44 | 45 | export default Axios; 46 | -------------------------------------------------------------------------------- /performance-demo/src/util/index.js: -------------------------------------------------------------------------------- 1 | export function targetType(target) { 2 | return Object.prototype.toString.call(target).slice(8, -1).toLowerCase(); 3 | } 4 | export function deepClone(target) { 5 | return JSON.parse(JSON.stringify(target)); 6 | } 7 | 8 | export function listToTree(data) { 9 | // 使用对象重新存储数据, 空间换时间 10 | let map = {}; 11 | // treeData存储最后结果 12 | let treeData = []; 13 | // 遍历原始数据data,存到map中,id为key,值为数据 14 | for (let i = 0; i < data.length; i++) { 15 | map[data[i].id] = data[i]; 16 | } 17 | // 遍历对象 18 | for (let i in map) { 19 | // 根据 parentId 找到的是父节点 20 | if (map[i].parentId) { 21 | if (!map[map[i].parentId].children) { 22 | map[map[i].parentId].children = []; 23 | } 24 | // 将子节点放到父节点的 children中 25 | map[map[i].parentId].children.push(map[i]); 26 | } else { 27 | // parentId 找不到对应值,说明是根结点,直接插到根数组中 28 | treeData.push(map[i]); 29 | } 30 | } 31 | return treeData; 32 | } 33 | 34 | export function formatMenuTree({ data, pkey, ckey = 'id', lKey = 'label', pnKey }) { 35 | data = data.map((item) => { 36 | item.label = item[lKey]; 37 | return item; 38 | }); 39 | let tree = data.filter((item) => { 40 | const childArr = data.filter((sub) => { 41 | if (sub[pkey] === item[ckey]) { 42 | sub.hasParent = true; 43 | sub.rootId = item.rootId || item.id; 44 | if (pnKey) { 45 | // 传递第一级的参数到子级 46 | sub[pnKey.format] = item[pnKey.format] || item[pnKey.initial]; 47 | } 48 | } 49 | return sub[pkey] === item[ckey]; 50 | }); 51 | if (childArr.length > 0) item.children = childArr; 52 | return !item.hasParent; 53 | }); 54 | tree = tree.filter((item) => !item.hasParent); 55 | return tree; 56 | } 57 | -------------------------------------------------------------------------------- /performance-demo/src/util/list.js: -------------------------------------------------------------------------------- 1 | export let tree = [ 2 | { id: 1, title: 'child1', parentId: 0 }, 3 | { id: 2, title: 'child2', parentId: 0 }, 4 | { id: 3, title: 'child1_1', parentId: 1 }, 5 | { id: 4, title: 'child1_2', parentId: 1 }, 6 | { id: 5, title: 'child2_1', parentId: 2 } 7 | ]; 8 | -------------------------------------------------------------------------------- /performance-demo/src/views/AboutView.vue: -------------------------------------------------------------------------------- 1 | 14 | 74 | 83 | -------------------------------------------------------------------------------- /performance-demo/src/views/HomeView.vue: -------------------------------------------------------------------------------- 1 | 48 | 49 | 124 | 133 | -------------------------------------------------------------------------------- /performance-demo/vue.config.js: -------------------------------------------------------------------------------- 1 | const MomentLocalesPlugin = require('moment-locales-webpack-plugin'); 2 | // const CompressionPlugin = require('compression-webpack-plugin'); 3 | const HappyPack = require('happypack'); 4 | const os = require('os'); 5 | // 开辟一个线程池,拿到系统CPU的核数,happypack 将编译工作利用所有线程 6 | const happyThreadPool = HappyPack.ThreadPool({ size: os.cpus().length }); 7 | 8 | module.exports = { 9 | transpileDependencies: true, 10 | productionSourceMap: false, 11 | devServer: { 12 | proxy: { 13 | '/logstorage': { 14 | target: 'ttp://10.106.0.138:8083', 15 | changeOrigin: true, // target是域名的话,需要这个参数, 16 | secure: false // 设置支持https协议的代理, 17 | } 18 | } 19 | }, 20 | configureWebpack: { 21 | externals: { 22 | vue: 'Vue', 23 | 'vue-router': 'VueRouter', 24 | axios: 'axios', 25 | echarts: 'echarts' 26 | }, 27 | plugins: [ 28 | new MomentLocalesPlugin({ 29 | localesToKeep: ['zh-cn'] 30 | }), 31 | // new CompressionPlugin({ 32 | // test: /\.(js|css)(\?.*)?$/i, //需要压缩的文件正则 33 | // threshold: 1024, //文件大小大于这个值时启用压缩 34 | // deleteOriginalAssets: false //压缩后保留原文件 35 | // }), 36 | new HappyPack({ 37 | id: 'happybabel', 38 | loaders: ['babel-loader'], 39 | threadPool: happyThreadPool 40 | }) 41 | ] 42 | } 43 | }; 44 | -------------------------------------------------------------------------------- /pnpm-monorepo-changesets/.changeset/README.md: -------------------------------------------------------------------------------- 1 | # Changesets 2 | 3 | Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works 4 | with multi-package repos, or single-package repos to help you version and publish your code. You can 5 | find the full documentation for it [in our repository](https://github.com/changesets/changesets) 6 | 7 | We have a quick list of common questions to get you started engaging with this project in 8 | [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) 9 | -------------------------------------------------------------------------------- /pnpm-monorepo-changesets/.changeset/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json", 3 | "changelog": "@changesets/cli/changelog", 4 | "commit": false, 5 | "fixed": [], 6 | "linked": [], 7 | "access": "public", 8 | "baseBranch": "main", 9 | "updateInternalDependencies": "patch", 10 | "ignore": [] 11 | } 12 | -------------------------------------------------------------------------------- /pnpm-monorepo-changesets/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | vue.config 4 | /dist 5 | /testtemplate.txt 6 | .jsbeautifyrc 7 | # local env files 8 | .env.local 9 | .env.*.local 10 | 11 | # Log files 12 | npm-debug.log* 13 | yarn-debug.log* 14 | yarn-error.log* 15 | pnpm-debug.log* 16 | 17 | # Editor directories and files 18 | .idea 19 | .vscode 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | ZJS-FT.zip 26 | /node_modules/ 27 | -------------------------------------------------------------------------------- /pnpm-monorepo-changesets/README.md: -------------------------------------------------------------------------------- 1 | ## 安装 2 | 3 | ```javascript 4 | $ pnpm install 5 | ``` 6 | 7 | ## 打包 8 | 9 | ```javascript 10 | $ pnpm run build 11 | ``` 12 | 13 | ## 发布 14 | 15 | 例如:npm 包版本 1.0.0 更新为 1.1.0 16 | 17 | 这里 `@websee/pk1` 和 `@websee/pk2` 的初始版本都为 1.0.0 18 | 19 | ### 执行 `pnpm run changeset` 20 | 21 | 1、选择要发布的包 22 | 23 | ![image.png](https://p1-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/27ace4eb44264250bf2eb4752aca2b10~tplv-k3u1fbpfcp-watermark.image?) 24 | 25 | 2、选择发布 minor,选择对应的包 26 | 27 | 现在是 1.0.0 更新为 1.1.0,这里选择 minor 28 | 29 | ![image.png](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/947ad3a8e6c448c8949ac86b6a9f3227~tplv-k3u1fbpfcp-watermark.image?) 30 | 31 | 3、填写 changelog 32 | 33 | ![image.png](https://p9-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/ef2b864916ec403c8612395097ea9e88~tplv-k3u1fbpfcp-watermark.image?) 34 | 35 | 4、Is this your desired changeset 选择 true 36 | 37 | ![image.png](https://p1-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/b321231e6b094b08ac545a2257562a97~tplv-k3u1fbpfcp-watermark.image?) 38 | 39 | ### 执行 `pnpm run packages-version` 40 | 41 | ![image.png](https://p9-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/58687e0b549e454f83b42840ed609d72~tplv-k3u1fbpfcp-watermark.image?) 42 | 43 | 提示 `All files have been updated` 44 | 45 | 打开 pk1 和 pk2 下的 package.json,发现版本号已修改完成 46 | 47 | 同时各目录下会自动生成 `CHANGELOG.md` 文件,记录版本号的变化 48 | 49 | ```js 50 | # @websee/pk1 51 | 52 | ## 1.1.0 53 | 54 | ### Minor Changes 55 | 56 | - 1.1.0 57 | 58 | ``` 59 | 60 | ### 执行 `pnpm run publish` 61 | 62 | 发布 1.1.0 版本 63 | 64 | ![image.png](https://p6-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/5ba1b5f4917e49de82a0d190f069ca28~tplv-k3u1fbpfcp-watermark.image?) 65 | 66 | 在 npm 官网上搜索 `@websee/pk1`,证明发布成功 67 | 68 | ![image.png](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/b46daf438ef343e1be9e1ab18d8e359f~tplv-k3u1fbpfcp-watermark.image?) 69 | -------------------------------------------------------------------------------- /pnpm-monorepo-changesets/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "monorepo", 3 | "private": true, 4 | "scripts": { 5 | "build": "rollup -c", 6 | "changeset": "changeset", 7 | "packages-version": "changeset version", 8 | "release": "pnpm build && pnpm publish", 9 | "publish": "changeset publish --registry=https://registry.npmjs.com/" 10 | }, 11 | "author": "", 12 | "license": "ISC", 13 | "devDependencies": { 14 | "@changesets/cli": "^2.26.1", 15 | "rollup": "2.78.0", 16 | "rollup-plugin-typescript2": "0.34.1", 17 | "typescript": "4.9.4" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /pnpm-monorepo-changesets/packages/pk1/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # @websee/pk1 2 | 3 | ## 1.1.0 4 | 5 | ### Minor Changes 6 | 7 | - 1.1.0 8 | -------------------------------------------------------------------------------- /pnpm-monorepo-changesets/packages/pk1/dist/index.js: -------------------------------------------------------------------------------- 1 | (function (global, factory) { 2 | typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : 3 | typeof define === 'function' && define.amd ? define(['exports'], factory) : 4 | (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["web-see"] = {})); 5 | })(this, (function (exports) { 'use strict'; 6 | 7 | function pk1() { 8 | console.log('I am pk1'); 9 | } 10 | 11 | exports.pk1 = pk1; 12 | 13 | Object.defineProperty(exports, '__esModule', { value: true }); 14 | 15 | })); 16 | //# sourceMappingURL=index.js.map 17 | -------------------------------------------------------------------------------- /pnpm-monorepo-changesets/packages/pk1/dist/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["export function pk1(): any {\r\n console.log('I am pk1');\r\n}"],"names":[],"mappings":";;;;;;WAAgB,GAAG,GAAA;EACjB,IAAA,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;EAC1B;;;;;;;;;;"} -------------------------------------------------------------------------------- /pnpm-monorepo-changesets/packages/pk1/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@websee/pk1", 3 | "version": "1.1.0", 4 | "description": "", 5 | "main": "src/index.ts", 6 | "publishConfig": { 7 | "main": "dist/index.js" 8 | }, 9 | "files": [ 10 | "dist" 11 | ], 12 | "type": "module", 13 | "author": "海阔天空", 14 | "license": "ISC", 15 | "dependencies": {} 16 | } 17 | -------------------------------------------------------------------------------- /pnpm-monorepo-changesets/packages/pk1/src/index.ts: -------------------------------------------------------------------------------- 1 | export function pk1(): any { 2 | console.log('I am pk1'); 3 | } -------------------------------------------------------------------------------- /pnpm-monorepo-changesets/packages/pk2/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # @websee/pk2 2 | 3 | ## 1.1.0 4 | 5 | ### Minor Changes 6 | 7 | - 1.1.0 8 | 9 | ### Patch Changes 10 | 11 | - Updated dependencies 12 | - @websee/pk1@1.1.0 13 | -------------------------------------------------------------------------------- /pnpm-monorepo-changesets/packages/pk2/dist/index.js: -------------------------------------------------------------------------------- 1 | (function (global, factory) { 2 | typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : 3 | typeof define === 'function' && define.amd ? define(factory) : 4 | (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global["web-see"] = factory()); 5 | })(this, (function () { 'use strict'; 6 | 7 | function pk1() { 8 | console.log('I am pk1'); 9 | } 10 | 11 | function pk2() { 12 | pk1(); 13 | console.log('I am pk2'); 14 | } 15 | 16 | return pk2; 17 | 18 | })); 19 | //# sourceMappingURL=index.js.map 20 | -------------------------------------------------------------------------------- /pnpm-monorepo-changesets/packages/pk2/dist/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sources":["../../pk1/src/index.ts","../src/index.ts"],"sourcesContent":["export function pk1(): any {\r\n console.log('I am pk1');\r\n}","import {pk1} from '@websee/pk1'\r\n\r\nfunction pk2() {\r\n pk1()\r\n console.log('I am pk2');\r\n} \r\nexport default pk2;"],"names":[],"mappings":";;;;;;WAAgB,GAAG,GAAA;EACjB,IAAA,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;EAC1B;;ECAA,SAAS,GAAG,GAAA;EACV,IAAA,GAAG,EAAE,CAAA;EACL,IAAA,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;EAC1B;;;;;;;;"} -------------------------------------------------------------------------------- /pnpm-monorepo-changesets/packages/pk2/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@websee/pk2", 3 | "version": "1.1.0", 4 | "description": "", 5 | "main": "src/index.ts", 6 | "publishConfig": { 7 | "main": "dist/index.js" 8 | }, 9 | "type": "module", 10 | "files": [ 11 | "dist" 12 | ], 13 | "author": "海阔天空", 14 | "license": "ISC", 15 | "dependencies": { 16 | "@websee/pk1": "workspace:^1.1.0" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /pnpm-monorepo-changesets/packages/pk2/src/index.ts: -------------------------------------------------------------------------------- 1 | import {pk1} from '@websee/pk1' 2 | 3 | function pk2() { 4 | pk1() 5 | console.log('I am pk2'); 6 | } 7 | export default pk2; -------------------------------------------------------------------------------- /pnpm-monorepo-changesets/pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | - 'packages/*' 3 | -------------------------------------------------------------------------------- /pnpm-monorepo-changesets/rollup.config.js: -------------------------------------------------------------------------------- 1 | import fs from 'fs'; 2 | import path from 'path'; 3 | import typescript from 'rollup-plugin-typescript2'; 4 | const packagesDir = path.resolve(__dirname, 'packages'); 5 | const packageFiles = fs.readdirSync(packagesDir); 6 | function output(path) { 7 | return [ 8 | { 9 | input: [`./packages/${path}/src/index.ts`], 10 | output: [ 11 | { 12 | file: `./packages/${path}/dist/index.js`, 13 | format: 'umd', 14 | name: 'web-see', 15 | sourcemap: true 16 | } 17 | ], 18 | plugins: [ 19 | typescript({ 20 | tsconfigOverride: { 21 | compilerOptions: { 22 | module: 'ESNext' 23 | } 24 | }, 25 | useTsconfigDeclarationDir: true 26 | }) 27 | ] 28 | } 29 | ]; 30 | } 31 | 32 | export default [...packageFiles.map((path) => output(path)).flat()]; 33 | -------------------------------------------------------------------------------- /pnpm-monorepo-changesets/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "include": ["global.d.ts", "packages", "types", "test"], 3 | "compilerOptions": { 4 | "resolveJsonModule": true, 5 | "target": "es5", 6 | "module": "esnext", 7 | "lib": ["dom", "esnext"], 8 | "importHelpers": true, 9 | "declaration": true, 10 | "sourceMap": true, 11 | "strict": true, 12 | "noImplicitAny": true, 13 | "strictNullChecks": true, 14 | "strictFunctionTypes": true, 15 | "strictPropertyInitialization": true, 16 | "noImplicitThis": true, 17 | "alwaysStrict": true, 18 | "noUnusedLocals": true, 19 | "noUnusedParameters": true, 20 | "noImplicitReturns": true, 21 | "noFallthroughCasesInSwitch": true, 22 | "moduleResolution": "node", 23 | "baseUrl": "./", 24 | "paths": { 25 | "*": ["src/*", "node_modules/*"] 26 | }, 27 | "jsx": "react", 28 | "esModuleInterop": true 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /rrweb/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | 6 | # local env files 7 | .env.local 8 | .env.*.local 9 | 10 | # Log files 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | pnpm-debug.log* 15 | 16 | # Editor directories and files 17 | .idea 18 | .vscode 19 | *.suo 20 | *.ntvs* 21 | *.njsproj 22 | *.sln 23 | *.sw? 24 | -------------------------------------------------------------------------------- /rrweb/README.md: -------------------------------------------------------------------------------- 1 | # 使用 rrweb 进行前端录屏 2 | 3 | ## 安装 4 | 5 | ``` 6 | npm install 7 | ``` 8 | 9 | ## 执行 10 | 11 | ``` 12 | npm run serve 13 | ``` 14 | 15 | ## 点击录屏,10s 后点击播放 16 | 17 | ![rrweb.gif](https://p9-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/38cdab10c7614429886194de47ab0391~tplv-k3u1fbpfcp-watermark.image?) 18 | -------------------------------------------------------------------------------- /rrweb/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /rrweb/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "module": "esnext", 5 | "baseUrl": "./", 6 | "moduleResolution": "node", 7 | "paths": { 8 | "@/*": [ 9 | "src/*" 10 | ] 11 | }, 12 | "lib": [ 13 | "esnext", 14 | "dom", 15 | "dom.iterable", 16 | "scripthost" 17 | ] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /rrweb/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "myapp", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build", 8 | "lint": "vue-cli-service lint" 9 | }, 10 | "dependencies": { 11 | "core-js": "^3.8.3", 12 | "echarts": "^5.4.0", 13 | "element-ui": "^2.15.12", 14 | "fs": "0.0.1-security", 15 | "js-base64": "^3.7.3", 16 | "pako": "^2.1.0", 17 | "rrweb": "^2.0.0-alpha.4", 18 | "rrweb-player": "^1.0.0-alpha.4", 19 | "vue": "^2.6.14", 20 | "vue-router": "^3.5.1" 21 | }, 22 | "devDependencies": { 23 | "@babel/core": "^7.12.16", 24 | "@babel/eslint-parser": "^7.12.16", 25 | "@vue/cli-plugin-babel": "~5.0.0", 26 | "@vue/cli-plugin-eslint": "~5.0.0", 27 | "@vue/cli-plugin-router": "~5.0.0", 28 | "@vue/cli-service": "~5.0.0", 29 | "eslint": "^7.32.0", 30 | "eslint-plugin-vue": "^8.0.3", 31 | "less": "^4.0.0", 32 | "less-loader": "^8.0.0", 33 | "vue-template-compiler": "^2.6.14" 34 | }, 35 | "eslintConfig": { 36 | "root": true, 37 | "env": { 38 | "node": true 39 | }, 40 | "extends": [ 41 | "plugin:vue/essential", 42 | "eslint:recommended" 43 | ], 44 | "parserOptions": { 45 | "parser": "@babel/eslint-parser" 46 | }, 47 | "rules": {} 48 | }, 49 | "browserslist": [ 50 | "> 1%", 51 | "last 2 versions", 52 | "not dead" 53 | ] 54 | } 55 | -------------------------------------------------------------------------------- /rrweb/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/rrweb/public/favicon.ico -------------------------------------------------------------------------------- /rrweb/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | <%= htmlWebpackPlugin.options.title %> 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /rrweb/src/App.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 32 | -------------------------------------------------------------------------------- /rrweb/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/rrweb/src/assets/logo.png -------------------------------------------------------------------------------- /rrweb/src/components/HelloWorld.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 11 | 12 | 13 | 29 | -------------------------------------------------------------------------------- /rrweb/src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import App from './App.vue'; 3 | import router from './router'; 4 | import ElementUI from 'element-ui'; 5 | import 'element-ui/lib/theme-chalk/index.css'; 6 | import * as echarts from 'echarts'; 7 | 8 | Vue.use(ElementUI); 9 | Vue.prototype.$echarts = echarts; 10 | Vue.config.productionTip = false; 11 | 12 | new Vue({ 13 | router, 14 | render: (h) => h(App) 15 | }).$mount('#app'); 16 | -------------------------------------------------------------------------------- /rrweb/src/router/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import VueRouter from 'vue-router' 3 | import HomeView from '../views/HomeView.vue' 4 | 5 | Vue.use(VueRouter) 6 | 7 | const routes = [ 8 | { 9 | path: '/', 10 | name: 'home', 11 | component: HomeView 12 | }, 13 | { 14 | path: '/about', 15 | name: 'about', 16 | // route level code-splitting 17 | // this generates a separate chunk (about.[hash].js) for this route 18 | // which is lazy-loaded when the route is visited. 19 | component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue') 20 | } 21 | ] 22 | 23 | const router = new VueRouter({ 24 | routes 25 | }) 26 | 27 | export default router 28 | -------------------------------------------------------------------------------- /rrweb/src/views/AboutView.vue: -------------------------------------------------------------------------------- 1 | 7 | 21 | -------------------------------------------------------------------------------- /rrweb/vue.config.js: -------------------------------------------------------------------------------- 1 | const { defineConfig } = require('@vue/cli-service'); 2 | module.exports = defineConfig({ 3 | transpileDependencies: true 4 | }); 5 | -------------------------------------------------------------------------------- /source-map/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | 6 | # local env files 7 | .env.local 8 | .env.*.local 9 | 10 | # Log files 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | pnpm-debug.log* 15 | 16 | # Editor directories and files 17 | .idea 18 | .vscode 19 | *.suo 20 | *.ntvs* 21 | *.njsproj 22 | *.sln 23 | *.sw? 24 | -------------------------------------------------------------------------------- /source-map/README.md: -------------------------------------------------------------------------------- 1 | # 使用 source-map 进行代码还原 2 | 3 | ## 安装 4 | 5 | ``` 6 | npm install 7 | ``` 8 | 9 | ## 运行 10 | 11 | ``` 12 | npm run start 13 | ``` 14 | 15 | 浏览器输入 http://localhost:8083 16 | 17 | ## 错误还原的示例 18 | 19 | ![error.png](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/9747f417153144d993b5e5e0ccd5ce9f~tplv-k3u1fbpfcp-watermark.image) 20 | 21 | ## 最终的效果 22 | 23 | ![errrecord.gif](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/90e02851cd1c4e00a59cf7aada8859f8~tplv-k3u1fbpfcp-watermark.image?) 24 | -------------------------------------------------------------------------------- /source-map/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /source-map/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "module": "esnext", 5 | "baseUrl": "./", 6 | "moduleResolution": "node", 7 | "paths": { 8 | "@/*": [ 9 | "src/*" 10 | ] 11 | }, 12 | "lib": [ 13 | "esnext", 14 | "dom", 15 | "dom.iterable", 16 | "scripthost" 17 | ] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /source-map/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "myapp", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "start": "node ./server.js", 7 | "test": "npm run build && npm run start", 8 | "serve": "vue-cli-service serve", 9 | "build": "vue-cli-service build" 10 | }, 11 | "dependencies": { 12 | "core-js": "^3.8.3", 13 | "error-stack-parser": "^2.1.4", 14 | "express": "^4.18.2", 15 | "fs": "0.0.1-security", 16 | "path": "^0.12.7", 17 | "serve-static": "^1.15.0", 18 | "source-map-js": "^1.0.2", 19 | "vue": "^2.6.14", 20 | "vue-router": "^3.5.1" 21 | }, 22 | "devDependencies": { 23 | "@babel/core": "^7.12.16", 24 | "@babel/eslint-parser": "^7.12.16", 25 | "@vue/cli-plugin-babel": "~5.0.0", 26 | "@vue/cli-plugin-eslint": "~5.0.0", 27 | "@vue/cli-plugin-router": "~5.0.0", 28 | "@vue/cli-service": "~5.0.0", 29 | "eslint": "^7.32.0", 30 | "eslint-plugin-vue": "^8.0.3", 31 | "less": "^4.0.0", 32 | "less-loader": "^8.0.0", 33 | "vue-template-compiler": "^2.6.14" 34 | }, 35 | "eslintConfig": { 36 | "root": true, 37 | "env": { 38 | "node": true 39 | }, 40 | "extends": [ 41 | "plugin:vue/essential", 42 | "eslint:recommended" 43 | ], 44 | "parserOptions": { 45 | "parser": "@babel/eslint-parser" 46 | }, 47 | "rules": {} 48 | }, 49 | "browserslist": [ 50 | "> 1%", 51 | "last 2 versions", 52 | "not dead" 53 | ] 54 | } 55 | -------------------------------------------------------------------------------- /source-map/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/source-map/public/favicon.ico -------------------------------------------------------------------------------- /source-map/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | <%= htmlWebpackPlugin.options.title %> 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /source-map/server.js: -------------------------------------------------------------------------------- 1 | // 先安装 npm install express --save 2 | 3 | const express = require('express'); 4 | const app = express(); 5 | const path = require('path'); 6 | const fs = require('fs'); 7 | const serveStatic = require('serve-static'); 8 | const rootPath = path.join(__dirname, 'dist'); 9 | app.use(serveStatic(rootPath)); 10 | 11 | //设置允许跨域访问该服务. 12 | app.all('*', function (res, req, next) { 13 | req.header('Access-Control-Allow-Origin', '*'); 14 | req.header('Access-Control-Allow-Headers', 'Content-Type'); 15 | req.header('Access-Control-Allow-Methods', '*'); 16 | req.header('Content-Type', 'application/json;charset=utf-8'); 17 | next(); 18 | }); 19 | 20 | // 获取js.map源码文件 21 | app.get('/getmap', (req, res) => { 22 | // req.query 获取接口参数 23 | let fileName = req.query.fileName; 24 | let mapFile = path.join(__filename, '..', 'dist/js'); 25 | // 拿到dist目录下对应map文件的路径 26 | let mapPath = path.join(mapFile, `${fileName}.map`); 27 | console.log('path', mapPath); 28 | fs.readFile(mapPath, function (err, data) { 29 | if (err) { 30 | return; 31 | } 32 | res.send(data); 33 | }); 34 | }); 35 | app.listen(8083, () => { 36 | console.log('Server is running at http://localhost:8083'); 37 | }); 38 | -------------------------------------------------------------------------------- /source-map/src/App.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 47 | -------------------------------------------------------------------------------- /source-map/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/source-map/src/assets/logo.png -------------------------------------------------------------------------------- /source-map/src/components/HelloWorld.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 11 | 12 | 13 | 29 | -------------------------------------------------------------------------------- /source-map/src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import App from './App.vue'; 3 | import router from './router'; 4 | import ErrorStackParser from 'error-stack-parser'; 5 | import sourceMap from 'source-map-js'; 6 | 7 | Vue.config.productionTip = false; 8 | 9 | // 资源加载错误 10 | function resourceTransform(target) { 11 | return { 12 | action_type: 'RESOURCE_ERROR', 13 | happen_time: new Date().getTime(), 14 | source_url: `资源加载失败: ${target.src.slice(0, 100) || target.href.slice(0, 100)} `, 15 | element_type: target.localName 16 | }; 17 | } 18 | 19 | window.addEventListener( 20 | 'error', 21 | (err) => { 22 | console.log('err', err); 23 | 24 | // 资源加载错误 提取有用数据 25 | if (err.target.localName) { 26 | const data = resourceTransform(err.target); 27 | // 上报错误 28 | console.log('data', data); 29 | return; 30 | } 31 | // code error 32 | let stackFrame = ErrorStackParser.parse(err.error)[0]; 33 | console.log('stackFrame', stackFrame); 34 | let { fileName, columnNumber, lineNumber } = stackFrame; 35 | findCodeBySourceMap({ 36 | fileName, 37 | line: lineNumber, 38 | column: columnNumber 39 | }); 40 | }, 41 | true // true必须加(冒泡阶段捕获),不加捕获不到资源加载异常 42 | ); 43 | 44 | window.addEventListener('unhandledrejection', (err) => { 45 | console.log('err', err); 46 | // code error 47 | let stackFrame = ErrorStackParser.parse(err.reason)[0]; 48 | console.log('unhandledrejection', stackFrame); 49 | let { fileName, columnNumber, lineNumber } = stackFrame; 50 | findCodeBySourceMap({ 51 | fileName, 52 | line: lineNumber, 53 | column: columnNumber 54 | }); 55 | }); 56 | 57 | Vue.config.errorHandler = async (err) => { 58 | console.log(err); 59 | const stackFrame = ErrorStackParser.parse(err)[0]; 60 | console.log(stackFrame, '错误堆栈'); 61 | findCodeBySourceMap({ 62 | fileName: stackFrame.fileName, 63 | line: stackFrame.lineNumber, 64 | column: stackFrame.columnNumber 65 | }); 66 | // findCodeBySourceMap({ 67 | // fileName: 'http://localhost:3000/js/app.de87f606.js', 68 | // line: 1, 69 | // column: 895 70 | // }); 71 | }; 72 | 73 | // 找到以.js结尾的fileName 74 | function matchStr(str) { 75 | if (str.endsWith('.js')) return str.substring(str.lastIndexOf('/') + 1); 76 | } 77 | 78 | // 将所有的空格转化为实体字符 79 | function repalceAll(str) { 80 | return str.replace(new RegExp(' ', 'gm'), ' '); 81 | } 82 | 83 | function loadSourceMap(fileName) { 84 | let file = matchStr(fileName); 85 | if (!file) return; 86 | return new Promise((resolve) => { 87 | fetch(`${window.location.origin}/getmap?fileName=${file}`).then((response) => { 88 | resolve(response.json()); 89 | }); 90 | }); 91 | } 92 | 93 | const findCodeBySourceMap = async ({ fileName, line, column }) => { 94 | let sourceData = await loadSourceMap(fileName); 95 | if (!sourceData) return; 96 | let { sourcesContent, sources } = sourceData; 97 | console.log('sourceData', sourceData); 98 | let consumer = await new sourceMap.SourceMapConsumer(sourceData); 99 | let result = consumer.originalPositionFor({ 100 | line: Number(line), 101 | column: Number(column) 102 | }); 103 | // result结果 104 | // { 105 | // "source": "webpack://myapp/src/views/HomeView.vue", 106 | // "line": 24, // 具体的报错行数 107 | // "column": 0, // 具体的报错列数 108 | // "name": null 109 | // } 110 | 111 | let code = sourcesContent[sources.indexOf(result.source)]; 112 | console.log('代码', code); 113 | let codeList = code.split('\n'); 114 | var row = result.line, 115 | len = codeList.length - 1; 116 | var start = row - 5 >= 0 ? row - 5 : 0, // 将报错代码显示在中间位置 117 | end = start + 9 >= len ? len : start + 9; // 最多展示10行 118 | let newLines = []; 119 | let j = 0; 120 | for (var i = start; i <= end; i++) { 121 | j++; 122 | newLines.push(`
${j}. ${repalceAll(codeList[i])}
`); 123 | } 124 | 125 | let target = document.querySelector('#text'); 126 | target.innerHTML = `
${result.source} at line ${result.column}:${row}
${newLines.join('')}
`; 127 | }; 128 | 129 | new Vue({ 130 | router, 131 | render: (h) => h(App) 132 | }).$mount('#app'); 133 | -------------------------------------------------------------------------------- /source-map/src/router/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import VueRouter from 'vue-router' 3 | import HomeView from '../views/HomeView.vue' 4 | 5 | Vue.use(VueRouter) 6 | 7 | const routes = [ 8 | { 9 | path: '/', 10 | name: 'home', 11 | component: HomeView 12 | }, 13 | { 14 | path: '/about', 15 | name: 'about', 16 | // route level code-splitting 17 | // this generates a separate chunk (about.[hash].js) for this route 18 | // which is lazy-loaded when the route is visited. 19 | component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue') 20 | } 21 | ] 22 | 23 | const router = new VueRouter({ 24 | routes 25 | }) 26 | 27 | export default router 28 | -------------------------------------------------------------------------------- /source-map/src/views/AboutView.vue: -------------------------------------------------------------------------------- 1 | 7 | 21 | -------------------------------------------------------------------------------- /source-map/src/views/HomeView.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 64 | -------------------------------------------------------------------------------- /source-map/vue.config.js: -------------------------------------------------------------------------------- 1 | const { defineConfig } = require('@vue/cli-service'); 2 | module.exports = defineConfig({ 3 | transpileDependencies: true 4 | }); 5 | -------------------------------------------------------------------------------- /web-worker/.browserslistrc: -------------------------------------------------------------------------------- 1 | > 1% 2 | last 2 versions 3 | not dead 4 | -------------------------------------------------------------------------------- /web-worker/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { 4 | node: true 5 | }, 6 | extends: ['plugin:vue/essential', 'eslint:recommended'], 7 | parserOptions: { 8 | parser: '@babel/eslint-parser' 9 | }, 10 | rules: { 11 | 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 12 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off' 13 | } 14 | }; 15 | -------------------------------------------------------------------------------- /web-worker/README.md: -------------------------------------------------------------------------------- 1 | # webWorker demo 2 | 3 | ## Project setup 4 | 5 | ``` 6 | pnpm install 7 | ``` 8 | 9 | ### Compiles and hot-reloads for development 10 | 11 | ``` 12 | pnpm run serve 13 | ``` 14 | 15 | ### 演示示例 16 | 17 | ![Image text](./webworker.gif) 18 | 19 | ### 文章地址 20 | 21 | [一文彻底了解 Web Worker,十万条数据都是弟弟](https://github.com/xy-sea/blog/blob/dev/markdown/%E4%B8%80%E6%96%87%E5%BD%BB%E5%BA%95%E4%BA%86%E8%A7%A3Web%20Worker%EF%BC%8C%E5%8D%81%E4%B8%87%E6%9D%A1%E6%95%B0%E6%8D%AE%E9%83%BD%E6%98%AF%E5%BC%9F%E5%BC%9F.md) 22 | -------------------------------------------------------------------------------- /web-worker/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['@vue/app'] 3 | }; 4 | -------------------------------------------------------------------------------- /web-worker/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue2", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build", 8 | "lint": "vue-cli-service lint" 9 | }, 10 | "dependencies": { 11 | "core-js": "^3.8.3", 12 | "element-ui": "^2.15.10", 13 | "mathjs": "^7.5.1", 14 | "vue": "^2.6.14", 15 | "vxe-table": "^2.9.26", 16 | "xe-utils": "^2.6.5" 17 | }, 18 | "devDependencies": { 19 | "@babel/core": "^7.12.16", 20 | "@babel/eslint-parser": "^7.12.16", 21 | "@vue/cli-plugin-babel": "~5.0.0", 22 | "@vue/cli-plugin-eslint": "~5.0.0", 23 | "@vue/cli-service": "~5.0.0", 24 | "eslint": "^7.32.0", 25 | "eslint-plugin-vue": "^8.0.3", 26 | "less": "^4.1.3", 27 | "less-loader": "^11.0.0", 28 | "vue-template-compiler": "^2.6.14", 29 | "worker-loader": "^3.0.8" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /web-worker/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/web-worker/public/favicon.ico -------------------------------------------------------------------------------- /web-worker/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | <%= htmlWebpackPlugin.options.title %> 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /web-worker/src/App.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 31 | 32 | 49 | -------------------------------------------------------------------------------- /web-worker/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/web-worker/src/assets/logo.png -------------------------------------------------------------------------------- /web-worker/src/components/canvasDemo.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 24 | 25 | 30 | -------------------------------------------------------------------------------- /web-worker/src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import App from './App.vue'; 3 | import ElementUI from 'element-ui'; 4 | import 'element-ui/lib/theme-chalk/index.css'; 5 | 6 | import 'xe-utils'; 7 | import VXETable from 'vxe-table'; 8 | import 'vxe-table/lib/style.css'; 9 | 10 | Vue.config.productionTip = false; 11 | 12 | Vue.use(ElementUI); 13 | Vue.use(VXETable); 14 | new Vue({ 15 | render: (h) => h(App) 16 | }).$mount('#app'); 17 | -------------------------------------------------------------------------------- /web-worker/src/worker/canvasWorker.js: -------------------------------------------------------------------------------- 1 | onmessage = function (e) { 2 | // 使用OffscreenCanvas(离屏Canvas) 3 | let canvas = e.data.canvas; 4 | // 获取绘图上下文 5 | let ctx = canvas.getContext('2d'); 6 | // 绘制一个圆弧 7 | ctx.beginPath(); // 开启路径 8 | ctx.arc(150, 75, 50, 0, Math.PI * 2); 9 | ctx.fillStyle = '#1989fa'; //设置填充颜色 10 | ctx.fill(); //开始填充 11 | ctx.stroke(); 12 | }; 13 | -------------------------------------------------------------------------------- /web-worker/src/worker/dataWorker.js: -------------------------------------------------------------------------------- 1 | onmessage = function (e) { 2 | let data = e.data; 3 | let list = []; 4 | for (let i = 1; i < 400; i++) { 5 | for (let j = 0; j < 10; j++) { 6 | list.push({ ...data[j], key: `数据${j + 1 + i * 10}` }); 7 | } 8 | } 9 | // 发送数据事件 10 | postMessage(list); 11 | }; 12 | -------------------------------------------------------------------------------- /web-worker/vue.config.js: -------------------------------------------------------------------------------- 1 | const { defineConfig } = require('@vue/cli-service'); 2 | module.exports = defineConfig({ 3 | transpileDependencies: true 4 | }); 5 | -------------------------------------------------------------------------------- /web-worker/webworker.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xy-sea/blog/c104a0698fbfb641aeeaac9952950b637e29bd17/web-worker/webworker.gif -------------------------------------------------------------------------------- /动画demo/奖动效demo/prize.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Document 9 | 89 | 90 | 91 | 92 |
93 | 94 |
95 | 96 | 97 | -------------------------------------------------------------------------------- /算法分类题库/README.md: -------------------------------------------------------------------------------- 1 | ## 算法导图 2 | 3 | 算法.png 4 | -------------------------------------------------------------------------------- /算法分类题库/堆.md: -------------------------------------------------------------------------------- 1 | ### 堆 2 | 3 | **堆实际上是一棵完全二叉树** 4 | 5 | **大顶堆**: 每个的节点元素值不小于其子节点 6 | 7 | **小顶堆**: 每个的节点元素值不大于其子节点 8 | 9 | ![heap.png](https://p1-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/3b432c37814a439ebe97e0add46acabb~tplv-k3u1fbpfcp-watermark.image?) 10 | 11 | #### 堆的作用 12 | 13 | 在庞大的数据中,找到最大的 m 个数或者最小的 m 个数,可以借助堆来完成这个过程,时间复杂度为`nlogm` 14 | 15 | 如果先排序,再取前 m 个数,最小时间复杂度`nlogn` 16 | 17 | `nlogm` < `nlogn`,堆排序时间复杂度更优 18 | 19 | **堆节点与其叶子节点的规律** 20 | 21 | 1)堆中父节点为`k`,它的左子节点下标为`2k+1`,右子节点是`2k+2` 22 | 23 | 2)所有序号大于`length/2`的结点都是叶子节点, `0` 到 `length/2-1` 为父节点 24 | 25 | #### 堆的排序过程 26 | 27 | ![heapSort.gif](https://p6-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/9afe1feb80ba4572935c8dad5b7dd41e~tplv-k3u1fbpfcp-watermark.image?) 28 | 29 | #### 堆排序 30 | 31 | 从一堆数中,找到前 m 个最小值 32 | 33 | 如图,从下面的大顶堆中,找到前 4 个最小值,结果为`[6, 5, 2, 1]` 34 | 35 | maxHeap.png 36 | 37 | ```js 38 | function heapSort(list, m) { 39 | if (m > list.length) { 40 | return []; 41 | } 42 | createHeap(list, m); 43 | for (let i = m; i < list.length; i++) { 44 | if (list[i] < list[0]) { 45 | // 找到前m个数的最小值,依次将最小值放到最前面 46 | [list[i], list[0]] = [list[0], list[i]]; 47 | ajustHeap(list, 0, m); 48 | } 49 | } 50 | // 取出前m个数 51 | return list.splice(0, m); 52 | } 53 | // 构建大顶堆(构建的顺序是从下往上,先找到最后一个父节点,然后从最后一个父节点开始构建,然后依次往上构建,将最大值逐步替换成根节点) 54 | function createHeap(arr, length) { 55 | // 找到堆中所有的非叶子节点(找到最后一个叶子节点,该节点之前都是非叶子节点) 56 | for (let i = Math.floor(length / 2) - 1; i >= 0; i--) { 57 | // 堆中,父节点为i,则子节点为2*i+1、2*i+2;反过来,知道了子节点为length,则最后一个子节点为Math.floor(length / 2) - 1。 58 | ajustHeap(arr, i, length); // 调整大顶堆,将最大值逐步替换成根节点 59 | } 60 | } 61 | // 调整大顶堆(注意:调整的顺序是从上往下,将根节点替换后,先调整根节点,然后依次往下调整,对应的子节点如果发生替换,要重新调整下对应子节点,保证都满足子节点不大于父节点的条件,直到该大顶推全部调整完成) 62 | // 比如,当调节根节点时,[a0, a1, a2], a2> a0, a2替换a0,则要重新调节a2这个分支上的节点,保证都满足子节点不大于父节点的条件 63 | function ajustHeap(arr, index, length) { 64 | for (let i = 2 * index + 1; i < length; i = 2 * i + 1) { 65 | // 父节点为i,则子节点为2*i+1 66 | if (i + 1 < length && arr[i + 1] > arr[i]) { 67 | // 找到arr[i + 1] 和 arr[i] 中的最大值 68 | i++; 69 | } 70 | // 如果子节点比父节点大,交换两者的位置,将最大值移动到顶部 71 | if (arr[index] < arr[i]) { 72 | [arr[index], arr[i]] = [arr[i], arr[index]]; 73 | index = i; 74 | } else { 75 | break; 76 | } 77 | } 78 | } 79 | console.log(heapSort([5, 10, 2, 15, 1, 12, 6], 4)); // [6, 5, 2, 1] 80 | ``` 81 | -------------------------------------------------------------------------------- /算法分类题库/排序算法.md: -------------------------------------------------------------------------------- 1 | ### 排序算法 2 | 3 | 各种排序算法的对比详情 4 | 5 | ![sort.png](https://p9-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/52c601f80e0c4c848309f50777194895~tplv-k3u1fbpfcp-watermark.image?) 6 | 7 | **算法的稳定性**:序列相同元素排序后,先后次序不变即稳定 8 | 9 | 冒泡排序、归并排序稳定,快速排序、选择排序不稳定 10 | 11 | #### 冒泡排序 12 | 13 | 时间复杂度为`O(n²)`,稳定 14 | 15 | ``` 16 | function bubbleSort(arr) { 17 | const length = arr.length; 18 | // 外层循环用控制 排序进行多少轮 19 | for (let i = 0; i < length; i++) { 20 | // 内层循环用于每一轮的数据比较 21 | // 注意j的长度范围 length - i - 1 22 | for (let j = 0; j < length - i - 1; j++) { 23 | // 相邻元素,大的放到后面 24 | if (arr[j] > arr[j + 1]) { 25 | // 交换位置 26 | [arr[j], arr[j + 1]] = [arr[j + 1], arr[j]]; 27 | } 28 | } 29 | } 30 | return arr; 31 | } 32 | console.log(bubbleSort([8, 7, 1, 4, 3])); // [1,3,4,7,8] 33 | ``` 34 | 35 | #### 选择排序 36 | 37 | 时间复杂度为`O(n²)`,不稳定 38 | 39 | **思路** 40 | 41 | 从未排序序列中找到最小的元素,放到已排序序列的头部,重复上述步骤,直到所有元素排序完毕 42 | 43 | 1)外层循环控制进行多少轮 44 | 2)内层循环进行数据比较,找到每一轮的最小值 45 | 46 | ![selectSort.gif](https://p6-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/f397150299de491aa239b625f1be5a1e~tplv-k3u1fbpfcp-watermark.image?) 47 | 48 | ``` 49 | function selectSort(arr) { 50 | // 定义index存储最小值的下标 51 | let index; 52 | // 外层循环用控制 排序进行多少轮 53 | for (let i = 0; i < arr.length - 1; i++) { 54 | index = i; 55 | // 内层循环用于每一轮的数据比较 56 | // 注意j的起始范围是 i + 1 57 | for (let j = i + 1; j < arr.length; j++) { 58 | // 寻找最小值 59 | if (arr[j] < arr[index]) { 60 | // 保存最小值的下标 61 | index = j; 62 | } 63 | } 64 | // 如果 index 不是目前的头部元素,则交换两者 65 | if (index !== i) { 66 | [arr[i], arr[index]] = [arr[index], arr[i]]; 67 | } 68 | } 69 | return arr; 70 | } 71 | console.log(selectSort([9, 1, 5, 3, 2, 8])); // [1, 2, 3, 5, 8, 9] 72 | ``` 73 | 74 | #### 插入排序 75 | 76 | 时间复杂度为`O(n²)`,稳定 77 | 78 | **思路** 79 | 80 | 将左侧序列看成一个有序序列,每次将一个数字插入该有序序列。 81 | 82 | 插入时,从有序序列最右侧开始比较,若比较的数较大,后移一位。 83 | 84 | ![insert.gif](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/6c73c966c21d4fb4a7cc50f44293d35e~tplv-k3u1fbpfcp-watermark.image?) 85 | 86 | ``` 87 | function insertSort(array) { 88 | // 外层控制循环的次数 89 | for (let i = 1; i < array.length; i++) { 90 | let target = i; 91 | // 内层循环用于每一轮的数据比较 92 | for (let j = i - 1; j >= 0; j--) { 93 | if (array[target] < array[j]) { 94 | [array[target], array[j]] = [array[j], array[target]]; 95 | target = j; 96 | } else { 97 | break; 98 | } 99 | } 100 | } 101 | return array; 102 | } 103 | 104 | console.log(insertSort([9, 1, 5, 3, 2, 8])); // [1, 2, 3, 5, 8, 9] 105 | ``` 106 | 107 | #### 快速排序 108 | 109 | 时间复杂度为`O(nlogn)`,不稳定 110 | 111 | **思路** 112 | 113 | 1)以一个数为基准(中间的数),比基准小的放到左边,比基准大的放到右边 114 | 115 | 2)再按此方法对这两部分数据分别进行快速排序(递归进行) 116 | 117 | 3)不能再分后退出递归,并重新将数组合并 118 | 119 | ``` 120 | // 快速排序 121 | function quickSort(list) { 122 | // 当list.length <= 1时,退出递归 123 | if (list.length <= 1) return list; 124 | // 找到中间节点 125 | let mid = Math.floor(list.length / 2); 126 | // 以中间节点为基准点,比该节点大的值放到right数组中,否则放到left数组中 127 | let base = list.splice(mid, 1)[0]; 128 | let left = []; 129 | let right = []; 130 | list.forEach(item => { 131 | if (item > base) { 132 | right.push(item); 133 | } else { 134 | left.push(item); 135 | } 136 | }); 137 | // 重新组合数组 138 | return quickSort(left).concat(base, quickSort(right)); 139 | } 140 | console.log(quickSort([9, 1, 5, 3, 2, 8])); 141 | ``` 142 | 143 | #### 归并排序 144 | 145 | 时间复杂度为`O(nlogn)`,稳定 146 | 147 | **思路** 148 | 149 | 1)将给定的列表分为两半(如果列表中的元素数为奇数,则使其大致相等) 150 | 151 | 2)以相同的方式继续划分子数组,直到只剩下单个元素数组 152 | 153 | 3)从单个元素数组开始,合并子数组,以便对每个合并的子数组进行排序 154 | 155 | 4)重复第 3 步单元,直到最后得到一个排好序的数组。 156 | 157 | ![merge.gif](https://p6-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/465364a973c1456d96c8fbb0e54a2522~tplv-k3u1fbpfcp-watermark.image?) 158 | 159 | ``` 160 | function MergeSort(array) { 161 | let len = array.length; 162 | if (len <= 1) { 163 | return array; 164 | } 165 | // 将给定的列表分为两半 166 | let num = Math.floor(len / 2); 167 | let left = MergeSort(array.slice(0, num)); 168 | let right = MergeSort(array.slice(num, array.length)); 169 | return merge(left, right); 170 | 171 | function merge(left, right) { 172 | let [l, r] = [0, 0]; 173 | let result = []; 174 | while (l < left.length && r < right.length) { 175 | if (left[l] < right[r]) { 176 | result.push(left[l]); 177 | l++; 178 | } else { 179 | result.push(right[r]); 180 | r++; 181 | } 182 | } 183 | result = result.concat(left.slice(l, left.length)); 184 | result = result.concat(right.slice(r, right.length)); 185 | return result; 186 | } 187 | } 188 | console.log(MergeSort([6, 5, 3, 1, 8, 7, 2, 4])); 189 | ``` 190 | -------------------------------------------------------------------------------- /算法分类题库/栈和队列.md: -------------------------------------------------------------------------------- 1 | ### 栈和队列 2 | 3 | 栈是一种特殊的线性表,仅能在线性表的一端操作,栈顶允许操作,栈底不允许操作 4 | 5 | 栈的特点是:**先进后出**,从栈顶放入元素的操作叫入栈,取出元素叫出栈 6 | 7 | 队列与栈一样,也是一种线性表,不同的是,队列可以在一端添加元素,在另一端取出元素,也就是:**先进先出**,从一端放入元素的操作称为入队,取出元素为出队 8 | 9 | **两者区别:**`栈(先进后出)、队列(先进先出)` 10 | 11 | #### 创建栈和队列 12 | 13 | **创建栈** 14 | 15 | ``` 16 | // 创建栈 只能从栈尾添加和删除 实现先进后出的效果 17 | class Stack { 18 | constructor() { 19 | this.arr = []; 20 | } 21 | // 从栈尾添加 22 | insert(data) { 23 | this.arr.push(data); 24 | } 25 | // 从栈尾删除 26 | del() { 27 | return this.arr.pop(); 28 | } 29 | toString() { 30 | return this.arr.toString(); 31 | } 32 | } 33 | 34 | let stack = new Stack(); 35 | stack.insert(1); 36 | stack.insert(2); 37 | stack.insert(3); 38 | stack.del(); 39 | console.log(stack.toString()); // 1,2 40 | ``` 41 | 42 | **创建队列** 43 | 44 | ``` 45 | // 创建队列 只能从栈尾添加和头部删除 实现先进先出的效果 46 | class Queue { 47 | constructor() { 48 | this.arr = []; 49 | } 50 | insert(data) { 51 | this.arr.push(data); 52 | } 53 | del() { 54 | return this.arr.shift(); 55 | } 56 | toString() { 57 | return this.arr.toString(); 58 | } 59 | } 60 | 61 | let queue = new Queue(); 62 | queue.insert(1); 63 | queue.insert(2); 64 | queue.insert(3); 65 | queue.del(); 66 | console.log(queue.toString()); // 2,3 67 | 68 | ``` 69 | 70 | #### 栈的入栈和出栈序列 71 | 72 | 输入两个整数序列,第一个序列`arr1`表示栈的入栈顺序,请判断第二个序列`arr2`,是否可能为该栈的出栈序列 73 | 74 | **思路** 75 | 76 | 1)创建一个栈,模拟入栈、出栈的过程 77 | 78 | 2)`id`用来记录`arr1`已出栈的位置 79 | 80 | 3)当`stack`栈顶元素和 `arr2` 栈顶元素相同时,stack 出栈;索引`id+1` 81 | 82 | 4)最终 stack 栈为空,表示 arr1 全部元素已出栈 83 | 84 | ``` 85 | // 判断两个整数序列,第一个序列为入栈顺序,第二个序列是否为出栈顺序 86 | function isSameStack(arr, arr1) { 87 | // 创建一个栈,模拟入栈、出栈的过程 88 | let stack = []; 89 | // id用来记录arr1已出栈的位置 90 | let id = 0; 91 | for (let i = 0; i < arr.length; i++) { 92 | // 入栈 93 | stack.push(arr[i]); 94 | // 当stack栈顶元素和 arr1 栈顶元素相同时,stack出栈;索引id+1, 95 | while (stack.length && stack[stack.length - 1] === arr1[id]) { 96 | // 出栈 97 | stack.pop(); 98 | // 下次要对比arr1[id+1]与stack栈顶元素是否相等 99 | id++; 100 | } 101 | } 102 | // 最终stack栈为空,表示arr全部元素已出栈 103 | return stack.length == 0; 104 | } 105 | 106 | console.log(isSameStack([1, 2, 3, 4, 5], [2, 4, 5, 3, 1])); // true 107 | ``` 108 | 109 | #### 滑动窗口最大值 110 | 111 | 给定一个数组 `nums`,有一个大小为 `k` 的滑动窗口,从数组的最左侧移动到数组的最右侧。你只可以看到在滑动窗口中的 k 个数字。滑动窗口每次只向右移动一位,求返回滑动窗口最大值 112 | 113 | 如`nums = [1,3,-1,-3,5,3,6,7]`, `k = 3`,输出结果为`[3, 3, 5, 5, 6, 7]` 114 | 115 | ![window.png](https://p6-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/b7ee188ecf7a4a86900eb42530d7ec34~tplv-k3u1fbpfcp-watermark.image?) 116 | 117 | **思路** 118 | 119 | 利用双端队列(队列两侧都可以剔除元素),窗口移动的过程中,始终保证 window 中最左侧的元素为当前窗口的最大值 120 | 121 | ``` 122 | function maxSlidingWindow(nums, k) { 123 | // window存储当前窗口中数据的下标 124 | const window = []; 125 | // result存储窗口中的最大值 126 | const result = []; 127 | for (let i = 0; i < nums.length; i++) { 128 | if (i - window[0] > k - 1) { 129 | // 窗口不断往右移动,当最大值在窗口最左侧,但窗口的长度超出k时的情况,就要把左侧的最大值剔除,比如窗口为【3,-1,-3】,继续往右时,就要把左侧的3剔除 130 | window.shift(); // 剔除窗口长度超出范围时左侧的最大值 131 | } 132 | for (let j = window.length - 1; j >= 0; j--) { 133 | // 当前窗口的值依次和要插入的值做比较,如果小于要插入的值,剔除掉该值,直到window为空为止(保证window中最左侧的值为最大值) 134 | if (nums[window[j]] <= nums[i]) { 135 | window.pop(); 136 | } 137 | } 138 | // 添加右侧新加入的值,插入新值时有两种情况: 139 | // 1、新值为最大值时,则window此时为空; 140 | // 2、新值不为最大值时,window已剔除掉比新值小的值。 141 | // 始终保证window中最左侧的值为最大值 142 | window.push(i); 143 | if (i >= k - 1) { 144 | // 窗口是从0开始移动,当移动的距离,大于等于目标范围后,以后再往后移动一次,就要写入当前窗口的最大值 145 | result.push(nums[window[0]]); 146 | } 147 | } 148 | return result; 149 | } 150 | console.log(maxSlidingWindow([1, 3, -1, -3, 5, 3, 6, 7], 3)); // [3, 3, 5, 5, 6, 7] 151 | ``` 152 | -------------------------------------------------------------------------------- /算法分类题库/树.md: -------------------------------------------------------------------------------- 1 | ### 树 2 | 3 | JS 中树结构一般类似这样 4 | 5 | ``` 6 | let tree = [ 7 | { 8 | id: "1", 9 | title: "节点1", 10 | children: [ 11 | { 12 | id: "1-1", 13 | title: "节点1-1" 14 | }, 15 | { 16 | id: "1-2", 17 | title: "节点1-2" 18 | } 19 | ] 20 | }, 21 | { 22 | id: "2", 23 | title: "节点2", 24 | children: [ 25 | { 26 | id: "2-1", 27 | title: "节点2-1" 28 | } 29 | ] 30 | } 31 | ]; 32 | ``` 33 | 34 | #### 列表转树 35 | 36 | **使用对象存储数据, 典型的空间换时间** 37 | 38 | 时间复杂度为`O(n)`、空间复杂度为`O(n)` 39 | 40 | ``` 41 | function listToTree(data) { 42 | // 使用对象重新存储数据, 空间换时间 43 | let map = {}; 44 | // 存储最后结果 45 | let treeData = []; 46 | // 遍历原始数据data,存到map中,id为key,值为数据 47 | for (let i = 0; i < data.length; i++) { 48 | map[data[i].id] = data[i]; 49 | } 50 | 51 | // 遍历对象 52 | for (let i in map) { 53 | // 根据 parentId 找到的是父节点 54 | if (map[i].parentId) { 55 | if (!map[map[i].parentId].children) { 56 | map[map[i].parentId].children = []; 57 | } 58 | // 将子节点 放到 父节点的 children中 59 | map[map[i].parentId].children.push(map[i]); 60 | } else { 61 | // parentId 找不到对应值,说明是根结点,直接插到根数组中 62 | treeData.push(map[i]); 63 | } 64 | } 65 | 66 | return treeData; 67 | } 68 | 69 | // 测试 70 | let list = [ 71 | { id: 1, title: "child1", parentId: 0 }, 72 | { id: 2, title: "child2", parentId: 0 }, 73 | { id: 6, title: "child2_1", parentId: 2 }, 74 | { id: 4, title: "child1_1", parentId: 1 }, 75 | { id: 5, title: "child1_2", parentId: 1 }, 76 | { id: 3, title: "child3", parentId: 0 }, 77 | { id: 7, title: "child3_1", parentId: 3 } 78 | ]; 79 | console.log(listToTree(list)); 80 | ``` 81 | 82 | #### 深度优先遍历 83 | 84 | 递归实现,写法简单,时间复杂度为`O(n²)` 85 | 86 | ``` 87 | function deepTree(tree, arr = []) { 88 | tree.forEach(data => { 89 | arr.push(data.id); 90 | // 遍历子树 91 | data.children && deepTree(data.children, arr); 92 | }); 93 | return arr; 94 | } 95 | 96 | let tree = [ 97 | { 98 | id: "1", 99 | title: "节点1", 100 | children: [ 101 | { 102 | id: "1-1", 103 | title: "节点1-1" 104 | }, 105 | { 106 | id: "1-2", 107 | title: "节点1-2" 108 | } 109 | ] 110 | }, 111 | { 112 | id: "2", 113 | title: "节点2", 114 | children: [ 115 | { 116 | id: "2-1", 117 | title: "节点2-1" 118 | } 119 | ] 120 | } 121 | ]; 122 | console.log(deepTree(tree)); // ['1', '1-1', '1-2', '2', '2-1'] 123 | ``` 124 | 125 | #### 广度优先遍历 126 | 127 | **思路** 128 | 129 | 1)维护一个队列,队列的初始值为树结构根节点组成的列表,重复执行以下步骤,直到队列为空 130 | 131 | 2)取出队列中的第一个元素,进行访问相关操作,然后将其后代元素(如果有)全部追加到队列最后 132 | 133 | 时间复杂度为`O(n)`、空间复杂度为`O(n)` 134 | 135 | ``` 136 | // 广度优先 137 | function rangeTree(tree, arr = []) { 138 | let node, 139 | list = [...tree]; 140 | while ((node = list.shift())) { 141 | arr.push(node); 142 | node.children && list.push(...node.children); 143 | } 144 | return arr; 145 | } 146 | 147 | let tree = [ 148 | { 149 | id: "1", 150 | title: "节点1", 151 | children: [ 152 | { 153 | id: "1-1", 154 | title: "节点1-1" 155 | }, 156 | { 157 | id: "1-2", 158 | title: "节点1-2" 159 | } 160 | ] 161 | }, 162 | { 163 | id: "2", 164 | title: "节点2", 165 | children: [ 166 | { 167 | id: "2-1", 168 | title: "节点2-1" 169 | } 170 | ] 171 | } 172 | ]; 173 | console.log(rangeTree(tree)); //  ['1', '2', '1-1', '1-2', '2-1'] 174 | ``` 175 | 176 | #### 查找节点 177 | 178 | 递归实现,写法简单 179 | 180 | ``` 181 | function findTreeNode(tree, func) { 182 | for (const data of tree) { 183 | // 条件成立 直接返回 184 | if (func(data)) return data; 185 | if (data.children) { 186 | const res = findTreeNode(data.children, func); 187 | // 结果存在再返回 188 | if (res) return res; 189 | } 190 | } 191 | return null; 192 | } 193 | 194 | let tree = [ 195 | { 196 | id: "1", 197 | title: "节点1", 198 | children: [ 199 | { 200 | id: "1-1", 201 | title: "节点1-1" 202 | }, 203 | { 204 | id: "1-2", 205 | title: "节点1-2" 206 | } 207 | ] 208 | }, 209 | { 210 | id: "2", 211 | title: "节点2", 212 | children: [ 213 | { 214 | id: "2-1", 215 | title: "节点2-1" 216 | } 217 | ] 218 | } 219 | ]; 220 | console.log( 221 | findTreeNode(tree, data => { 222 | return data.title === "节点1-1"; 223 | }) 224 | ); 225 | 226 | // 打印结果: {id: '1-1', title: '节点1-1'} 227 | ``` 228 | --------------------------------------------------------------------------------