摘要: (1) 使用Array.prototype借用真数组方法 let newArr = Array.prototype.forEach.bind(伪数组) (2) 使用Array.from 转为真数组 let newArr = Array.from(伪数组) (3) 使用展开运算符转为真数组 let n 阅读全文
posted @ 2020-07-17 10:25 black_Crocodile 阅读(338) 评论(0) 推荐(0)
摘要: 使用watch监听: watch:{ $route(to,from){ console.log(to); } }, 阅读全文
posted @ 2020-07-14 09:24 black_Crocodile 阅读(2805) 评论(0) 推荐(0)
摘要: 1.在vsCode中安装prettier插件 2.在vsCode设置中进入settings.json配置文件 3.在settings.json进行配置 "editor.formatOnSave": true, // 配置保存是否自动对齐 "prettier.semi": true, // 是否带分号 阅读全文
posted @ 2020-07-10 10:56 black_Crocodile 阅读(1479) 评论(0) 推荐(0)
摘要: 在项目根目录创建 .prettierrc 文件,添加如下图配置,保存后,在需要格式化的文件中重新格式化即可 在这里插入图片描述 阅读全文
posted @ 2020-07-10 10:32 black_Crocodile 阅读(973) 评论(0) 推荐(0)
摘要: 1.装包 npm i qrcodejs2 -S 2.在script中引入 import QRCode from 'qrcodejs2' 3.使用 项目中是通过弹出框的形式显示二维码的 HTML部分 <a-button type="primary" icon="qrcode" v-has="'docu 阅读全文
posted @ 2020-07-08 17:10 black_Crocodile 阅读(615) 评论(0) 推荐(0)