摘要:
https://github.com/streamich/react-use 阅读全文
摘要:
Sandbox 沙箱 在现实与我们前端相关的场景中,我们平时使用的浏览器就是一个沙箱,运行在浏览器中的 JavaScript 代码无法直接访问文件系统、显示器或其他任何硬件。Chrome 浏览器中每个标签页也是一个沙箱,各个标签页内的数据无法直接相互影响,接口都在独立的上下文中运行。 在微前端架构是 阅读全文
摘要:
padding-bottom: constant(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom); 阅读全文
摘要:
骨骼动画 首先我们想要了解骨骼动画的写法,就得去了解Tiyjs。骨骼动画是基于tinyjs平台二次开发的插件运用。 官网地址: http://tinyjs.net/guide/ 插件种类: 在官网插件平台上,我们似乎可以找到三个有关骨骼动画的插件平台。spine,creature,dragonbon 阅读全文
摘要:
场景:比如我们在进行一些图片分享链接时,要进行一些特定连接的字符串拼接。这个时候就需要对我们的链接进行 uri编码操作。比如:百度地址:https://www.baidu.com方法:encodeURIComponent("https://www.baidu.com") //我们可以通过原生的 en 阅读全文
摘要:
async function imageToData64(Url) { //传任意一图片地址 return new Promise((resolve, reject) => { let image = new Image(); image.src = itemUrl; image.crossOrig 阅读全文
摘要:
码之根本,在于规则。温故而知新,可以为师矣!ES6前,没有什么比它更适合我们学习和了解的:(以下是线上网址,也可买书) https://es6.ruanyifeng.com/ 今天就重点介绍一下ES7之后新增的特性: ES2016(ES7) Array.prototype.includes() in 阅读全文
摘要:
//防止连点 const canHamdle = useRef(true); function onHandleSubmit() { if (!canHamdle.current) { return } else { fun something(); canHamdle.current = fals 阅读全文
摘要:
dayjs('2021-10-19').diff('2021-11-18', 'day')) 阅读全文
摘要:
import { createElement, useEffect, useState } from 'rax'; import View from 'rax-view'; import classnames from 'classnames'; import { isValidNumber } f 阅读全文