When go executes EventsEmit, but the front-end does not listen to the data carried by this event
You must load the page through routing on the front-end before you can listen to events,
The listening events for JS are in the. ts file
To Reproduce
Write an EventsEmit listener
Create 2 pages. I created them through Vue
The monitoring of JS is in a separate TS file
Set up routing for 2 pages
Referencing data for listening events on non default routing pages
Calling Go's Listening
At this point, JS did not listen to the data
Jump to the page where you are listening for data and call go again to listen for events
Received listening data
Expected behaviour
No matter which page it is on, if there is listening data during go execution, JS should receive listening data
Screenshots
No response
Attempted Fixes
No response
System Details
# Wails
Version | v2.6.0
# System
┌──────────────────────────────────────┐
| OS | Windows 10 Enterprise |
| Version | 2009 (Build: 22621) |
| ID | 22H2 |
| Go Version | go1.20.4 |
| Platform | windows |
| Architecture | amd64 |
└──────────────────────────────────────┘
# Dependencies
┌───────────────────────────────────────────────────────┐
| Dependency | Package Name | Status | Version |
| WebView2 | N/A | Installed | 119.0.2151.72 |
| Nodejs | N/A | Installed | 18.16.1 |
| npm | N/A | Installed | 9.5.1 |
| *upx | N/A | Available | |
| *nsis | N/A | Available | |
└─────────────── * - Optional Dependency ───────────────┘
Description
When go executes EventsEmit, but the front-end does not listen to the data carried by this event You must load the page through routing on the front-end before you can listen to events, The listening events for JS are in the. ts file
To Reproduce
Expected behaviour
No matter which page it is on, if there is listening data during go execution, JS should receive listening data
Screenshots
No response
Attempted Fixes
No response
System Details
Additional context
vue3 TypeScript vue-router4x