2020年3月10日

vue中Axios的封装和API接口的管理

摘要: 1.http.js中axios封装的优化,先直接贴代码: /** * axios封装 * 请求拦截、响应拦截、错误统一处理 */ import axios from 'axios'; import router from '../router'; import store from '../stor 阅读全文

posted @ 2020-03-10 15:05 今天的代码你撸了嘛 阅读(661) 评论(0) 推荐(0) 编辑

详解es6新增数组方法简便了哪些操作

摘要: 在es6中,只需要一行代码就可以搞定! Array.from && newSet() let a = [1,2,2,3,3,4,5]; let b = Array.from(new Set(a)) console.log(b) // [1,2,3,4,5] 是不是及其简单!其中 new Set()会 阅读全文

posted @ 2020-03-10 13:10 今天的代码你撸了嘛 阅读(447) 评论(0) 推荐(0) 编辑

导航