privatenumber / vue-2-3

↔️ Interop Vue 2 components in Vue 3 apps and vice versa
MIT License
281 stars 10 forks source link

Access global injected props In from Vue 2 to Vue 3 #11

Open RezaErfani67 opened 2 years ago

RezaErfani67 commented 2 years ago

i want to convert vue 2 to vue 3 app Does it support injected prop to global Vue instance? For example this.$dlg or this.$toast and so on... If yes , how to access ?

privatenumber commented 2 years ago

I think it would depend on how those properties are created.

For example, if they are created like this, it should work, but only within the Vue 2 apps:

Vue.prototype.$toast = function (methodOptions) {
    // some logic ...
}
RezaErfani67 commented 2 years ago

i mean Vue 3 app