From b99ce8c40845653c2459dbf1d758ebead03f9183 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 02 一月 2023 21:24:29 +0800
Subject: [PATCH] 2023-01-02

---
 src/templates/zshare/modalform/datatable/index.jsx |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/src/templates/zshare/modalform/datatable/index.jsx b/src/templates/zshare/modalform/datatable/index.jsx
index 7492418..7f13956 100644
--- a/src/templates/zshare/modalform/datatable/index.jsx
+++ b/src/templates/zshare/modalform/datatable/index.jsx
@@ -201,6 +201,17 @@
           return <span style={{display: 'block', width: '70px', height: '70px'}}><img style={{width: '100%', height: '100%'}} src={text} alt="" /></span>
         }
       })
+    } else if (display === 'color') {
+      columns.push({
+        title: 'Color',
+        dataIndex: '$color',
+        inputType: 'text',
+        editable: true,
+        render: (text) => {
+          if (!text) return ''
+          return <div style={{height: '20px', background: text}}></div>
+        }
+      })
     }
 
     fields.forEach(item => {
@@ -371,6 +382,8 @@
 
     if (display === 'picture') {
       item.$url = ''
+    } else if (display === 'color') {
+      item.$color = ''
     }
 
     fields.forEach(f => {

--
Gitblit v1.8.0