From 7ea1c5f53702951fc4df60e969fc67ef5d7af4dd Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 14 一月 2020 10:13:05 +0800
Subject: [PATCH] 2020-01-14

---
 src/templates/modalconfig/dragelement/index.jsx |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/src/templates/modalconfig/dragelement/index.jsx b/src/templates/modalconfig/dragelement/index.jsx
index 677b61d..ab122e1 100644
--- a/src/templates/modalconfig/dragelement/index.jsx
+++ b/src/templates/modalconfig/dragelement/index.jsx
@@ -90,12 +90,8 @@
 
       const { index: overIndex } = findCard(`${targetId}`)
       let targetIndex = overIndex
-      // if (!target) {
+
       targetIndex++
-      // }
-      // if (targetIndex < 0) {
-      //   targetIndex = 0
-      // }
 
       const _cards = update(cards, { $splice: [[targetIndex, 0, newcard]] })
       setCards(_cards)
@@ -115,9 +111,10 @@
   return (
     <div ref={drop} className="ant-row modal-fields-row">
       {cards.map(card => (
-        <Col key={card.uuid} span={card.type !== 'textarea' ? _cols : 24}>
+        <Col key={card.uuid} className={card.type === 'textarea' ? 'textarea' + setting.cols : ''} span={card.type !== 'textarea' ? _cols : 24}>
           <Card
-            id={`${card.uuid}`}
+            id={card.uuid}
+            cols={setting.cols}
             card={card}
             moveCard={moveCard}
             editCard={editCard}

--
Gitblit v1.8.0