Answer the question
In order to leave comments, you need to log in
How to set visibility between two apps in vuejs?
There are two
main applications - a personal account on vue
chat - a separate application on vue
in a personal account there is a button in the header - open a chat
How can I launch a modal window in a chat using this button?
I'm trying to do this:
I added the class "toolbar-chat-button" to the button
And added the following code to the chat component
created() {
document.addEventListener("DOMContentLoaded", function() {
let crmButton = document.querySelectorAll(".toolbar-chat-button");
crmButton.forEach(function(button) {
button.addEventListener("click", function(event) {
this.openChatDialog()
});
});
});
},
Answer the question
In order to leave comments, you need to log in
In an application with a button, generate a CustomEvent on window when clicked.
And in another application, just subscribe to this event.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question