摘要: 共同点 改变this指向 不同点 1.call 立即执行,参数为call({},1,2,3) 2.bind 返回回调函数,参数为bind({},1,2,3)(), 3.apply 立即执行,参数为apply({},[1,2,3]),参数是一个数组 阅读全文
posted @ 2021-03-31 14:49 很小的小雨 阅读(53) 评论(0) 推荐(0) 编辑
摘要: demo列表 https://www.makeapie.com/explore.html#sort=rank~timeframe=all~author=all 阅读全文
posted @ 2021-02-09 18:32 很小的小雨 阅读(28) 评论(0) 推荐(0) 编辑
摘要: dart的库地址: https://pub.dev/ 从零开始的todolist: https://blog.csdn.net/hsoldier/article/details/110756734 从零开始的组件使用 https://www.jianshu.com/p/101d943f71fc?ut 阅读全文
posted @ 2021-01-05 15:54 很小的小雨 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 基本类型 numbers (1) int 整数值不大于64位,这取决于平台。在DART VM上,值可以从-263到262。但是要编译成JavaScript,所以dart得数值允许值从-2的53次幂到2的53次幂-1。 (2) double 双精度浮点数 string boolean list (也被 阅读全文
posted @ 2021-01-05 14:22 很小的小雨 阅读(86) 评论(0) 推荐(0) 编辑
摘要: 一、使用ref配合 setNativeProps setNativeProps方法可以理解为web的直接修改dom。使用该方法修改View、Text等RN自带的组件,则不会触发组件的componentWillReceiveProps、shouldComponentUpdate、componentWi 阅读全文
posted @ 2020-12-14 14:37 很小的小雨 阅读(203) 评论(0) 推荐(0) 编辑
摘要: git clone *********** 拉取项目 git branch ** 1、查看当前分支,2、创建本地分支 git checkout -b *** 切换分支, 如果过切换本地创建的分支,去掉-b git add (./文件名) 将文件存放在暂存区 git commit -m '***' 提 阅读全文
posted @ 2020-12-07 10:58 很小的小雨 阅读(60) 评论(0) 推荐(0) 编辑
摘要: 创建数据的方式 const map = immutable.Map({ a : 1, b : 2, c : { f : 5 } }) const map = immutable.fromJS({ a:1, b:2, c:3, d : { f : 4 } }) const list = immutab 阅读全文
posted @ 2020-12-02 18:09 很小的小雨 阅读(281) 评论(0) 推荐(0) 编辑
摘要: 树形结构 let tree = [{ id: '01000000', text: '北京', children: [{ id: '01001000', text: '北京市', children: [ { id: '01001001', text: '西城区', children: null, }, 阅读全文
posted @ 2020-12-02 10:13 很小的小雨 阅读(1485) 评论(0) 推荐(0) 编辑
摘要: all的使用 function getJSON(id) { return new Promise((res,rej)=>{ setTimeout(()=>{ res(id) },1000) }) } // 生成一个Promise对象的数组 const promises = [2, 3, 5, 7, 阅读全文
posted @ 2020-10-12 17:41 很小的小雨 阅读(114) 评论(0) 推荐(0) 编辑
摘要: 1、防抖 /** * 防抖,当某一事件触发结束后,然后再去触发相应的函数 * */ function debounce(func, ms = 1000) { let timer; return function (...args) { if (timer) { clearTimeout(timer) 阅读全文
posted @ 2020-09-23 10:46 很小的小雨 阅读(198) 评论(0) 推荐(0) 编辑