🎨 1、避免歧义,爱好枚举列出,可以自行修改 2、修改右侧样式

This commit is contained in:
zhangjinlong 2020-10-14 15:47:44 +08:00
parent ecadef686b
commit 255ecf5d7b
6 changed files with 13 additions and 16 deletions

View File

@ -18,8 +18,8 @@
], ],
"contributors": [ "contributors": [
"徐小夕 <xujiang156@qq.com> (https://github.com/MrXujiang))", "徐小夕 <xujiang156@qq.com> (https://github.com/MrXujiang))",
"dragon <zhangjinlongll@163.com> (https://github.com/zhangjinlongll))",
"yehuozhili <yehuozhili@outlook.com> (https://github.com/yehuozhili))" "yehuozhili <yehuozhili@outlook.com> (https://github.com/yehuozhili))"
"dragon <zhangjinlongll@163.com> (https://github.com/zhangjinlongll))"
], ],
"scripts": { "scripts": {
"start": "umi dev", "start": "umi dev",

View File

@ -1,4 +1,3 @@
import styles from './baseForm.less';
import React, { ReactText } from 'react'; import React, { ReactText } from 'react';
import { Button } from 'antd'; import { Button } from 'antd';
import { import {
@ -54,11 +53,9 @@ const BaseForm: TBaseForm = {
MyRadio: (props: baseFormMyRadioTpl & { onChange: (v: string | undefined | number) => void }) => { MyRadio: (props: baseFormMyRadioTpl & { onChange: (v: string | undefined | number) => void }) => {
const { label, onChange } = props; const { label, onChange } = props;
return ( return (
<div>
<Button style={{ color: '#fff', backgroundColor: '#4A4A4A' }} onChange={() => onChange}> <Button style={{ color: '#fff', backgroundColor: '#4A4A4A' }} onChange={() => onChange}>
{label} {label}
</Button> </Button>
</div>
); );
}, },
MyCheckbox: ( MyCheckbox: (

View File

@ -97,9 +97,9 @@ const Form: IFormSchema = {
type: 'MySelect', type: 'MySelect',
label: '爱好', label: '爱好',
options: [ options: [
{ label: '选项一', value: '1' }, { label: '篮球', value: '1' },
{ label: '选项二', value: '2' }, { label: '乒乓球', value: '2' },
{ label: '选项三', value: '3' }, { label: '健身', value: '3' },
], ],
}, },
], ],

View File

@ -97,9 +97,9 @@ const Form: IFormSchema = {
type: 'MySelect', type: 'MySelect',
label: '爱好', label: '爱好',
options: [ options: [
{ label: '选项一', value: '1' }, { label: '篮球', value: '1' },
{ label: '选项二', value: '2' }, { label: '乒乓球', value: '2' },
{ label: '选项三', value: '3' }, { label: '健身', value: '3' },
], ],
}, },
], ],

View File

@ -163,8 +163,8 @@ const FormEditor = (props: FormEditorProps) => {
</React.Fragment> </React.Fragment>
); );
})} })}
<Form.Item wrapperCol={{ span: 12, offset: 6 }}> <Form.Item>
<Button danger style={{ marginLeft: '20px' }} onClick={handleDel}> <Button danger style={{ width: '251px' }} block onClick={handleDel}>
</Button> </Button>
</Form.Item> </Form.Item>

View File

@ -552,7 +552,7 @@ const Container = (props: {
</div> </div>
<div <div
style={{ style={{
width: rightColla ? 0 : '400px', width: rightColla ? 0 : '304px',
transition: 'all ease-in-out 0.5s', transition: 'all ease-in-out 0.5s',
}} }}
></div> ></div>