From e74a59939ba3e89d7799d5fec6c091111ad80aaf Mon Sep 17 00:00:00 2001 From: colgin Date: Wed, 31 Aug 2022 16:20:41 +0800 Subject: [PATCH] fix: preload options type --- docs/api/preloadApp.md | 2 +- packages/wujie-core/src/index.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/api/preloadApp.md b/docs/api/preloadApp.md index 1800e1a40..0e55efc2c 100644 --- a/docs/api/preloadApp.md +++ b/docs/api/preloadApp.md @@ -12,7 +12,7 @@ type preOptions { /** 唯一性用户必须保证 */ name: string; /** 需要渲染的url */ - url: string; + url?: string; /** 注入给子应用的数据 */ props?: { [key: string]: any }; /** 自定义iframe属性 */ diff --git a/packages/wujie-core/src/index.ts b/packages/wujie-core/src/index.ts index 130b412f8..522bc5450 100644 --- a/packages/wujie-core/src/index.ts +++ b/packages/wujie-core/src/index.ts @@ -103,9 +103,9 @@ type baseOptions = { loadError?: loadErrorHandler; }; -export type preOptions = baseOptions & { - /** 预执行 */ - exec?: boolean; +export type preOptions = Partial & { + /** 唯一性用户必须保证 */ + name: string; }; export type startOptions = baseOptions & {