From f895e8af9e6a393f71fec0dc26fdf1b9b6616cb4 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 11 十二月 2020 18:53:04 +0800 Subject: [PATCH] 2020-12-11 --- src/menu/components/card/cardcellcomponent/dragaction/index.jsx | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/menu/components/card/cardcellcomponent/dragaction/index.jsx b/src/menu/components/card/cardcellcomponent/dragaction/index.jsx index 49267a8..119bcd2 100644 --- a/src/menu/components/card/cardcellcomponent/dragaction/index.jsx +++ b/src/menu/components/card/cardcellcomponent/dragaction/index.jsx @@ -8,7 +8,7 @@ import Action from './action' import './index.scss' -const Container = ({list, handleList, handleMenu, deleteMenu, profileAction, handleStyle, handleSubConfig }) => { +const Container = ({list, handleList, handleMenu, deleteMenu, profileAction, handleStyle, dropButton, handleSubConfig }) => { const [cards, setCards] = useState(list) const moveCard = (id, atIndex) => { const { card, index } = findCard(id) @@ -91,7 +91,11 @@ const [, drop] = useDrop({ accept: 'action', - drop() {} + drop(item) { + const { index } = findCard(item.id) + if (index > -1) return + dropButton(item.id) + } }) return ( -- Gitblit v1.8.0