king
2020-06-16 6c16e43cd6521460c804391c042348dbb14086fc
src/templates/sharecomponent/chartgroupcomponent/chartform/index.jsx
@@ -204,6 +204,8 @@
          item.hidden = false
        } else if (item.key === 'switch' && _type === 'card') {
          item.hidden = false
        } else if (item.key === 'insert') {
          item.hidden = _type !== 'card'
        } else if (item.key === 'bgfield') {
          item.hidden = _type !== 'card'
        }
@@ -256,6 +258,8 @@
            item.hidden = false
          } else if (item.key === 'switch' && value === 'card') {
            item.hidden = false
          } else if (item.key === 'insert') {
            item.hidden = value !== 'card'
          } else if (item.key === 'bgfield') {
            item.hidden = value !== 'card'
          }
@@ -322,6 +326,7 @@
  getFields() {
    const { getFieldDecorator } = this.props.form
    const fields = []
    this.state.formlist.forEach((item, index) => {
      if (item.hidden) return
      
@@ -487,10 +492,15 @@
              result.subelement = selectlegend.subelement
            }
            if (result.widthType === 'ratio' && result.avatar && result.avatar.widthType !== 'ratio') {
              result.avatar.widthType = 'ratio'
              result.avatar.width = 32
            }
            if (!result.details) {
              result.details = [
                {elemType: 'detail', bold: 'true', uuid: 'cardtitle', content: 'Card title', datatype: 'static', align: 'left'},
                {elemType: 'detail',bold: 'false', uuid: 'carddescription', content: 'Card content', datatype: 'static', align: 'left'}
                {elemType: 'detail', fontWeight: 'normal', fontSize: 14, width: 100, height: 1, uuid: 'cardtitle', content: 'Card content', datatype: 'static', align: 'left'},
                {elemType: 'detail', fontWeight: 'normal', fontSize: 14, width: 100, height: 1, uuid: 'carddescription', content: 'Card content', datatype: 'static', align: 'left'}
              ]
              result.bottom = {
                elemType: 'bottom',
@@ -510,8 +520,10 @@
                type: 'picture',
                field: '',
                size: 14,
                widthType: 'absolute',
                width: 32
                widthType: 'ratio',
                width: 32,
                avatarWidth: 32,
                radius: 'true'
              }
            }