Closed Kosmostars7403 closed 3 years ago
Because You cannot use Vue specific language (like v-on
) in HTML. It's recognizable only in Vue components.
Do You have other questions?
Yes, which way is the best to solve my problem? Wrap
maybe i can trigger any function from Vue-custom-component event without HTML eventListeners?
IMHO treat vue-custom-element as mini app and put that what is shown in example inside custom element
My lead wants external business logic. I need to find the way( Thnx.
maybe i can trigger any function from Vue-custom-component event without HTML eventListeners?
Yes, You have getVueInstance()
, e.g.
document.querySelector('widget-vue').getVueInstance()
Feel free to ask more questions if You still need something different.
I prepared an codesandbox example. How can I make it works? To start a testFunc! Why v-on: doesn't work?
example
Thank you!