摘要: const queue = { pending: null }; function dispatchAction(action, queue) { const update = { action: action, next: null }; if (queue.pending == null) { 阅读全文
posted @ 2021-11-01 00:42 码农-编程小子 阅读(44) 评论(0) 推荐(0) 编辑
摘要: 目前比较流行的三种方式react-i18nextreact-intlreact-intl-universa what is react-i18next?react-i18next is a powerful internationalization framework for React / Rea 阅读全文
posted @ 2021-10-27 14:33 码农-编程小子 阅读(637) 评论(0) 推荐(0) 编辑
摘要: React用于构建用户界面的javascript库特性 声明性 learn once组件函数组件(无状态组件)类组件(有状态组件) 组件通讯父->子子->父兄弟组件EventEmitter 组件的生命周期 事件绑定this指向 箭头函数Function.prototype.bind()类的实例函数 阅读全文
posted @ 2021-10-21 18:01 码农-编程小子 阅读(25) 评论(0) 推荐(0) 编辑
摘要: 1:数组扩展运算符 概念:扩展运算符Spread(...)是将一个数组转为用逗号分隔的参数序列 function f(...rest) { console.log(rest) }f(1,2,3) ...rest是一个逗号分隔的参数序列, 如果调用f(1,2,3),我们会打印出[1,2,3],说明re 阅读全文
posted @ 2021-10-20 14:19 码农-编程小子 阅读(86) 评论(0) 推荐(0) 编辑
摘要: 基本概念工作区暂存区版本库 git push <远程主机名> <本地分支名>:<远程分支名> 1:将本地的 master 分支推送到 origin 主机的 master 分支。$ git push origin master $ git push origin master:master origi 阅读全文
posted @ 2021-10-14 11:27 码农-编程小子 阅读(46) 评论(0) 推荐(0) 编辑
摘要: 1.函数的合成 合成两个函数const compose = function (f, g) { return function (x) { return f(g(x)); };} const compose=(arr)=>{ return function(x){ return arr.reduce 阅读全文
posted @ 2021-10-13 18:01 码农-编程小子 阅读(263) 评论(0) 推荐(0) 编辑
摘要: 由于最近项目需要自动跳转到网页某个无素的位置,所以抽了点时间来学习理清这几个高度的用处,最后的应例案例就是我需要达到的目的,虽然是很小的一个点,记录以备查用 网页的全部面积,就是它的大小。通常情况下,网页的大小由内容和CSS样式表决定。viewport:浏览器窗口的大小,指在浏览器窗口中看到的那部分 阅读全文
posted @ 2021-09-18 15:00 码农-编程小子 阅读(108) 评论(0) 推荐(0) 编辑
摘要: //保护套质地:document.querySelectorAll('#struct-bindProp .sell-catProp-struct input')[0] //款式document.querySelectorAll('#struct-bindProp .sell-catProp-stru 阅读全文
posted @ 2021-09-14 18:36 码农-编程小子 阅读(76) 评论(0) 推荐(0) 编辑
摘要: 1:构造函数 function Person(){ this.name='jeff'; this.sing=function(){ console.log('sing') } } 构造函数存在一个问题,实化化的时候无法共享属性或方法 2:Prototype原型对象 prototype这个属性包含一个 阅读全文
posted @ 2021-09-14 14:36 码农-编程小子 阅读(42) 评论(0) 推荐(0) 编辑
摘要: animation: 動畫名稱 持續時間 @keyframe 動畫名稱 { from { CSS 屬性: 值 } to { CSS 屬性: 值 } } @keyframes active { 0% { opacity: 0; transform: scale(0); } 100% { opacity 阅读全文
posted @ 2021-09-09 09:53 码农-编程小子 阅读(27) 评论(0) 推荐(0) 编辑