From ee707c99f0b48865795a562ef4ba51810ff45ae9 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 30 十二月 2021 13:51:46 +0800
Subject: [PATCH] 2021-12-30

---
 src/templates/zshare/formconfig.jsx |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/src/templates/zshare/formconfig.jsx b/src/templates/zshare/formconfig.jsx
index 0498a8c..522f79e 100644
--- a/src/templates/zshare/formconfig.jsx
+++ b/src/templates/zshare/formconfig.jsx
@@ -2362,6 +2362,11 @@
     })
   }
 
+  let initval = card.initval || ''
+  if (card.type === 'switch') {
+    initval = card.initval === true
+  }
+
   return [
     {
       type: 'text',
@@ -2391,7 +2396,7 @@
       type: 'text',
       key: 'initval',
       label: Formdict['header.form.initval'],
-      initVal: card.initval || '',
+      initVal: initval,
       required: false
     },
     {

--
Gitblit v1.8.0