king
2022-06-13 96bcbb7d0c3ad68344b792c2ce3ba0cb7d82a4a7
src/templates/modalconfig/settingform/index.jsx
@@ -17,6 +17,7 @@
  state = {
    fields: null,
    display: this.props.config.setting.display || 'modal',
    placement: this.props.config.setting.placement || 'right',
    appType: sessionStorage.getItem('appType'),
    dialogInput: false
  }
@@ -76,7 +77,7 @@
  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 = {
@@ -128,9 +129,9 @@
          </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', {
@@ -259,9 +260,9 @@
          {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>