Skip to content

@caoergou/windows-xp / registry / defineApp

函数:defineApp()

> defineApp<TProps>(config): AppRegistryEntry<TProps>

定义于:src/registry/defineApp.tsx:98

通过一次类型化调用定义一个桌面应用程序。

类型参数

TProps

TProps extends SerializableProps = Record<string, never>

参数

config

DefineAppConfig<TProps>

返回值

AppRegistryEntry<TProps>

示例

tsx
const HelloApp = defineApp({
  id: 'Hello',
  name: 'Hello',
  component: () => <div>Hello from Windows XP!</div>,
});
// <WindowsXP apps={[HelloApp]} />