From a1fb5b20c21ddcea148bb291a86afdc327796c85 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 03 十一月 2022 12:57:35 +0800
Subject: [PATCH] 2022-11-03

---
 src/views/billprint/index.jsx |   28 +++++++++++++++++-----------
 1 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/src/views/billprint/index.jsx b/src/views/billprint/index.jsx
index aaf2548..517c785 100644
--- a/src/views/billprint/index.jsx
+++ b/src/views/billprint/index.jsx
@@ -761,69 +761,75 @@
 
   getComponents = (components) => {
     return components.map(item => {
+      let style = null
+
+      if (item.style && item.style.clear === 'left') {
+        style = {clear: 'left'}
+      }
+
       if (item.type === 'bar' || item.type === 'line') {
         return (
-          <Col span={item.width} key={item.uuid}>
+          <Col span={item.width} style={style} key={item.uuid}>
             <AntvBarAndLine config={item} initdata={item.data} mainSearch={[]} />
           </Col>
         )
       } else if (item.type === 'pie') {
         return (
-          <Col span={item.width} key={item.uuid}>
+          <Col span={item.width} style={style} key={item.uuid}>
             <AntvPie config={item} initdata={item.data} mainSearch={[]} />
           </Col>
         )
       } else if (item.type === 'scatter') {
         return (
-          <Col span={item.width} key={item.uuid}>
+          <Col span={item.width} style={style} key={item.uuid}>
             <AntvScatter config={item} initdata={item.data} mainSearch={[]}/>
           </Col>
         )
       } else if (item.type === 'dashboard') {
         return (
-          <Col span={item.width} key={item.uuid}>
+          <Col span={item.width} style={style} key={item.uuid}>
             <AntvDashboard config={item} initdata={item.data} mainSearch={[]}/>
           </Col>
         )
       } else if (item.type === 'card' && item.subtype === 'datacard') {
         return (
-          <Col span={item.width} key={item.uuid}>
+          <Col span={item.width} style={style} key={item.uuid}>
             <DataCard config={item} initdata={item.data} mainSearch={[]} />
           </Col>
         )
       } else if (item.type === 'card' && item.subtype === 'propcard') {
         return (
-          <Col span={item.width} key={item.uuid}>
+          <Col span={item.width} style={style} key={item.uuid}>
             <PropCard config={item} initdata={item.data} mainSearch={[]} />
           </Col>
         )
       } else if (item.type === 'card' && item.subtype === 'tablecard') {
         return (
-          <Col span={item.width} key={item.uuid}>
+          <Col span={item.width} style={style} key={item.uuid}>
             <TableCard config={item} initdata={item.data} mainSearch={[]}/>
           </Col>
         )
       } else if (item.type === 'table' && item.subtype === 'normaltable') {
         return (
-          <Col span={item.width} key={item.uuid}>
+          <Col span={item.width} style={style} key={item.uuid}>
             <NormalTable config={item} initdata={item.data} mainSearch={[]}/>
           </Col>
         )
       } else if (item.type === 'code') {
         return (
-          <Col span={item.width} key={item.uuid}>
+          <Col span={item.width} style={style} key={item.uuid}>
             <SandBox config={item} initdata={item.data} mainSearch={[]}/>
           </Col>
         )
       } else if (item.type === 'balcony') {
         return (
-          <Col span={item.width} key={item.uuid}>
+          <Col span={item.width} style={style} key={item.uuid}>
             <Balcony config={item} initdata={item.data}/>
           </Col>
         )
       } else if (item.type === 'timeline') {
         return (
-          <Col span={item.width} key={item.uuid}>
+          <Col span={item.width} style={style} key={item.uuid}>
             <TimeLine config={item} initdata={item.data}/>
           </Col>
         )

--
Gitblit v1.8.0