index.tsx 733 Bytes
import { App as AntApp, type AppProps } from 'antd';

export type UAppProps = AppProps;

/**
 * 项目统一的 antd App 边界。
 *
 * 为什么要单独封一层:`import { App } from 'antd'` 在三个子应用里出现了 14 次,
 * 目的全是拿 `App.useApp()` 的 message/notification —— 但那意味着每个页面都直接认识 antd。
 * 子应用不许直引 antd(eslint 门禁),入口层由 @uj/ui 承担,页面只认 useUApp。
 *
 * 挂载点在 platform-sdk 的 SubAppProvider 里(那里是唯一的 ConfigProvider + App 边界),
 * 本组件只给需要显式声明边界的场景用,行为与 antd App 一致。
 */
export function UApp(props: UAppProps) {
  return <AntApp {...props} />;
}