From 2404d8a1bed5509432652f11aba6a1efa04aa160 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 18 九月 2020 19:24:26 +0800 Subject: [PATCH] 2020-09-18 --- src/templates/sharecomponent/columncomponent/colspanform/index.jsx | 32 +++++++++++++++++++++++++------- 1 files changed, 25 insertions(+), 7 deletions(-) diff --git a/src/templates/sharecomponent/columncomponent/colspanform/index.jsx b/src/templates/sharecomponent/columncomponent/colspanform/index.jsx index 2364967..8474416 100644 --- a/src/templates/sharecomponent/columncomponent/colspanform/index.jsx +++ b/src/templates/sharecomponent/columncomponent/colspanform/index.jsx @@ -1,6 +1,6 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' -import { Form, Row, Col, Input, InputNumber, Select, Radio } from 'antd' +import { Form, Row, Col, Input, InputNumber, Select, Radio, Tooltip, Icon } from 'antd' import { formRule } from '@/utils/option.js' import TransferForm from '@/templates/zshare/transferform' import './index.scss' @@ -62,6 +62,7 @@ } render() { + const { card } = this.props const { getFieldDecorator } = this.props.form const formItemLayout = { labelCol: { @@ -79,7 +80,7 @@ <Col span={12}> <Form.Item label={this.props.dict['model.name']}> {getFieldDecorator('label', { - initialValue: this.props.card.label, + initialValue: card.label, rules: [ { required: true, @@ -109,7 +110,7 @@ <Col span={12}> <Form.Item label={this.props.dict['model.form.align']}> {getFieldDecorator('Align', { - initialValue: this.props.card.Align, + initialValue: card.Align, rules: [ { required: true, @@ -130,7 +131,7 @@ <Col span={12}> <Form.Item label={this.props.dict['model.form.columnWidth']}> {getFieldDecorator('Width', { - initialValue: this.props.card.Width, + initialValue: card.Width, rules: [ { required: true, @@ -141,9 +142,26 @@ </Form.Item> </Col> <Col span={12}> + <Form.Item label={ + <Tooltip placement="topLeft" title="閫夋嫨鏄剧ず鍒嗙粍锛岃〃鏍间細灞曞紑娣诲姞鍒嗙粍鐨勫瓙鍒楋紝姝ゆ椂鎺掑垪鏂瑰紡浼氬け鏁堛��"> + <Icon type="question-circle" /> + 鏄剧ず鍒嗙粍 + </Tooltip> + }> + {getFieldDecorator('unfold', { + initialValue: card.unfold || 'false' + })( + <Radio.Group> + <Radio value="true">{this.props.dict['model.true']}</Radio> + <Radio value="false">{this.props.dict['model.false']}</Radio> + </Radio.Group> + )} + </Form.Item> + </Col> + <Col span={12}> <Form.Item label={this.props.dict['model.hidden']}> {getFieldDecorator('Hide', { - initialValue: this.props.card.Hide || 'false', + initialValue: card.Hide || 'false', rules: [ { required: true, @@ -161,7 +179,7 @@ <Col span={12}> <Form.Item label={this.props.dict['header.form.order']}> {getFieldDecorator('order', { - initialValue: this.props.card.order, + initialValue: card.order, rules: [ { required: true, @@ -182,7 +200,7 @@ </Form.Item> </Col> <Col span={24}> - <TransferForm columns={this.props.columns} ref="column-transfer" selected={this.props.card.sublist}/> + <TransferForm columns={this.props.columns} ref="column-transfer" selected={card.sublist}/> </Col> </Row> </Form> -- Gitblit v1.8.0