king
2021-11-12 0c84df247914f893ef5e41d57a422e10a2dc814c
src/menu/components/share/usercomponent/settingform/index.jsx
@@ -1,8 +1,9 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { Form, Row, Col, Input, Tooltip, Icon } from 'antd'
import { Form, Row, Col, Input, Tooltip } from 'antd'
import { QuestionCircleOutlined } from '@ant-design/icons'
import './index.scss'
// import './index.scss'
class SettingForm extends Component {
  static propTpyes = {
@@ -53,34 +54,32 @@
    }
    return (
      <div className="model-menu-setting-form">
        <Form {...formItemLayout}>
          <Row gutter={24}>
            <Col span={22}>
              <Form.Item label={
                <Tooltip placement="topLeft" title="用于组件间的区分。">
                  <Icon type="question-circle" />
                  组件名称
                </Tooltip>
              }>
                {getFieldDecorator('name', {
                  initialValue: this.props.name || '',
                  rules: [
                    {
                      required: true,
                      message: this.props.dict['form.required.input'] + '组件名称!'
                    },
                    {
                      max: 15,
                      message: '组件名称最多15个字符!'
                    }
                  ]
                })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit}/>)}
              </Form.Item>
            </Col>
          </Row>
        </Form>
      </div>
      <Form {...formItemLayout}>
        <Row gutter={24}>
          <Col span={22}>
            <Form.Item label={
              <Tooltip placement="topLeft" title="用于组件间的区分。">
                <QuestionCircleOutlined className="mk-form-tip" />
                组件名称
              </Tooltip>
            }>
              {getFieldDecorator('name', {
                initialValue: this.props.name || '',
                rules: [
                  {
                    required: true,
                    message: this.props.dict['form.required.input'] + '组件名称!'
                  },
                  {
                    max: 15,
                    message: '组件名称最多15个字符!'
                  }
                ]
              })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit}/>)}
            </Form.Item>
          </Col>
        </Row>
      </Form>
    )
  }
}