react-beautiful-dnd拖拽列表排序

import { DragDropContext, Droppable, Draggable } from "react-beautiful-dnd";
// 拖拽结束回调
    onDragEnd = (result) => {
        const { source, destination, draggableId } = result;
        if (!destination) {
            return;
        }
        ...
    };
 
  
    {(provided, snapshot) => (
      
list.map((item, index) => { return ( {(provided, snapshot) => (
{/* 拖拽图标 */}
内容内容
)} ); }) {provided.placeholder}
)}

你可能感兴趣的:(react-beautiful-dnd拖拽列表排序)