king
2020-06-16 6c16e43cd6521460c804391c042348dbb14086fc
src/templates/sharecomponent/cardcomponent/carddetailform/index.jsx
@@ -52,6 +52,8 @@
          item.hidden = false
        } else if (item.key === 'width' && card.elemType === 'avatar' && card.type === 'picture') {
          item.hidden = false
        } else if (item.key === 'radius' && card.elemType === 'avatar' && card.type === 'picture') {
          item.hidden = false
        }
        return item
      })
@@ -87,6 +89,8 @@
            item.max = card.widthType === 'ratio' ? 100 : 500
          } else if (item.key === 'size') {
            item.hidden = value !== 'icon'
          } else if (item.key === 'radius') {
            item.hidden = value !== 'picture'
          }
          return item
@@ -169,7 +173,7 @@
                    message: this.props.dict['form.required.input'] + item.label + '!'
                  }
                ]
              })(<InputNumber min={item.min} max={item.max} precision={0} />)}
              })(<InputNumber min={item.min} max={item.max} precision={item.precision || 0} />)}
            </Form.Item>
          </Col>
        )
@@ -215,7 +219,7 @@
                  }
                ]
              })(
                <Radio.Group onChange={(e) => {this.typeChange(item.key, e.target.value)}}>
                <Radio.Group disabled={item.readonly} onChange={(e) => {this.typeChange(item.key, e.target.value)}}>
                  {
                    item.options.map(option => {
                      return (
@@ -282,6 +286,12 @@
              let column = columns.filter(col => col.value === values.field)[0]
              values.icon = column.icon
              values.color = column.color
              values.avatarWidth = values.size
            } else if (values.widthType === 'absolute') {
              values.avatarWidth = values.width
            } else {
              values.avatarWidth = values.width + '%'
            }
          }