[F] Fix Github Pages sub path issue by using # after url
This commit is contained in:
@@ -31,7 +31,7 @@ export default class Navigation extends Vue
|
|||||||
|
|
||||||
// Set history state
|
// Set history state
|
||||||
let url = window.location.pathname;
|
let url = window.location.pathname;
|
||||||
if (url == '/' || url == '') url = '/overall';
|
if (url == '/' || url == '') url = '/#overall';
|
||||||
window.history.replaceState({lastTab: url.substring(1)}, '', url);
|
window.history.replaceState({lastTab: url.substring(1)}, '', url);
|
||||||
|
|
||||||
// Update initial index
|
// Update initial index
|
||||||
@@ -84,7 +84,7 @@ export default class Navigation extends Vue
|
|||||||
console.log(`onNavigate: Previous: ${this.activeIndex}, New: ${newIndex}`);
|
console.log(`onNavigate: Previous: ${this.activeIndex}, New: ${newIndex}`);
|
||||||
|
|
||||||
// Check url
|
// Check url
|
||||||
let url = `/${newIndex}`;
|
let url = `/#${newIndex}`;
|
||||||
|
|
||||||
// Push history state
|
// Push history state
|
||||||
window.history.pushState({lastTab: newIndex}, '', url);
|
window.history.pushState({lastTab: newIndex}, '', url);
|
||||||
|
|||||||
Reference in New Issue
Block a user