Change to router-transition
This commit is contained in:
@@ -370,7 +370,7 @@ const For = (source, renderFn, keyFn, tag = "div", props = { style: "display:con
|
|||||||
const Router = (routes) => {
|
const Router = (routes) => {
|
||||||
const currentPath = $(window.location.hash.replace(/^#/, "") || "/");
|
const currentPath = $(window.location.hash.replace(/^#/, "") || "/");
|
||||||
window.addEventListener("hashchange", () => currentPath(window.location.hash.replace(/^#/, "") || "/"));
|
window.addEventListener("hashchange", () => currentPath(window.location.hash.replace(/^#/, "") || "/"));
|
||||||
const outlet = Tag("div", { class: "router-outlet" });
|
const outlet = Tag("div", { class: "router-transition" });
|
||||||
let currentView = null;
|
let currentView = null;
|
||||||
|
|
||||||
Watch([currentPath], async () => {
|
Watch([currentPath], async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user