From 8d7c3eed8bdac1e77c8de90a3227d801708c358e Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 15 五月 2023 21:12:56 +0800
Subject: [PATCH] 2023-05-15

---
 src/templates/sharecomponent/fieldscomponent/index.jsx |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/src/templates/sharecomponent/fieldscomponent/index.jsx b/src/templates/sharecomponent/fieldscomponent/index.jsx
index 4d8d96f..c493ccd 100644
--- a/src/templates/sharecomponent/fieldscomponent/index.jsx
+++ b/src/templates/sharecomponent/fieldscomponent/index.jsx
@@ -197,7 +197,13 @@
           required: 'true'
         }
 
-        if (item.type === 'text' && item.length >= 256) {
+        if (/^icon|images?$/ig.test(item.field)) {
+          newcard.type = 'fileupload'
+          newcard.fileType = 'picture-card'
+          newcard.fieldlength = item.length || 512
+          newcard.maxSize = 1
+          newcard.maxfile = 1
+        } else if (item.type === 'text' && item.length >= 256) {
           newcard.type = 'textarea'
           newcard.required = 'false'
           newcard.fieldlength = item.length

--
Gitblit v1.8.0