@caoergou/windows-xp / registry / DefineAppConfig
接口:DefineAppConfig<TProps>
定义于:src/registry/defineApp.tsx:35
类型参数
TProps
TProps extends SerializableProps
属性
associations?
> optional associations?: AppAssociation<FileNode, unknown>[]
定义于:src/registry/defineApp.tsx:51
使应用可以从 .app 等于 appField 的文件系统节点打开。
component
> component: ComponentType<TProps & object>
定义于:src/registry/defineApp.tsx:56
应用组件。它还可能接收到注入的 windowId。其自身 props(TProps)必须是 JSON 可序列化的(参见 SerializableProps)。
icon?
> optional icon?: string
定义于:src/registry/defineApp.tsx:43
XPIcon id。默认为 'app_window'。
id
> id: string
定义于:src/registry/defineApp.tsx:37
唯一的应用 id(用于打开应用并匹配文件系统的 .app 字段)。
lifecycle?
> optional lifecycle?: AppLifecycle
定义于:src/registry/defineApp.tsx:49
打开 / 关闭 / 聚焦回调(仅运行时有效——不会被持久化)。
locales?
> optional locales?: string[]
定义于:src/registry/defineApp.tsx:45
限制为特定的文化 id(例如 ['zh']);省略表示适用于所有文化。
name
> name: string
定义于:src/registry/defineApp.tsx:39
后备显示名称;i18n 优先使用 nameKey。
nameKey?
> optional nameKey?: string
定义于:src/registry/defineApp.tsx:41
窗口标题的 i18n 键;回退到 name。
window?
> optional window?: AppWindowConfig
定义于:src/registry/defineApp.tsx:47
窗口大小 / 行为。默认为 400×300,非单例,可调整大小。