king
2022-06-05 5a5e07a0ce81d064038ece372e7e8844157a7d1b
2022-06-05
8个文件已修改
114 ■■■■■ 已修改文件
src/menu/components/card/cardcellcomponent/dragaction/card.jsx 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/dragaction/index.scss 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardsimplecomponent/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardsimplecomponent/options.jsx 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/data-card/options.jsx 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/cardcellList/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/cardcellList/index.scss 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/index.jsx 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/dragaction/card.jsx
@@ -83,7 +83,18 @@
        <div className={'ant-mk-text line' + (card.height || '')} style={{height: card.innerHeight || 'auto'}}>{val}</div>
      )
    } else if (card.eleType === 'icon') {
      return (<MkIcon type={card.icon}/>)
      let fontSize = 14
      let lineHeight = 1.5
      if (card.style.fontSize) {
        fontSize = parseInt(card.style.fontSize)
      }
      if (card.style.lineHeight) {
        lineHeight = parseFloat(card.style.lineHeight)
      }
      let innerHeight = fontSize * lineHeight
      return (<MkIcon style={{height: innerHeight}} className="ant-mk-icon" type={card.icon}/>)
    } else if (card.eleType === 'slider') {
      let val = card.value ? (card.value / card.maxValue) * 100 : 30
      return <MkProgress value={val} config={card}/>
src/menu/components/card/cardcellcomponent/dragaction/index.scss
@@ -1,4 +1,5 @@
.card-detail-row {
  line-height: 1.5;
  .ant-mk-text {
    font-style: inherit;
    font-weight: inherit;
@@ -122,6 +123,10 @@
    background-position: center center;
    background-repeat: no-repeat;
  }
  .ant-mk-icon {
    vertical-align: top;
    line-height: inherit;
  }
  .ant-switch-large {
    min-width: 60px;
    height: 30px;
src/menu/components/card/cardsimplecomponent/index.jsx
@@ -151,7 +151,7 @@
          })
        }
      })
      return getTableSetting(card.setting, cards.columns, buttons)
      return getTableSetting(card.setting, cards.columns, buttons, cards.action)
    } else {
      return getCarouselSetting(card.setting, cards.subtype === 'propcard')
    }
src/menu/components/card/cardsimplecomponent/options.jsx
@@ -1,7 +1,7 @@
/**
 * @description tablecard setting表单配置信息
 */
export function getTableSetting (setting, columns, buttons = []) {
export function getTableSetting (setting, columns, buttons = [], action = []) {
  let _columns = columns.map(item => ({value: item.field, label: item.label}))
  _columns.push({value: '$Index', label: '序号(前端)'})
  let appType = sessionStorage.getItem('appType')
@@ -147,6 +147,18 @@
      initval: setting.linkbtn || '',
      required: true,
      options: buttons
    },
    {
      type: 'radio',
      field: 'swipe',
      label: '滑动按钮',
      initval: setting.swipe || 'true',
      required: false,
      options: [
        {value: 'true', label: '显示'},
        {value: 'false', label: '不显示'},
      ],
      forbid: action.length === 0 || appType !== 'mob'
    }
  ]
src/menu/components/card/data-card/options.jsx
@@ -171,7 +171,8 @@
        {value: 'false', label: '无'},
        {value: 'init', label: '初始化'},
        {value: 'always', label: '数据加载'},
      ]
      ],
      forbid: subtype === 'tablecard'
    },
    {
      type: 'select',
@@ -186,8 +187,8 @@
        {value: 'backFont', label: '背景+文字'},
        {value: 'font', label: '文字'},
        ...(subtype === 'datacard' && appType === 'mob' ? [{value: 'check', label: '勾选'}] : [])
      ]
      // forbid: subtype !== 'propcard'
      ],
      forbid: subtype === 'tablecard'
    },
    // {
    //   type: 'radio',
