![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
hook
是晶晶
你的努力里,藏着父母暮年的欢喜
展开
-
函数组件Hooks+ts 拖拽
import { useState, useRef } from "react";import './Tab.less'export default function Fn() { // 获取盒子 const Drag = useRef<HTMLDivElement | null>(null) // 封装盒子 const getDrag = (): HTMLDivElement => { return Drag.current as H.原创 2022-04-02 20:41:40 · 303 阅读 · 0 评论 -
函数组件Hook+Ts 选项卡
ts代码:import { useState} from "react";import './Tab.less'interface iButtonList { ID: string text: string}export default function Fn() { const [ButtonList] = useState<iButtonList[]>([ { ID: 'bt1', text原创 2022-04-02 20:38:20 · 528 阅读 · 0 评论