king
2020-10-29 944730f2794b87aa053f53084f0d082d4af6fd41
src/menu/components/card/cardcomponent/settingform/index.jsx
@@ -1,12 +1,13 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { Form, Row, Col, Radio, Tooltip, Icon, InputNumber } from 'antd'
import { Form, Row, Col, Radio, Tooltip, Icon, Input, InputNumber } from 'antd'
import './index.scss'
class SettingForm extends Component {
  static propTpyes = {
    dict: PropTypes.object,    // 字典项
    cards: PropTypes.object,   // 卡片集
    setting: PropTypes.object, // 数据源配置
  }
@@ -28,7 +29,7 @@
  }
  render() {
    const { setting } = this.props
    const { setting, cards } = this.props
    const { getFieldDecorator } = this.props.form
    const formItemLayout = {
@@ -98,6 +99,18 @@
                )}
              </Form.Item>
            </Col> : null}
            {cards.subtype === 'propcard' ? <Col span={12}>
              <Form.Item label={
                <Tooltip placement="topLeft" title="卡片点击时,向其他组件传递的BID值。">
                  <Icon type="question-circle" />
                  主键值
                </Tooltip>
              }>
                {getFieldDecorator('primaryId', {
                  initialValue: setting.primaryId || ''
                })(<Input placeholder="" autoComplete="off" />)}
              </Form.Item>
            </Col> : null}
          </Row>
        </Form>
      </div>