From a9ac16fecc0cf9bc66dfaefe4e9b35fa3c722812 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 10 十一月 2020 16:58:43 +0800
Subject: [PATCH] 2020-11-10

---
 src/menu/components/card/cardcellcomponent/index.jsx |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/src/menu/components/card/cardcellcomponent/index.jsx b/src/menu/components/card/cardcellcomponent/index.jsx
index e533b77..3d80bc4 100644
--- a/src/menu/components/card/cardcellcomponent/index.jsx
+++ b/src/menu/components/card/cardcellcomponent/index.jsx
@@ -146,6 +146,16 @@
       }
 
       _card.innerHeight = fontSize * lineHeight * line
+    } else if (_card.eleType === 'barcode') {
+      _card.style = style
+
+      let fontSize = 14
+
+      if (_card.style.fontSize) {
+        fontSize = parseInt(_card.style.fontSize)
+      }
+
+      _card.innerHeight = _card.barHeight + (_card.displayValue === 'true' ? fontSize + 2 : 0)
     } else if (_card.eleType === 'button') { // 鎷嗗垎style
       let _style = fromJS(style).toJS()
       _card.style = {}
@@ -415,6 +425,14 @@
             if (res.eleType === 'link' && !res.style.color) {
               res.style.color = 'rgba(24, 144, 255, 1)'
             }
+          } else if (res.eleType === 'barcode') {
+            let fontSize = 14
+      
+            if (res.style && res.style.fontSize) {
+              fontSize = parseInt(res.style.fontSize)
+            }
+      
+            res.innerHeight = res.barHeight + (res.displayValue === 'true' ? fontSize + 2 : 0)
           }
           
           return res

--
Gitblit v1.8.0