From 6c16e43cd6521460c804391c042348dbb14086fc Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 16 六月 2020 09:44:40 +0800
Subject: [PATCH] 2020-06-16

---
 src/templates/zshare/formconfig.jsx |  129 ++++++++++++++++++++++++++++++++++--------
 1 files changed, 103 insertions(+), 26 deletions(-)

diff --git a/src/templates/zshare/formconfig.jsx b/src/templates/zshare/formconfig.jsx
index cc32c26..e009610 100644
--- a/src/templates/zshare/formconfig.jsx
+++ b/src/templates/zshare/formconfig.jsx
@@ -1664,6 +1664,21 @@
       }]
     },
     {
+      type: 'radio',
+      key: 'insert',
+      label: '娣诲姞鍗$墖',
+      initVal: card.insert || 'false',
+      tooltip: '閫夋嫨鏄剧ず娣诲姞鍗$墖锛屼笖瀛樺湪鎿嶄綔绫诲瀷涓烘坊鍔犵殑鎸夐挳鏃讹紝鍗$墖灏鹃儴浼氬鍔犳坊鍔犲姛鑳藉崱鐗囷紙鍙樉绀虹涓�涓坊鍔犳寜閽級',
+      required: false,
+      options: [{
+        value: 'true',
+        text: '鏄剧ず'
+      }, {
+        value: 'false',
+        text: '闅愯棌'
+      }]
+    },
+    {
       type: 'multiselect',
       key: 'blacklist',
       label: Formdict['header.form.blacklist'],
@@ -2464,11 +2479,11 @@
  * @description 鑾峰彇鍗$墖璇︽儏琛ㄥ崟閰嶇疆淇℃伅
  * @param {object} card  // 鏍囩閰嶇疆淇℃伅
  */
-export function getCardDetailForm (card, _columns, _type, _actions = []) {
+export function getCardDetailForm (card, _columns, _type, _actions = [], isRatioCard) {
   let actions = ''
   if (_type === 'bottom') {
     actions = card.actions ? card.actions.map(cell => cell.value) : []
-  } else {
+  } else if (_type === 'header') {
     _actions.unshift({
       value: '',
       text: '绌�'
@@ -2524,46 +2539,93 @@
       options: _columns
     },
     {
-      type: 'radio',
-      key: 'bold',
-      label: '鍔犵矖',
-      initVal: card.bold || 'false',
+      type: 'number',
+      key: 'fontSize',
+      min: 12,
+      max: 50,
+      label: '瀛椾綋澶у皬',
+      initVal: card.fontSize || 14,
+      required: true,
+      forbid: !['detail'].includes(_type)
+    },
+    {
+      type: 'select',
+      key: 'fontWeight',
+      label: '瀛椾綋绮楃粏',
+      initVal: card.fontWeight || 'normal',
       required: true,
       forbid: !['detail'].includes(_type),
       options: [{
-        value: 'true',
-        text: '鏄�'
+        value: 'normal',
+        text: '姝e父'
       }, {
-        value: 'false',
-        text: '鍚�'
+        value: 'bold',
+        text: 'bold'
+      }, {
+        value: 'bolder',
+        text: 'bolder'
+      }, {
+        value: 'lighter',
+        text: 'lighter'
+      }, {
+        value: '100',
+        text: '100'
+      }, {
+        value: '200',
+        text: '200'
+      }, {
+        value: '300',
+        text: '300'
+      }, {
+        value: '400',
+        text: '400'
+      }, {
+        value: '500',
+        text: '500'
+      }, {
+        value: '600',
+        text: '600'
+      }, {
+        value: '700',
+        text: '700'
+      }, {
+        value: '800',
+        text: '800'
+      }, {
+        value: '900',
+        text: '900'
       }]
     },
     {
-      type: 'radio',
+      type: 'number',
       key: 'width',
-      label: '瀹藉害',
-      initVal: card.width || '',
-      required: false,
-      forbid: !['detail'].includes(_type),
-      options: [{
-        value: '',
-        text: '100%'
-      }, {
-        value: 'helf',
-        text: '50%'
-      }, {
-        value: 'third',
-        text: '33.3%'
-      }]
+      min: 10,
+      max: 100,
+      precision: 1,
+      label: '瀹藉害(%)',
+      initVal: card.width || 100,
+      required: true,
+      forbid: !['detail'].includes(_type)
+    },
+    {
+      type: 'number',
+      key: 'height',
+      min: 1,
+      max: 10,
+      label: '楂樺害(琛�)',
+      initVal: card.height || 1,
+      required: true,
+      forbid: !['detail'].includes(_type)
     },
     {
       type: 'radio',
       key: 'widthType',
       label: '瀹藉害璁剧疆',
-      initVal: card.widthType || 'absolute',
+      initVal: card.widthType || 'ratio',
       required: false,
       forbid: !['avatar'].includes(_type),
       hidden: true,
+      readonly: !!isRatioCard,
       options: [{
         value: 'ratio',
         text: '姣斾緥'
@@ -2584,6 +2646,21 @@
       forbid: !['avatar'].includes(_type)
     },
     {
+      type: 'radio',
+      key: 'radius',
+      label: '鍦嗚',
+      initVal: card.radius || 'true',
+      required: false,
+      forbid: !['avatar'].includes(_type),
+      options: [{
+        value: 'true',
+        text: '鏈�'
+      }, {
+        value: 'false',
+        text: '鏃�'
+      }]
+    },
+    {
       type: 'number',
       key: 'size',
       label: '瀛椾綋澶у皬',

--
Gitblit v1.8.0