From c33ac9ddcdbed91bd2267bed2a96199441806a04 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 22 九月 2022 17:00:15 +0800 Subject: [PATCH] 2022-09-22 --- src/menu/components/share/markcomponent/markform/index.jsx | 19 +++++++++++++------ 1 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/menu/components/share/markcomponent/markform/index.jsx b/src/menu/components/share/markcomponent/markform/index.jsx index c027d4b..2809114 100644 --- a/src/menu/components/share/markcomponent/markform/index.jsx +++ b/src/menu/components/share/markcomponent/markform/index.jsx @@ -1,6 +1,7 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' -import { Form, Row, Col, Select, Button, Input, Icon, Cascader, Tooltip } from 'antd' +import { Form, Row, Col, Select, Button, Input, Cascader, Tooltip } from 'antd' +import { QuestionCircleOutlined } from '@ant-design/icons' import ColorSketch from '@/mob/colorsketch' import './index.scss' @@ -8,6 +9,7 @@ class UniqueForm extends Component { static propTpyes = { dict: PropTypes.object, // 瀛楀吀椤� + field: PropTypes.any, columns: PropTypes.array, // 鍒楀悕闆嗗悎 signs: PropTypes.array, // 鏍囪绫诲瀷 markChange: PropTypes.func // 淇敼鍑芥暟 @@ -23,7 +25,7 @@ } render() { - const { columns, signs } = this.props + const { columns, signs, field } = this.props const { getFieldDecorator } = this.props.form const formItemLayout = { labelCol: { @@ -36,13 +38,18 @@ } } + let initVal = [] + if (field) { + initVal = [field, 'static'] + } + return ( <Form {...formItemLayout} className="normal-table-mark-form"> <Row gutter={24}> <Col span={6}> <Form.Item label={'瀵规瘮瀛楁'}> {getFieldDecorator('field', { - initialValue: [], + initialValue: initVal, rules: [ { required: true, @@ -50,7 +57,7 @@ } ] })( - <Cascader options={columns} placeholder=""/> + <Cascader className="mark-type" options={columns} placeholder=""/> )} </Form.Item> </Col> @@ -77,7 +84,7 @@ </Col> <Col span={6}> <Form.Item label={<Tooltip placement="topLeft" title="瀵规瘮闈欐�佸�兼椂锛岄渶瑕佸~鍐欏姣斿�硷紝榛樿涓虹┖銆�"> - <Icon type="question-circle" /> + <QuestionCircleOutlined className="mk-form-tip" /> {'瀵规瘮鍊�'} </Tooltip> }> @@ -112,7 +119,7 @@ } ] })( - <Cascader options={signs} placeholder=""/> + <Cascader popupClassName="mark-type" options={signs} placeholder=""/> )} </Form.Item> </Col> : null} -- Gitblit v1.8.0