| | |
| | | state = { |
| | | fields: null, |
| | | display: this.props.config.setting.display || 'modal', |
| | | placement: this.props.config.setting.placement || 'right', |
| | | appType: sessionStorage.getItem('appType'), |
| | | dialogInput: false |
| | | } |
| | |
| | | |
| | | render() { |
| | | const { config } = this.props |
| | | const { fields, appType, display } = this.state |
| | | const { fields, appType, display, placement } = this.state |
| | | const { getFieldDecorator } = this.props.form |
| | | |
| | | const formItemLayout = { |
| | |
| | | </Col> |
| | | {display === 'drawer' || display === 'modal' ? <Col span={12}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title="宽度小于100时为百分率,大于100时为绝对值。"> |
| | | <Tooltip placement="topLeft" title="小于100时为百分率,大于100时为绝对值。"> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | | 宽度 |
| | | {display === 'drawer' && (placement === 'top' || placement === 'bottom') ? '高度' : '宽度'} |
| | | </Tooltip> |
| | | }> |
| | | {getFieldDecorator('width', { |
| | |
| | | {display === 'drawer' ? <Col span={12}> |
| | | <Form.Item label="抽屉方向"> |
| | | {getFieldDecorator('placement', { |
| | | initialValue: config.setting.placement || 'right' |
| | | initialValue: placement |
| | | })( |
| | | <Radio.Group style={{whiteSpace: 'nowrap'}}> |
| | | <Radio.Group style={{whiteSpace: 'nowrap'}} onChange={(e) => this.setState({placement: e.target.value})}> |
| | | <Radio value="right">右侧</Radio> |
| | | <Radio value="left">左侧</Radio> |
| | | <Radio value="top">上侧</Radio> |