06 2019 档案

摘要:目前封装的最好的Promise是axios,官方也推荐使用axios 阅读全文
posted @ 2019-06-28 16:43 huihuihero 阅读(765) 评论(0) 推荐(0) 编辑
摘要:``` demo:function(){ console.log("你好") } 简写: demo(){ console.log("你好") } ``` 阅读全文
posted @ 2019-06-28 16:08 huihuihero 阅读(233) 评论(0) 推荐(0) 编辑
摘要:删除接口,弹出模态框询问,回调函数写在一个函数里 productDelete=(productInfo)= { Modal.confirm({ title:"删除产品", content: , centered:true, okText:"确定", cancelText:"取消", onOk:asy 阅读全文
posted @ 2019-06-20 18:24 huihuihero 阅读(555) 评论(0) 推荐(0) 编辑
摘要:debugger会在当前代码行迅速打断点,以便程序员查错。 此外,debugger也可以用来判断参数个数 阅读全文
posted @ 2019-06-19 18:21 huihuihero 阅读(755) 评论(0) 推荐(0) 编辑
摘要:async:我的理解是,异步,就是在执行到我的时候,如果我无法立即执行,你可以暂时忽略我继续向下执行,等其他的执行完了,你再来执行我。 await:必须要写在async之后,await后面紧跟着一个函数作用域。就是在执行到我(await)时,你要等待紧跟我之后的函数执行完,你再往下执行。但是我这个函 阅读全文
posted @ 2019-06-17 18:48 huihuihero 阅读(132) 评论(0) 推荐(0) 编辑
摘要:一.行间定义事件后面使用bind绑定this 二.在构造函数内部声明this指向 三.声明事件时将事件等于一个箭头函数 四.行间定义事件使用箭头函数 阅读全文
posted @ 2019-06-15 17:39 huihuihero 阅读(547) 评论(0) 推荐(0) 编辑
摘要:普通函数 普通函数中的this,普通函数中的this表示调用此函数时的对象,如下例: 箭头函数 箭头函数中的this,资料上说的箭头函数内部是没有this的,也就是说,箭头函数里面的this会继承自外部的this,下面有个例子,用来详细说明下: 由于箭头函数不绑定this, 它会捕获其所在(即定义的 阅读全文
posted @ 2019-06-15 17:32 huihuihero 阅读(1599) 评论(0) 推荐(1) 编辑
摘要:本文转自https://www.cnblogs.com/whybxy/p/7645578.html ES6 Promise 用法讲解 Promise是一个构造函数,自己身上有all、reject、resolve这几个眼熟的方法,原型上有then、catch等同样很眼熟的方法。 那就new一个 Pro 阅读全文
posted @ 2019-06-09 23:48 huihuihero 阅读(325) 评论(0) 推荐(0) 编辑
摘要:####mock 伪造虚拟数据接口,用于测试 easymock: https://www.easy-mock.com/login mock.js ####JSONplaceholder 伪造虚拟数据接口,用于测试 http://jsonplaceholder.typicode.com/ ####np 阅读全文
posted @ 2019-06-09 18:31 huihuihero 阅读(192) 评论(0) 推荐(0) 编辑
摘要:搭建react整体框架 解决react脚手架不支持less的问题 react项目文件层次架构 src/utils/iconfont.js src/api/config.js src/api/index.js src/api/statecode.js src/api/login.js import a 阅读全文
posted @ 2019-06-08 12:20 huihuihero 阅读(688) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示