king
2022-10-12 53b9fb93d0376eb02bb996935f1720b4e95cd897
src/tabviews/custom/components/share/normalTable/index.jsx
@@ -16,6 +16,7 @@
const { Paragraph } = Typography
const CardCellComponent = asyncComponent(() => import('@/tabviews/custom/components/card/cardcellList'))
const MkPicture = asyncComponent(() => import('@/components/mkPicture'))
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%',
@@ -177,15 +178,17 @@
      }
      if (content !== '') {
        let decimal = col.decimal || 0
        if (col.round) {
          content = Math.round(content * col.round) / col.round
        }
        if (col.format === 'percent') {
          content = content * 100
          decimal = decimal > 2 ? decimal - 2 : 0
        } else if (col.format === 'abs') {
          content = Math.abs(content)
        }
        content = content.toFixed(decimal)
        if (col.round) {
          content = content.toFixed(col.decimal)
        }
  
        if (col.format === 'thdSeparator') {
          content = content.replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,')
@@ -240,7 +243,6 @@
        photos = photos.split(',').filter(Boolean)
      }
      let cols = 24 / (col.picSort || 1)
      let paddingTop = '100%'
      let scale = col.scale === 'true'
@@ -250,12 +252,9 @@
      resProps.children = (
        <div>
          {photos && photos.map((url, i) => (
            <Col key={i} span={cols}>
              <div className={'ant-mk-picture' + (scale ? ' scale' : '')} onClick={() => {
                if (!scale) return
                MKEmitter.emit('mkImageScale', url, photos)
              }} style={{paddingTop, backgroundImage: `url('${url}')`}}></div>
          {photos.map((url, i) => (
            <Col key={i} span={col.span || 24}>
              <MkPicture style={{paddingTop}} scale={scale} url={url} urls={photos}/>
            </Col>
          ))}
        </div>