From ecbe0dc46ce2b8f607b9afd063104adeb7f10fe8 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 30 三月 2021 15:19:31 +0800 Subject: [PATCH] 2021-03-30 --- src/menu/components/table/normal-table/wrapsetting/settingform/index.jsx | 94 +++++++++++++++++++++++++++++++++++------------ 1 files changed, 70 insertions(+), 24 deletions(-) diff --git a/src/menu/components/table/normal-table/wrapsetting/settingform/index.jsx b/src/menu/components/table/normal-table/wrapsetting/settingform/index.jsx index 2ff1c50..77ea6f9 100644 --- a/src/menu/components/table/normal-table/wrapsetting/settingform/index.jsx +++ b/src/menu/components/table/normal-table/wrapsetting/settingform/index.jsx @@ -2,11 +2,11 @@ import PropTypes from 'prop-types' import { Form, Row, Col, Input, Radio, Tooltip, Icon, InputNumber, Select } from 'antd' +import ColorSketch from '@/mob/colorsketch' import './index.scss' class SettingForm extends Component { static propTpyes = { - MenuType: PropTypes.any, // 鑿滃崟绫诲瀷 dict: PropTypes.object, // 瀛楀吀椤� config: PropTypes.object, // 鍗$墖琛屼俊鎭� wrap: PropTypes.object, // 鏁版嵁婧愰厤缃� @@ -54,7 +54,7 @@ } render() { - const { wrap, MenuType, config } = this.props + const { wrap, config } = this.props const { getFieldDecorator } = this.props.form const { roleList } = this.state @@ -74,6 +74,13 @@ <Form {...formItemLayout}> <Row gutter={24}> <Col span={12}> + <Form.Item label="鏍囬"> + {getFieldDecorator('title', { + initialValue: wrap.title || '' + })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)} + </Form.Item> + </Col> + <Col span={12}> <Form.Item label={ <Tooltip placement="topLeft" title="鐢ㄤ簬缁勪欢闂寸殑鍖哄垎銆�"> <Icon type="question-circle" /> @@ -89,24 +96,6 @@ } ] })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)} - </Form.Item> - </Col> - <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title="鏍呮牸甯冨眬锛屾瘡琛岀瓑鍒嗕负24鍒椼��"> - <Icon type="question-circle" /> - 瀹藉害 - </Tooltip> - }> - {getFieldDecorator('width', { - initialValue: wrap.width || 24, - rules: [ - { - required: true, - message: this.props.dict['form.required.input'] + '瀹藉害!' - } - ] - })(<InputNumber min={1} max={24} precision={0} onPressEnter={this.handleSubmit} />)} </Form.Item> </Col> <Col span={12}> @@ -128,10 +117,67 @@ initialValue: wrap.bordered || 'true' })( <Radio.Group style={{whiteSpace: 'nowrap'}}> - <Radio key="true" value={'true'}> 鏈� </Radio> - <Radio key="false" value={'false'}> 鏃� </Radio> + <Radio key="true" value="true"> 鏈� </Radio> + <Radio key="false" value="false"> 鏃� </Radio> </Radio.Group> )} + </Form.Item> + </Col> + <Col span={12}> + <Form.Item label="琛ㄥご"> + {getFieldDecorator('tableHeader', { + initialValue: wrap.tableHeader || 'show' + })( + <Radio.Group style={{whiteSpace: 'nowrap'}}> + <Radio key="show" value="show"> 鏄剧ず </Radio> + <Radio key="hidden" value="hidden"> 闅愯棌 </Radio> + </Radio.Group> + )} + </Form.Item> + </Col> + <Col span={12}> + <Form.Item label="琛ㄦ牸澶у皬"> + {getFieldDecorator('size', { + initialValue: wrap.size || 'middle' + })( + <Radio.Group style={{whiteSpace: 'nowrap'}}> + <Radio key="default" value="default"> 澶� </Radio> + <Radio key="middle" value="middle"> 涓� </Radio> + <Radio key="small" value="small"> 灏� </Radio> + </Radio.Group> + )} + </Form.Item> + </Col> + <Col span={12} style={{height: '64px'}}> + <Form.Item label={ + <Tooltip placement="topLeft" title="榛樿鍊� #e8e8e8銆�"> + <Icon type="question-circle" /> + 杈规棰滆壊 + </Tooltip> + }> + {getFieldDecorator('borderColor', { + initialValue: wrap.borderColor || '#e8e8e8' + })( + <ColorSketch /> + )} + </Form.Item> + </Col> + <Col span={12}> + <Form.Item label={ + <Tooltip placement="topLeft" title="鏍呮牸甯冨眬锛屾瘡琛岀瓑鍒嗕负24鍒椼��"> + <Icon type="question-circle" /> + 瀹藉害 + </Tooltip> + }> + {getFieldDecorator('width', { + initialValue: wrap.width || 24, + rules: [ + { + required: true, + message: this.props.dict['form.required.input'] + '瀹藉害!' + } + ] + })(<InputNumber min={1} max={24} precision={0} onPressEnter={this.handleSubmit} />)} </Form.Item> </Col> <Col span={12}> @@ -152,7 +198,7 @@ )} </Form.Item> </Col> - {MenuType !== 'billPrint' ? <Col span={12}> + <Col span={12}> <Form.Item label="榛戝悕鍗�"> {getFieldDecorator('blacklist', { initialValue: wrap.blacklist || [] @@ -168,7 +214,7 @@ </Select> )} </Form.Item> - </Col> : null} + </Col> </Row> </Form> </div> -- Gitblit v1.8.0