fix: 补回被合成入口丢掉的 default 导出
button/container/data-converter/data-list/grid-layout/grid-layout-form/
res-ws/virtual-fs 这几个入口的 index.js 都用 export { default as X } from './xxx'
转发了 default 导出,但同级有手写 types/ 目录时会触发合成入口逻辑,用
export * from './index' 拼入口文件,而 export * 在 ES 模块语义里不会带出 default,
导致这些包的 default 导出(部分甚至连实现本身,如 DataConverter、ResWs 整个类)
被 tree-shake 掉,没有出现在最终产物里。
This commit is contained in:
Vendored
+42
-1
@@ -96,6 +96,47 @@ type PopupHandle<T = unknown> = Promise<T> & {
|
||||
*/
|
||||
declare const SlotContext: React.Context<SlotContextValue>;
|
||||
|
||||
/**
|
||||
* 页面级容器,通过 SlotContext 把 title/subTitle/actions/extras 挂载到外层布局的对应插槽位置
|
||||
* @param {Object} props
|
||||
* @param {string} [props.rootClassName] 挂载到外层布局根节点的 className
|
||||
* @param {string} [props.className] 容器自身的 className
|
||||
* @param {ReactNode} [props.children] 容器内容
|
||||
* @param {ReactNode} [props.actions] 挂载到 actions 插槽的内容
|
||||
* @param {ReactNode} [props.title] 挂载到 title 插槽的内容
|
||||
* @param {ReactNode} [props.subTitle] 挂载到 sub-title 插槽的内容
|
||||
* @param {ReactNode} [props.extras] 挂载到 extras 插槽的内容
|
||||
* @param {CSSProperties} [props.style] 容器行内样式
|
||||
*/
|
||||
declare function FFContainer({ rootClassName, className, children, actions, title, subTitle, extras, style }: {
|
||||
rootClassName?: string;
|
||||
className?: string;
|
||||
children?: React.ReactNode;
|
||||
actions?: React.ReactNode;
|
||||
title?: React.ReactNode;
|
||||
subTitle?: React.ReactNode;
|
||||
extras?: React.ReactNode;
|
||||
style?: React.CSSProperties;
|
||||
}): React.JSX.Element;
|
||||
declare namespace FFContainer {
|
||||
function Action({ children, className }: {
|
||||
children: any;
|
||||
className: any;
|
||||
}): any;
|
||||
function Title({ children, className }: {
|
||||
children: any;
|
||||
className: any;
|
||||
}): any;
|
||||
function SubTitle({ children, className }: {
|
||||
children: any;
|
||||
className: any;
|
||||
}): any;
|
||||
function Extra({ children, className }: {
|
||||
children: any;
|
||||
className: any;
|
||||
}): any;
|
||||
}
|
||||
|
||||
declare namespace FFPopup {
|
||||
export { modal };
|
||||
export { confirm };
|
||||
@@ -161,5 +202,5 @@ declare namespace FFPopupRender {
|
||||
function $onClick(...args: any[]): Promise<any>;
|
||||
}
|
||||
|
||||
export { SlotContext as Context, Empty, Loading, NotFound, FFPageRender as PageRender, FFPopup as Popup, FFPopupRender as PopupRender };
|
||||
export { SlotContext as Context, Empty, Loading, NotFound, FFPageRender as PageRender, FFPopup as Popup, FFPopupRender as PopupRender, FFContainer as default };
|
||||
export type { PopupContainerProps, PopupHandle, SlotContextValue, SlotElements, SlotKey };
|
||||
|
||||
Reference in New Issue
Block a user