From 86aab033b5129b00651b716ee70ce871cf670008 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 31 三月 2020 20:12:30 +0800 Subject: [PATCH] 2020-03-31 --- src/templates/zshare/dragelement/index.jsx | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/templates/zshare/dragelement/index.jsx b/src/templates/zshare/dragelement/index.jsx index 934db4b..26f543b 100644 --- a/src/templates/zshare/dragelement/index.jsx +++ b/src/templates/zshare/dragelement/index.jsx @@ -5,10 +5,11 @@ import { Col, Icon } from 'antd' import Utils from '@/utils/utils.js' import Card from './card' +import ActionCard from './actioncard' import ItemTypes from './itemtypes' import './index.scss' -const Container = ({list, setting, gridBtn, type, placeholder, handleList, handleMenu, deleteMenu, copyElement, profileMenu, handleGridBtn, showfield }) => { +const Container = ({list, setting, gridBtn, type, placeholder, handleList, handleMenu, deleteMenu, copyElement, profileMenu, handleGridBtn, showfield, doubleClickCard }) => { let target = null const [cards, setCards] = useState(list) @@ -38,6 +39,11 @@ const profileCard = id => { const { card } = findCard(id) profileMenu(card) + } + + const doubleClickBtn = id => { + const { card } = findCard(id) + doubleClickCard(card) } const delCard = id => { @@ -203,7 +209,7 @@ return ( <div ref={drop} className="ant-row"> {type === 'action' && cards.map(card => ( - <Card + <ActionCard key={card.uuid} id={`${card.uuid}`} type={type} @@ -215,6 +221,7 @@ profileCard={profileCard} findCard={findCard} hasDrop={hasDrop} + doubleClickCard={doubleClickBtn} /> ))} {type === 'search' && cards.map(card => ( -- Gitblit v1.8.0