From 4f02278c94b76f231ba24673db4bc258b11e64a8 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 15 四月 2021 20:44:33 +0800
Subject: [PATCH] 2021-04-15

---
 src/tabviews/custom/components/share/normalTable/index.jsx |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/src/tabviews/custom/components/share/normalTable/index.jsx b/src/tabviews/custom/components/share/normalTable/index.jsx
index f471844..e32c343 100644
--- a/src/tabviews/custom/components/share/normalTable/index.jsx
+++ b/src/tabviews/custom/components/share/normalTable/index.jsx
@@ -15,7 +15,11 @@
 
 const { Paragraph } = Typography
 const CardCellComponent = asyncComponent(() => import('@/tabviews/custom/components/card/cardcellList'))
-
+const PicRadio = {
+  '4:3': '75%', '3:2': '66.67%', '16:9': '56.25%', '2:1': '50%', '3:1': '33.33%', '4:1': '25%',
+  '5:1': '20%', '6:1': '16.67%', '7:1': '14.29%', '8:1': '12.5%', '9:1': '11.11%',
+  '10:1': '10%', '3:4': '133.33%', '2:3': '150%', '9:16': '177.78%'
+}
 class BodyRow extends React.Component {
   shouldComponentUpdate (nextProps, nextState) {
     return !is(fromJS(this.props.data), fromJS(nextProps.data)) || !is(fromJS(this.props.className), fromJS(nextProps.className))
@@ -272,12 +276,8 @@
       let cols = 24 / (col.picSort || 1)
       let paddingTop = '100%'
 
-      if (col.lenWidRadio === '16:9') {
-        paddingTop = '56.25%'
-      } else if (col.lenWidRadio === '3:2') {
-        paddingTop = '66.67%'
-      } else if (col.lenWidRadio === '4:3') {
-        paddingTop = '75%'
+      if (PicRadio[col.lenWidRadio]) {
+        paddingTop = PicRadio[col.lenWidRadio]
       }
 
       resProps.children = (
@@ -803,12 +803,13 @@
     }
 
     return (
-      <div className={'normal-custom-table ' + setting.tableHeader} id={tableId}>
+      <div className={`normal-custom-table ${setting.tableHeader || ''} ${setting.mode || ''}`} id={tableId}>
         {(setting.tableType === 'radio' || setting.tableType === 'checkbox') && data && data.length > 0 ?
-          <Switch title="鏀惰捣" className="main-pickup" checkedChildren="寮�" unCheckedChildren="鍏�" defaultChecked={pickup} onChange={this.pickupChange} /> : null
+          <Switch title="鏀惰捣" className="main-pickup" checkedChildren="寮�" unCheckedChildren="鍏�" checked={pickup} onChange={this.pickupChange} /> : null
         }
         <Table
           components={components}
+          style={setting.style}
           size={setting.size || 'middle'}
           bordered={setting.bordered !== 'false'}
           rowSelection={rowSelection}

--
Gitblit v1.8.0