Skip to content

Commit 67e613f

Browse files
authored
feat: return app instance from init functions (opentiny#1680)
1 parent 31c29a2 commit 67e613f

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

packages/design-core/src/init.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,4 +151,6 @@ export const init = async ({
151151

152152
app.mount(selector)
153153
appMounted?.({ app })
154+
155+
return app
154156
}

packages/design-core/src/preview/src/main.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,6 @@ export const initPreview = ({ registry, lifeCycles = {} }) => {
3030
initSvgs(app)
3131

3232
app.mount('#app')
33+
34+
return app
3335
}

0 commit comments

Comments
 (0)