- 博客(2)
- 收藏
- 关注
原创 canvas绘制中国象棋
const draw = (id) => { let pieces = [ //黑 { x: 0, y: 0, name: "車", type: "black" }, { x: 1, y: 0, name: "馬", type: "black" }, { x: 2, y: 0, name: "象", type: "black" }, { x: 3, y: 0, name: "仕", type: "black".
2021-08-27 03:31:14 447 1
原创 自定义封装Promise对象
自定义封装Promise对象//声明构造函数function selfPromise(executor) { //添加属性 this.promiseState = "pending"; this.promiseResult = null; //用于保存回调函数 this.callbacks = []; const self = this; //resolve函数 function resolve(data) { //确保pr
2021-03-12 17:42:25 189
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人