React + TypeScript 实现小球互推 小球交叉
index.tsx
import { Component } from "react";
import './Small-ball.less';
interface Props {
}
interface State {
Num: number,
MaxNum: number,
}
class Drag extends Component
constructor(props: Props) {
super(props);
this.state = {
Num: 0,
MaxNum: 100
}
}
parent?: HTMLDivElement;
child!: HTMLCollection;
startX: number = 0;
ballW: number = 0;
oW: number = 0;
x: number = 0;
dis: number = 0;
Num: number = 0;
MaxN
共有 0 条评论