[Vuejs]-How to get out the data from created application with method in VUE 3

0👍

Application instance isn’t root component instance. In order to access a component, a reference should be additionally stored.

As the documentation shows:

const app = Vue.createApp(RootComponent)
const vm = app.mount('#app')

Then vm is supposed to have showData, etc.

Leave a comment