使用react-beautiful-dnd进行拖拽
使用:npm i react-beautiful-dnd
在项目组件中使用如下:
class组件代码:
import React, { Component } from "react";
import { DragDropContext, Droppable, Draggable } from "react-beautiful-dnd";
//初始化数据
const getItems = count =>
Array.from({ length: count }, (v, k) => k
原创
2021-03-01 15:47:21 ·
1061 阅读 ·
7 评论