react-dnd使用说明及列表位置切换案例
案例
dnd.tsx
import React, { useState, useRef } from 'react'
import "./dnd.less"
// react-dnd核心
import { DndProvider } from "react-dnd"
import { HTML5Backend } from "react-dnd-html5-backend"
import Item from "./components/item"
const dnd: React.FC = (props: any) => {
const types = {
item: 'item',
}
const [list, setlist] = useState([1, 2, 3, 4])
return (
{/* 只有 的子孙元素才能使用 react-d
相关内容
- Microsoft Free Built-in VPN in Edge Browser
- [5 Mins Docker] Build an AI-driven Online Chart Editor – Next-AI-Draw.io
- Azure Free DB (Azure SQL Database – Always free, Azure Database for MySQL – 12 Months)
- A free version of ChatGPT – Free 2.5 Years until June 2027
- Free 12 Months Google Gemini AI Pro (Bypass Student Verification)
- Upgrade FreeRDP to 2.11.7+dfsg1-6~deb12u1 for Guacamole Installation on Debian 12

共有 0 条评论