学习笔记
hhh
这个作者很懒,什么都没留下…
展开
-
Element-plus 的Cascader 级联选择器 如何自定义Props
1、在el-cascader中设置props;2、设置customProps值;旨在分享~~~~~~~~~~4、最后实现效果可使用。原创 2022-09-06 09:30:04 · 3429 阅读 · 2 评论 -
手撕 Promise
基于ES6 ,使用class实现:// 实现promiseconst PENDING = 'pending';const FULFILLED = 'fulfilled';const REJECTED = 'rejected';class MPromise { // 存储 then 返回callback 的空数组 FULFILLED_CALLBACK_LIST = []; REJECTED_CALLBACK_LIST = []; _status = PENDING;原创 2021-09-26 17:14:58 · 111 阅读 · 0 评论 -
PromiseA+规范(学习笔记)
**了解术语:**1、promise 是一个有 then 方法的对象或者函数,行为遵循本规范;2、thenable 是一个有 then 方法的对象或者函数;3、value 是 promise 状态成功的值, 也就是 resolve 的参数, resolve 的参数包括各种参数类型, 也包括 undefined/thenable 或者是promise;4、reason 是 promise 状态失败的值, 也就是 reject 的参数, 表示拒绝的原因;5、exception 是一个使用 thro原创 2021-09-26 15:19:29 · 154 阅读 · 0 评论