@blueking/bk-weweb 0.0.35-beta.6 → 0.0.35-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +2 -0
- package/dist/index.esm.js +3 -0
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -618,6 +618,8 @@ interface BaseModel {
|
|
|
618
618
|
url: string;
|
|
619
619
|
/** 获取资源的函数 */
|
|
620
620
|
fetchSource?: typeof fetchSource;
|
|
621
|
+
/** 传递给应用的数据 */
|
|
622
|
+
data: Record<string, unknown>;
|
|
621
623
|
/** 激活应用 */
|
|
622
624
|
activated<T = unknown>(container: ContainerType, callback?: CallbackFunction<T>): void;
|
|
623
625
|
/** 停用应用 */
|
package/dist/index.esm.js
CHANGED
|
@@ -2784,6 +2784,8 @@ async function loadApp(props) {
|
|
|
2784
2784
|
if (!instance) {
|
|
2785
2785
|
instance = new MicroAppModel(props);
|
|
2786
2786
|
appCache.setApp(instance);
|
|
2787
|
+
} else {
|
|
2788
|
+
instance.data = props.data || instance.data || {};
|
|
2787
2789
|
}
|
|
2788
2790
|
await instance.start();
|
|
2789
2791
|
return instance;
|
|
@@ -2807,6 +2809,7 @@ function loadInstance(props) {
|
|
|
2807
2809
|
}, STATUS_CHECK_INTERVAL);
|
|
2808
2810
|
return;
|
|
2809
2811
|
}
|
|
2812
|
+
instance.data = props.data || instance.data || {};
|
|
2810
2813
|
resolve(instance);
|
|
2811
2814
|
});
|
|
2812
2815
|
}
|