
js
家里一只小秃鸡
这个作者很懒,什么都没留下…
展开
-
tsconfig.json 配置
【代码】tsconfig.json 配置。原创 2022-09-26 09:30:22 · 326 阅读 · 0 评论 -
导出 excel 文件(单元格宽度自适应)
首先下载依赖npm install -S file-saver xlsxnpm install -D script-loader需要 excel,js 文件 放到如图所示的文件夹下面点击跳转到资源在需要使用的位置导入 excel 文件使用 excel.js 导出 excel文件importInfoDownload() { this.$confirm("此操作将导出excel文件, 是否继续?", "提示", { confirmButtonText: "确定",原创 2022-02-17 10:10:11 · 2807 阅读 · 0 评论 -
遍历复杂数组
// 候选数据let arr = [{ "children":[ { "children": [], "disabled": true, "id": "4028f8bb7af52bf4017af55762700142", "leaf": true, "name": "businessadmin9", "otype": "user", }, { "children": [],原创 2022-01-21 15:13:23 · 644 阅读 · 0 评论 -
代码优化的建议
一、关于取值的吐槽取值在程序中非常常见,比如从对象obj中取值。const obj = { a:1, b:2, c:3, d:4, e:5,}吐槽:const a = obj.a;const b = obj.b;const c = obj.c;const d = obj.d;const e = obj.e;或者const f = obj.a + obj.d;const g = obj.c + obj.e;吐槽:“不会用ES6的解构赋值来原创 2021-12-30 09:57:14 · 114 阅读 · 0 评论