From 517a560bc62c2645c790acf48817ca1c4883c2da Mon Sep 17 00:00:00 2001 From: chilingling Date: Fri, 24 Oct 2025 09:01:05 +0800 Subject: [PATCH] feat: return app instance from init functions --- packages/design-core/src/init.js | 2 ++ packages/design-core/src/preview/src/main.js | 2 ++ 2 files changed, 4 insertions(+) diff --git a/packages/design-core/src/init.js b/packages/design-core/src/init.js index c5413fe8ea..7a65d71b5f 100644 --- a/packages/design-core/src/init.js +++ b/packages/design-core/src/init.js @@ -151,4 +151,6 @@ export const init = async ({ app.mount(selector) appMounted?.({ app }) + + return app } diff --git a/packages/design-core/src/preview/src/main.js b/packages/design-core/src/preview/src/main.js index a021f48040..68b5075929 100644 --- a/packages/design-core/src/preview/src/main.js +++ b/packages/design-core/src/preview/src/main.js @@ -30,4 +30,6 @@ export const initPreview = ({ registry, lifeCycles = {} }) => { initSvgs(app) app.mount('#app') + + return app }