Commit 9cd4e60d authored by Maofei94's avatar Maofei94

perf: 移动应用配置布局修改

parent 64fbe5a4
...@@ -26,7 +26,7 @@ import { appConnector } from '@/containers/App/store'; ...@@ -26,7 +26,7 @@ import { appConnector } from '@/containers/App/store';
const { TabPane } = Tabs; const { TabPane } = Tabs;
const MobileConfigPage = props => { const MobileConfigPage = props => {
const { userMode } = props; const { userMode } = props;
const [activeKey, setActiveKey] = useState('0'); // tabs活动页 const [activeKey, setActiveKey] = useState('1'); // tabs活动页
const [miniTitle, setMiniTitle] = useState(''); // 应用名称 const [miniTitle, setMiniTitle] = useState(''); // 应用名称
const [flag, setFlag] = useState(1); // 刷新标志 const [flag, setFlag] = useState(1); // 刷新标志
const [showConfig, setShowConfig] = useState(true); const [showConfig, setShowConfig] = useState(true);
...@@ -201,7 +201,7 @@ const MobileConfigPage = props => { ...@@ -201,7 +201,7 @@ const MobileConfigPage = props => {
); );
const tabArr = [ const tabArr = [
{ {
title: '网站配置', title: '应用配置',
key: '0', key: '0',
component: ( component: (
<SiteConfig <SiteConfig
......
.formStyle{ .formStyle{
margin-bottom: 40px; margin-bottom: 20px;
// height: 100%;
// overflow-y: scroll;
}
.formbtn{
position: fixed;
bottom: 40px;
right:40%
}
.divbox{
height: 100%;
overflow: hidden;
} }
\ No newline at end of file
.box{ .box{
display: flex; display: flex;
padding: 10px; padding: 10px 10px 10px 20px;
margin-top: 10px; margin: 20px;
flex-wrap: wrap; flex-wrap: wrap;
// border: 1px solid gray; border: 1px solid #eee;
} }
.check{ .check{
flex-shrink: 0; flex-shrink: 0;
......
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
import { Form, Input, Button, Row, Col } from 'antd'; import { Form, Input, Button, Row, Col } from 'antd';
import classnames from 'classnames';
import styles from './addForm.less'; import styles from './addForm.less';
import PicturesWall from '@/components/Upload/index'; import PicturesWall from '@/components/Upload/index';
import CheckList from './checkBox';
const { Item } = Form; const { Item } = Form;
const EditForm = props => { const EditForm = props => {
const { submitCallback, nodeType, info } = props; const { submitCallback, nodeType, info, valueCallback = () => {} } = props;
const [form] = Form.useForm(); const [form] = Form.useForm();
const [otherForm] = Form.useForm(); const [otherForm] = Form.useForm();
const layout = { const layout = {
layout: 'horizontal', layout: 'horizontal',
labelCol: { span: 4, offset: 1 }, labelCol: { span: 2, offset: 0 },
wrapperCol: { span: 16 }, wrapperCol: { span: 20 },
}; };
// 回显表单 // 回显表单
useEffect(() => { useEffect(() => {
...@@ -53,7 +55,7 @@ const EditForm = props => { ...@@ -53,7 +55,7 @@ const EditForm = props => {
submit(); submit();
}; };
return ( return (
<div style={{ marginTop: '10px' }}> <div className={classnames({ [styles.divbox]: true })}>
{(nodeType === 1 || nodeType === 2) && ( {(nodeType === 1 || nodeType === 2) && (
<Form <Form
form={form} form={form}
...@@ -211,7 +213,12 @@ const EditForm = props => { ...@@ -211,7 +213,12 @@ const EditForm = props => {
<Item label="功能参数" name="funParam"> <Item label="功能参数" name="funParam">
<Input /> <Input />
</Item> </Item>
<Item wrapperCol={{ offset: 10 }} style={{ marginTop: '40px' }}> <CheckList
info={info}
nodeType={nodeType}
valueCallback={valueCallback}
/>
<Item wrapperCol={{ offset: 10 }}>
<Button type="primary" htmlType="submit"> <Button type="primary" htmlType="submit">
提交 提交
</Button> </Button>
......
...@@ -146,10 +146,10 @@ const MiniMenu = props => { ...@@ -146,10 +146,10 @@ const MiniMenu = props => {
icon: icon:
obj.menuType !== 'MiniAppMenuThree' && obj.menuType !== 'MiniAppMenuThree' &&
obj.menuType !== 'MiniAppMenu' ? ( obj.menuType !== 'MiniAppMenu' ? (
<FolderFilled /> <FolderFilled />
) : ( ) : (
<FileOutlined /> <FileOutlined />
), ),
menuType: obj.menuType, menuType: obj.menuType,
children: hasChild ? obj.children.map(i => mapTree(i)) : [], children: hasChild ? obj.children.map(i => mapTree(i)) : [],
}; };
...@@ -600,11 +600,26 @@ const MiniMenu = props => { ...@@ -600,11 +600,26 @@ const MiniMenu = props => {
> >
菜单配置 菜单配置
{nodeType ? ( {nodeType ? (
<EditForm <div style={{ marginTop: '10px' }}>
nodeType={nodeType} <EditForm
info={info} nodeType={nodeType}
submitCallback={editSubmitCallback} info={info}
/> submitCallback={editSubmitCallback}
valueCallback={valueCallback}
/>
{/* <div
className={classnames({
[styles.rightBox]: true,
})}
>
关联角色
<CheckList
info={info}
nodeType={nodeType}
valueCallback={valueCallback}
/>
</div> */}
</div>
) : ( ) : (
<Empty <Empty
image={Empty.PRESENTED_IMAGE_SIMPLE} image={Empty.PRESENTED_IMAGE_SIMPLE}
...@@ -612,18 +627,6 @@ const MiniMenu = props => { ...@@ -612,18 +627,6 @@ const MiniMenu = props => {
/> />
)} )}
</div> </div>
<div
className={classnames({
[styles.rightBox]: true,
})}
>
关联角色
<CheckList
info={info}
nodeType={nodeType}
valueCallback={valueCallback}
/>
</div>
</div> </div>
</Spin> </Spin>
); );
......
...@@ -43,11 +43,11 @@ ...@@ -43,11 +43,11 @@
} }
.middle{ .middle{
min-width: 500px; min-width: 500px;
width: 500px; width: 100%;
min-height: 100%; min-height: 100%;
border: 1px solid #eee; border: 1px solid #eee;
padding: 10px; padding: 10px;
margin: 0 10px; margin: 0 0 0 10px;
} }
.title{ .title{
display: flex; display: flex;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment