From 34e7681fd12b1c4e4994d3bea1a553870e10bc50 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期六, 11 三月 2023 17:58:54 +0800
Subject: [PATCH] 2023-03-11

---
 src/templates/sharecomponent/fieldscomponent/editcard/index.jsx |   29 ++++++++++++++++-------------
 1 files changed, 16 insertions(+), 13 deletions(-)

diff --git a/src/templates/sharecomponent/fieldscomponent/editcard/index.jsx b/src/templates/sharecomponent/fieldscomponent/editcard/index.jsx
index c6d82e3..d4eb344 100644
--- a/src/templates/sharecomponent/fieldscomponent/editcard/index.jsx
+++ b/src/templates/sharecomponent/fieldscomponent/editcard/index.jsx
@@ -11,18 +11,23 @@
     super(props)
 
     let _type = props.card.type
-    if (props.type === 'columns') {
-      if (_type === 'date' || _type === 'datetime') {
-        _type = 'text'
+
+    if (!props.card.origin) {
+      if (props.type === 'columns') {
+        if (_type !== 'number') {
+          _type = 'text'
+        }
+      } else if (props.type === 'search') {
+        if (_type !== 'select') {
+          _type = 'text'
+        }
+      } else if (props.type === 'form') {
+        if (_type === 'datetime' || _type === 'date') {
+          _type = 'date'
+        } else if (_type !== 'number') {
+          _type = 'text'
+        }
       }
-    } else if (props.type === 'search') {
-      if (_type === 'number') {
-        _type = 'text'
-      } else if (_type === 'datetime') {
-        _type = 'daterange'
-      }
-    } else if (props.type === 'form') {
-      
     }
 
     this.state = {
@@ -78,14 +83,12 @@
           <Radio.Group onChange={this.changeType} value={card.type} disabled={!card.selected || card.origin}>
             <Radio value="text">text</Radio>
             <Radio value="select">select</Radio>
-            <Radio value="daterange">dateRange</Radio>
           </Radio.Group> : null
         }
         {type === 'columns' ?
           <Radio.Group onChange={this.changeType} value={card.type} disabled={!card.selected || card.origin}>
             <Radio value="text">text</Radio>
             <Radio value="number">number</Radio>
-            <Radio value="picture">picture</Radio>
           </Radio.Group> : null
         }
         {type === 'form' ?

--
Gitblit v1.8.0