From ce70be666bcd78a7e16e739040488cf7e7256cc2 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 31 五月 2021 15:49:43 +0800
Subject: [PATCH] 2021-05-31

---
 src/menu/components/form/normal-form/groupform/index.jsx |   45 ++++++++++++++++++++++++++++++++++++---------
 1 files changed, 36 insertions(+), 9 deletions(-)

diff --git a/src/menu/components/form/normal-form/groupform/index.jsx b/src/menu/components/form/normal-form/groupform/index.jsx
index d853db7..488cd6c 100644
--- a/src/menu/components/form/normal-form/groupform/index.jsx
+++ b/src/menu/components/form/normal-form/groupform/index.jsx
@@ -1,6 +1,6 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
-import { Form, Row, Col, Input, Radio, Select } from 'antd'
+import { Form, Row, Col, Input, Radio, Select, Tooltip, Icon } from 'antd'
 import { formRule } from '@/utils/option.js'
 import './index.scss'
 
@@ -18,13 +18,22 @@
 
   UNSAFE_componentWillMount () {
     const { group } = this.props
+    const { appType } = this.state
     let fields = []
 
-    group.fields.forEach(f => {
-      if (f.field && ['select', 'link', 'text', 'number'].includes(f.type) && f.hidden !== 'true' && f.readonly !== 'true') {
-        fields.push(f)
-      }
-    })
+    if (appType === 'mob') {
+      group.fields.forEach(f => {
+        if (f.field && ['text', 'number'].includes(f.type) && f.hidden !== 'true' && f.readonly !== 'true') {
+          fields.push(f)
+        }
+      })
+    } else {
+      group.fields.forEach(f => {
+        if (f.field && ['select', 'link', 'text', 'number'].includes(f.type) && f.hidden !== 'true' && f.readonly !== 'true') {
+          fields.push(f)
+        }
+      })
+    }
 
     this.setState({
       fields: fields
@@ -55,7 +64,7 @@
   render() {
     const { group, dict } = this.props
     const { getFieldDecorator } = this.props.form
-    const { fields } = this.state
+    const { fields, appType } = this.state
 
     const formItemLayout = {
       labelCol: {
@@ -75,6 +84,24 @@
             <Form.Item label="鏍囬">
               {getFieldDecorator('title', {
                 initialValue: group.setting.title,
+                rules: [
+                  {
+                    max: formRule.input.max,
+                    message: formRule.input.message
+                  }
+                ]
+              })(<Input placeholder="" autoComplete="off" onPressEnter={this.handleSubmit} />)}
+            </Form.Item>
+          </Col>
+          <Col span={12}>
+            <Form.Item label={
+              <Tooltip placement="topLeft" title="鐢ㄤ簬琛ㄥ崟鍔犺浇鏃剁殑鐘舵�佹帶鍒躲��">
+                <Icon type="question-circle" />
+                鐘舵�佸��
+              </Tooltip>
+            }>
+              {getFieldDecorator('status', {
+                initialValue: group.setting.status || '',
                 rules: [
                   {
                     max: formRule.input.max,
@@ -105,7 +132,7 @@
               )}
             </Form.Item>
           </Col>
-          <Col span={12}>
+          {appType !== 'mob' ? <Col span={12}>
             <Form.Item label="琛ㄥ崟鎺掑垪">
               {getFieldDecorator('align', {
                 initialValue: group.setting.align || 'left_right'
@@ -116,7 +143,7 @@
                 </Radio.Group>
               )}
             </Form.Item>
-          </Col>
+          </Col> : null}
         </Row>
       </Form>
     )

--
Gitblit v1.8.0