improve code

This commit is contained in:
chenos 2021-08-25 09:56:01 +08:00
parent 4507a5aca1
commit 12ba06f89a
4 changed files with 11 additions and 11 deletions

View File

@ -959,7 +959,7 @@ AddNew.CardItem = observer((props: any) => {
let collectionName = null;
let isNew = false;
if (['addNewTable', 'addNewForm'].includes(info.key)) {
const values = await FormDialog(`建数据表`, () => {
const values = await FormDialog(`建数据表`, () => {
return (
<FormLayout layout={'vertical'}>
<SchemaField schema={dbSchema} />
@ -1046,7 +1046,7 @@ AddNew.CardItem = observer((props: any) => {
</Menu.ItemGroup>
<Menu.Divider></Menu.Divider>
<Menu.Item icon={<PlusOutlined />} key={`addNew${view.key}`}>
</Menu.Item>
</Menu.SubMenu>
))}
@ -1174,7 +1174,7 @@ AddNew.CardItem = observer((props: any) => {
</Menu.ItemGroup>
{/* <Menu.Divider></Menu.Divider> */}
{/* <Menu.Item icon={<PlusOutlined />} key={`addNew${view.key}`}>
</Menu.Item> */}
</Menu.SubMenu>
))}
@ -1269,7 +1269,7 @@ AddNew.CardItem = observer((props: any) => {
</Menu.ItemGroup>
{/* <Menu.Divider></Menu.Divider>
<Menu.Item icon={<PlusOutlined />} key={`addNew${view.key}`}>
</Menu.Item> */}
</Menu.SubMenu>
))}
@ -1326,7 +1326,7 @@ AddNew.CardItem = observer((props: any) => {
</Menu.ItemGroup>
<Menu.Divider></Menu.Divider>
<Menu.Item disabled key={'addNewRef'}>
</Menu.Item>
</Menu.SubMenu>
</Menu>
@ -1423,7 +1423,7 @@ AddNew.FormItem = observer((props: any) => {
<Menu.SubMenu
popupClassName={'add-new-fields-popup'}
className={'sub-menu-add-new-fields'}
title={'新建字段'}
title={'添加字段'}
>
{options.map(
(option) =>
@ -1435,7 +1435,7 @@ AddNew.FormItem = observer((props: any) => {
key={item.name}
onClick={async () => {
setVisible(false);
const values = await FormDialog(`创建字段`, () => {
const values = await FormDialog(`添加字段`, () => {
return (
<FormLayout layout={'vertical'}>
<SchemaField schema={item} />

View File

@ -486,7 +486,7 @@ export const DatabaseField: any = observer((props) => {
icon={<PlusOutlined />}
style={{ marginTop: 10 }}
>
</Button>
</Dropdown>
</div>

View File

@ -38,7 +38,7 @@ export const chinaRegion: FieldOptions = {
type: 'number',
'x-component': 'Radio.Group',
'x-decorator': 'FormItem',
title: '层级',
title: '可选择的层级',
default: 3,
enum: [
{ value: 1, label: '省' },

View File

@ -471,7 +471,7 @@ function AddColumn() {
<Menu.Divider />
<Menu.SubMenu
popupClassName={'add-new-fields-popup'}
title={'创建字段'}
title={'添加字段'}
>
{options.map((option) => (
<Menu.ItemGroup title={option.label}>
@ -481,7 +481,7 @@ function AddColumn() {
key={item.name}
onClick={async () => {
setVisible(false);
const values = await FormDialog(`创建字段`, () => {
const values = await FormDialog(`添加字段`, () => {
return (
<FormLayout layout={'vertical'}>
<SchemaField schema={item} />