From bfadd84fbc2b23c59695e5a94778ab7ac40fea03 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期六, 26 六月 2021 22:54:17 +0800
Subject: [PATCH] 2021-06-26

---
 src/templates/modalconfig/settingform/index.jsx |   38 +++++++++++++++++++++++++++-----------
 1 files changed, 27 insertions(+), 11 deletions(-)

diff --git a/src/templates/modalconfig/settingform/index.jsx b/src/templates/modalconfig/settingform/index.jsx
index 14517aa..2e2297c 100644
--- a/src/templates/modalconfig/settingform/index.jsx
+++ b/src/templates/modalconfig/settingform/index.jsx
@@ -14,6 +14,7 @@
 
   state = {
     fields: null,
+    display: this.props.config.setting.display,
     appType: sessionStorage.getItem('appType')
   }
 
@@ -56,7 +57,7 @@
 
   render() {
     const { config, dict } = this.props
-    const { fields, appType } = this.state
+    const { fields, appType, display } = this.state
     const { getFieldDecorator } = this.props.form
 
     const formItemLayout = {
@@ -87,7 +88,7 @@
             </Form.Item>
           </Col>
           <Col span={12}>
-            <Form.Item label="瀹藉害">
+            <Form.Item label="瀹藉害锛�%锛�">
               {getFieldDecorator('width', {
                 initialValue: config.setting.width
               })(<InputNumber min={10} max={90} precision={0} />)}
@@ -150,7 +151,20 @@
               )}
             </Form.Item>
           </Col>
-          {!this.props.isSubTab && appType !== 'pc' ? <Col span={12}>
+          <Col span={12}>
+            <Form.Item label="鏄剧ず鏂瑰紡">
+              {getFieldDecorator('display', {
+                initialValue: config.setting.display || 'modal'
+              })(
+                <Radio.Group style={{whiteSpace: 'nowrap'}} onChange={(e) => this.setState({display: e.target.value})}>
+                  <Radio value="modal">妯℃�佹</Radio>
+                  <Radio value="prompt">鏄惁妗�</Radio>
+                  <Radio value="drawer">鎶藉眽</Radio>
+                </Radio.Group>
+              )}
+            </Form.Item>
+          </Col>
+          {!this.props.isSubTab && appType !== 'pc' && display === 'modal' ? <Col span={12}>
             <Form.Item label="鎸傝浇瀵硅薄">
               {getFieldDecorator('container', {
                 initialValue: config.setting.container || 'tab'
@@ -162,18 +176,20 @@
               )}
             </Form.Item>
           </Col> : null}
-          <Col span={12}>
-            <Form.Item label="鏄剧ず鏂瑰紡">
-              {getFieldDecorator('display', {
-                initialValue: config.setting.display || 'modal'
+          {display === 'drawer' ? <Col span={12}>
+            <Form.Item label="鎶藉眽鏂瑰悜">
+              {getFieldDecorator('placement', {
+                initialValue: config.setting.placement || 'right'
               })(
-                <Radio.Group>
-                  <Radio value="modal">妯℃�佹</Radio>
-                  <Radio value="prompt">鏄惁妗�</Radio>
+                <Radio.Group style={{whiteSpace: 'nowrap'}}>
+                  <Radio value="right">鍙充晶</Radio>
+                  <Radio value="left">宸︿晶</Radio>
+                  <Radio value="top">涓婁晶</Radio>
+                  <Radio value="bottom">涓嬩晶</Radio>
                 </Radio.Group>
               )}
             </Form.Item>
-          </Col>
+          </Col> : null}
         </Row>
       </Form>
     )

--
Gitblit v1.8.0