- 博客(8)
- 收藏
- 关注
原创 react hook中移动端拖拽怎么写
tsx代码import React, { useState, useRef, useEffect } from "react";import "./home.less"interface collag {}export default function Drag() { let x: number = 0 let y: number = 0 let disX: number = 0 let disY: number = 0 const dragbox = useRef&l
2022-04-02 15:11:06
1028
原创 react hook中PC端拖拽怎么写
tsx中的代码import React, { useState,useRef, useEffect } from "react";import "./new.less"interface collag{}export default function Drag() { let x:number=0 let y:number=0 let pagex:number=0 let pagey:number=0 const Box=():HTMLDivElement=>{
2022-04-02 15:07:16
590
原创 react hook选项卡
import { useState } from "react"import "./contor.less"interface demo { id: string; text: string;}export default function Contact() { const [Array] = useState<demo[]>([ { id: '1', text: "按钮一" }, { id: '2', .
2022-04-02 10:16:05
897
原创 Typescript选项卡
直接代码html部分 render() { let ButArray = this.state.ButArray let ContArray = this.state.ContArray let ButIndex = this.state.ButIndex return (<div className="tabka"> {ButArray.map((item, index) => <
2021-09-16 19:35:47
186
原创 Typescript拖拽
html代码写在Tsx中render部分render(){return(<divref={this.dragElement}className="drag"onMouseDown={this.FnDown.bind(this)}></div>)}js部分interface Props {}interface State {}class Drag extends Component...
2021-09-16 19:27:05
185
原创 react配置less
1.修改源查看源npm config get registry2默认源npm config set registry https://registry.npmjs.org3切换淘宝源npm config set registryhttps://registry.npm.taobao.org2.创建react项目npm install -g create-react-appcreate-react-app 项目名称3.在react中配置less安装lessnpm ins
2021-09-01 20:05:09
87
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人