current projects use vue, and native websocket. After logging in to the business, I use a unified js file as the entry for processing websocket, including websocket creation, connection, and message processing. I thought the message I was dealing with was simple. Now I find that I need to use the websocket object of new at login in the component, and then I use vuex as the storage. But I"m worried that the business of vuex"s websocket fetched in the business component will override the onmessage method. It turns out that part of the business is written in the entry and about the onmessage method, but it is not possible to handle all the business in the js of the websocket entry. So it"s annoying. Ask whether writing the onmessage method in the component will overwrite the original, and do you have any experience or methods to deal with it?