From e603c97dbe7a4f1dbd6445e00383ed651182e0fe Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 03 三月 2020 17:09:11 +0800 Subject: [PATCH] 2020-03-03 --- src/templates/formtabconfig/dragelement/card.jsx | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/src/templates/formtabconfig/dragelement/card.jsx b/src/templates/formtabconfig/dragelement/card.jsx index 9bf2c1f..00f0036 100644 --- a/src/templates/formtabconfig/dragelement/card.jsx +++ b/src/templates/formtabconfig/dragelement/card.jsx @@ -8,7 +8,7 @@ const { MonthPicker } = DatePicker const { TextArea } = Input -const Card = ({ id, type, cols, card, moveCard, findCard, editCard, delCard, profileCard, hasDrop }) => { +const Card = ({ id, type, cols, card, moveCard, findCard, editCard, delCard, profileCard, hasDrop, copyCard }) => { const originalIndex = findCard(id).index const [{ isDragging }, drag] = useDrag({ item: { type: ItemTypes[type], id, originalIndex }, @@ -40,6 +40,10 @@ const del = () => { delCard(id) + } + + const copy = () => { + copyCard(id) } const profile = () => { @@ -91,6 +95,7 @@ <div className={'ant-col ant-form-item-label ant-col-xs-24 ' + labelCol}> <label title={card.label}>{card.label}</label> <Icon className="edit" title="缂栬緫" type="edit" onClick={edit} /> + <Icon className="edit copy" title="澶嶅埗" type="copy" onClick={copy} /> <Icon className="edit close" title="鍒犻櫎" type="close" onClick={del} /> </div> <div className={'ant-col ant-form-item-control-wrapper ant-col-xs-24 ' + wrapCol}> -- Gitblit v1.8.0