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 f11dd42 commit 1338e45
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/gbeata/.babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"presets": ["@babel/preset-env"]
"presets": ["@babel/preset-env"],
"plugins": [["transform-rename-import", { "original": "_default" }]]
}
1 change: 1 addition & 0 deletions packages/gbeata/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
"@types/react-dom": "^18.0.0",
"@umijs/lint": "^4.0.0",
"babel-plugin-import": "^1.13.8",
"babel-plugin-transform-rename-import": "^2.3.0",
"classnames": "^2.3.2",
"dumi": "^2.2.13",
"eslint": "^8.23.0",
Expand Down
37 changes: 36 additions & 1 deletion packages/gbeata/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,42 @@ import GTable, {
} from './GTable';

import { default as GTagGroup } from './GTagGroup';
export const init = {
export {
GAction,
GButton,
GCard,
GCardGroup,
GCtrl,
GDialog,
GDialogForm,
GField,
GFields,
GForm,
GSearch,
GSearchList,
GSearchTable,
GSelect,
GTable,
GTagGroup,
Selection,
SelectionAll,
error,
info,
registerAction,
registerField,
registerTableRender,
setDefaultDataFilter,
setDefaultSearchFilter,
setGlobalDialogField,
setPermissionList,
setSearchDefaultVisibleRow,
setSearchTableDefaultValue,
setTableDefaultProps,
success,
warning,
};

const init = {
success,
info,
GCard,
Expand Down
9 changes: 9 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1338e45

Please sign in to comment.