I'm trying to understand how to create a component using exportable functions. For example: I want to create a message box that will appear on the screen when the showMessage() method imported from this component is called in other components. In the message box component I want to describe the logic and template. How to achieve this? Any documentation/articles on this, if any, would be greatly appreciated.
Mount your message component in App.vue (or other global files),
Control its props through functions in the store
For example
You can then call the message anywhere using piniaStore().showMessage(...)
(This code is just a concept, if you want it to work properly, you need to develop it...)
But I think you can use Quasar framework - Dialog ($q.dialog is exactly what you need!) Or Ionic framework - alert, Vuetify - dialog api, etc. (each framework has these things)