This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import ReactDOM from "react-dom"; | |
const Circle = () => { | |
const [position, setPosition] = React.useState({ | |
x: 100, | |
y: 100, | |
active: false, | |
offset: { } | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 判断两个数组是否相等 | |
* 浅度相等:两数组toString一样 | |
* 深度相等的判断规则: | |
* 1.长度相等 | |
* 2.俩数组的每一项: | |
* 若为数组:参考本函数规则。 | |
* 若为对象:参考equalObject的规则。 | |
* 其他的数据类型,要求===判断为true | |
* @param {[type]} arr1 |