@@ -440,7 +441,7 @@
      initval: wrap.slidetip || wrap.slidetip === '' ? wrap.slidetip : '没有更多了',
      tooltip: '滑动加载至底部时的提示信息。',
      required: false,
      forbid: appType !== 'mob'
      forbid: appType !== 'mob' || subtype === 'propcard'
    },
    {
      type: 'table',
src/tabviews/custom/components/card/cardcellList/index.jsx
@@ -463,8 +463,8 @@
        <Col key={card.uuid} span={card.width}>
          <div style={card.style}>
            {val ? <Tooltip title={val}>
              <MkIcon type={card.icon}/>
            </Tooltip> : <MkIcon type={card.icon}/>}
              <MkIcon className="ant-mk-icon" style={{height: card.innerHeight || 'auto'}} type={card.icon}/>
            </Tooltip> : <MkIcon className="ant-mk-icon" style={{height: card.innerHeight || 'auto'}} type={card.icon}/>}
          </div>
        </Col>
      )
src/tabviews/custom/components/card/cardcellList/index.scss
@@ -1,6 +1,8 @@
.card-cell-list {
  position: relative;
  line-height: 1.5;
  .ant-btn {
    padding: 0;
  }
@@ -162,6 +164,10 @@
  .ant-mk-picture.scale {
    cursor: zoom-in;
  }
  .ant-mk-icon {
    vertical-align: top;
    line-height: inherit;
  }
  .ant-switch-large {
    min-width: 60px;
    height: 30px;
src/tabviews/custom/index.jsx
@@ -569,6 +569,18 @@
              col.elements = col.elements.map(cell => {
                if (['text', 'number', 'link'].includes(cell.eleType) && !cell.height) {
                  cell.innerHeight = 'auto'
                } else if (cell.eleType === 'icon') {
                  let fontSize = 14
                  let lineHeight = 1.5
                  if (cell.style.fontSize) {
                    fontSize = parseInt(cell.style.fontSize)
                  }
                  if (cell.style.lineHeight) {
                    lineHeight = parseFloat(cell.style.lineHeight)
                  }
                  cell.innerHeight = fontSize * lineHeight
                }
                return cell
              })
@@ -658,6 +670,18 @@
              }
            } else if (['text', 'number', 'link'].includes(cell.eleType) && !cell.height && _hasheight) {
              cell.innerHeight = 'auto'
            } else if (cell.eleType === 'icon') {
              let fontSize = 14
              let lineHeight = 1.5
              if (cell.style.fontSize) {
                fontSize = parseInt(cell.style.fontSize)
              }
              if (cell.style.lineHeight) {
                lineHeight = parseFloat(cell.style.lineHeight)
              }
              cell.innerHeight = fontSize * lineHeight
            }
            return cell.eleType !== 'button' || skip || permAction[cell.uuid]
@@ -688,7 +712,20 @@
              }
            } else if (['text', 'number', 'link'].includes(cell.eleType) && !cell.height && _hasheight) {
              cell.innerHeight = 'auto'
            } else if (cell.eleType === 'icon') {
              let fontSize = 14
              let lineHeight = 1.5
              if (cell.style.fontSize) {
                fontSize = parseInt(cell.style.fontSize)
              }
              if (cell.style.lineHeight) {
                lineHeight = parseFloat(cell.style.lineHeight)
              }
              cell.innerHeight = fontSize * lineHeight
            }
            return cell.eleType !== 'button' || skip || permAction[cell.uuid]
          })
        })
@@ -718,6 +755,18 @@
            }
          } else if (['text', 'number', 'link'].includes(cell.eleType) && !cell.height) {
            cell.innerHeight = 'auto'
          } else if (cell.eleType === 'icon') {
            let fontSize = 14
            let lineHeight = 1.5
            if (cell.style.fontSize) {
              fontSize = parseInt(cell.style.fontSize)
            }
            if (cell.style.lineHeight) {
              lineHeight = parseFloat(cell.style.lineHeight)
            }
            cell.innerHeight = fontSize * lineHeight
          }
          return cell.eleType !== 'button' || skip || permAction[cell.uuid]
@@ -751,6 +800,18 @@
              }
            } else if (['text', 'number', 'link'].includes(cell.eleType) && !cell.height && _hasheight) {
              cell.innerHeight = 'auto'
            } else if (cell.eleType === 'icon') {
              let fontSize = 14
              let lineHeight = 1.5
              if (cell.style.fontSize) {
                fontSize = parseInt(cell.style.fontSize)
              }
              if (cell.style.lineHeight) {
                lineHeight = parseFloat(cell.style.lineHeight)
              }
              cell.innerHeight = fontSize * lineHeight
            }
            return cell.eleType !== 'button' || skip || permAction[cell.uuid]
          })