fix: cleanup

This commit is contained in:
chenos 2022-03-05 15:04:05 +08:00
parent 5cbbfcf428
commit f47ec3ec25
2 changed files with 2 additions and 15 deletions

View File

@ -1,5 +1,4 @@
import { MenuOutlined } from '@ant-design/icons'; import { MenuOutlined } from '@ant-design/icons';
import { css } from '@emotion/css';
import { useFieldSchema } from '@formily/react'; import { useFieldSchema } from '@formily/react';
import React from 'react'; import React from 'react';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
@ -14,16 +13,6 @@ export const TableRecordActionInitializers = (props: any) => {
const { t } = useTranslation(); const { t } = useTranslation();
return ( return (
<SchemaInitializer.Button <SchemaInitializer.Button
className={css`
border: 0 !important;
color: #fff !important;
background: none !important;
height: auto !important;
line-height: 12px !important;
width: 12px !important;
padding: 0;
font-size: 12px;
`}
insertPosition={'beforeEnd'} insertPosition={'beforeEnd'}
insert={(schema) => { insert={(schema) => {
const spaceSchema = fieldSchema.reduceProperties((buf, schema) => { const spaceSchema = fieldSchema.reduceProperties((buf, schema) => {
@ -181,7 +170,7 @@ export const TableRecordActionInitializers = (props: any) => {
], ],
}, },
]} ]}
component={MenuOutlined} component={<MenuOutlined style={{ cursor: 'pointer' }} />}
/> />
); );
}; };

View File

@ -124,9 +124,7 @@ SchemaInitializer.Button = observer((props: SchemaInitializerButtonProps) => {
{...dropdown} {...dropdown}
overlay={menu} overlay={menu}
> >
{component ? ( {component ? component : (
React.createElement(component)
) : (
<Button <Button
{...others} {...others}
type={'dashed'} type={'dashed'}