Skip to content

Commit

Permalink
fix: 🐛 去除匿名导出方式
Browse files Browse the repository at this point in the history
  • Loading branch information
G committed Dec 15, 2023
1 parent 79b21fb commit dd4db27
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 9 deletions.
1 change: 0 additions & 1 deletion packages/gbeata/.fatherrc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { defineConfig } from 'father';
export default defineConfig({
// more father config: https://github.com/umijs/father/blob/master/docs/config.md
esm: {
output: 'dist',
ignores: [
'src/**/*.md', // 避免打包demo文件到npm包里面
],
Expand Down
4 changes: 3 additions & 1 deletion packages/gbeata/src/GDialogForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ const funcs = [
'validateFields',
];

export default forwardRef(function GDialogForm(
const GDialogForm = forwardRef(function GDialogForm(
props: GDialogFormProps,
ref?: Ref<GDialogFormRef>,
) {
Expand Down Expand Up @@ -464,3 +464,5 @@ export default forwardRef(function GDialogForm(
</GDialog>
);
});

export default GDialogForm;
4 changes: 3 additions & 1 deletion packages/gbeata/src/GForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ export const funcs = [
'validateFields',
];

export default forwardRef(function GForm(props: GFormProps, ref: Ref<any>) {
const GForm = forwardRef(function GForm(props: GFormProps, ref: Ref<any>) {
const {
fields: originFields,
formLayout = 'horizontal',
Expand Down Expand Up @@ -943,3 +943,5 @@ export default forwardRef(function GForm(props: GFormProps, ref: Ref<any>) {
</div>
);
});

export default GForm;
3 changes: 2 additions & 1 deletion packages/gbeata/src/GList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { clearEmpty, getKey } from '../utils';
import { GListContext } from './context';
import useStyles from './style';

export default forwardRef(function GList(props: GListProps, ref) {
const GList = forwardRef(function GList(props: GListProps, ref) {
const {
className,
header,
Expand Down Expand Up @@ -299,3 +299,4 @@ export default forwardRef(function GList(props: GListProps, ref) {
</GListContext.Provider>
);
});
export default GList;
4 changes: 3 additions & 1 deletion packages/gbeata/src/GSearch/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ const funcs = [
'validateFields',
];

export default forwardRef(function GSearch(props: GSearchProps, ref) {
const GSearch = forwardRef(function GSearch(props: GSearchProps, ref) {
const {
fields,
onConfirm,
Expand Down Expand Up @@ -426,3 +426,5 @@ export default forwardRef(function GSearch(props: GSearchProps, ref) {
</Card>
);
});

export default GSearch;
3 changes: 2 additions & 1 deletion packages/gbeata/src/GSearchTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ export const setSearchTableDefaultValue = (config: SearchTableInitConfig) => {
setSearchTableExtraDefaultValue(config);
};

export default forwardRef(function GSearchTable(
const GSearchTable = forwardRef(function GSearchTable(
props: GSearchTableProps,
ref: Ref<any>,
) {
Expand Down Expand Up @@ -594,3 +594,4 @@ export default forwardRef(function GSearchTable(
</div>
);
});
export default GSearchTable;
4 changes: 3 additions & 1 deletion packages/gbeata/src/GSelect/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ const getOptions = (options: Array<Option> | undefined) => {
});
};

export default forwardRef(function GSelect(props: GSelectProps, ref: any) {
const GSelect = forwardRef(function GSelect(props: GSelectProps, ref: any) {
const { options } = props;
return (
<Select ref={ref} {...omitObj(props, 'options')}>
{getOptions(options)}
</Select>
);
});

export default GSelect;
4 changes: 3 additions & 1 deletion packages/gbeata/src/GTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export const setTableDefaultProps = (props: AnyKeyProps) => {
tableDefaultProps = props;
};

export default forwardRef(function GTable(props: GTableProps, ref) {
const GTable = forwardRef(function GTable(props: GTableProps, ref) {
const {
className,
rowClassName,
Expand Down Expand Up @@ -567,3 +567,5 @@ export default forwardRef(function GTable(props: GTableProps, ref) {
</GListContext.Provider>
);
});

export default GTable;
4 changes: 3 additions & 1 deletion packages/gbeata/src/MwSelect/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ const getOptions = (options: Array<Option> | undefined) => {
});
};

export default forwardRef(function GSelect(props: GSelectProps, ref: any) {
const GSelect = forwardRef(function GSelect(props: GSelectProps, ref: any) {
const { options } = props;
return (
<Select ref={ref} {...omitObj(props, 'options')}>
{getOptions(options)}
</Select>
);
});

export default GSelect;

0 comments on commit dd4db27

Please sign in to comment.