mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-10-04 21:26:08 +08:00
feat(forklift): route and router doesnt work properly on extensions
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
// Mirrors Resource class methods from @shell/plugins/dashboard-store/resource-class.js
|
||||
// useRouter()/useRoute() from vue-router don't work in extension mode,
|
||||
// so we use the same global access pattern the shell uses internally.
|
||||
|
||||
export function currentRouter() {
|
||||
return window.$globalApp.$router;
|
||||
}
|
||||
|
||||
export function currentRoute() {
|
||||
return window.$globalApp.$route;
|
||||
}
|
||||
Reference in New Issue
Block a user