back button fix

This commit is contained in:
2023-09-29 12:47:47 +10:00
parent 7cae8af89a
commit 1cd78ce93a

View File

@@ -176,6 +176,15 @@ const handleLoad = async () => {
}
};
window.onpopstate = function (event) {
alert(
"location: " +
document.location +
", state: " +
JSON.stringify(event.state),
);
};
onMounted(() => {
console.log("mounted");
handleLoad();
@@ -184,8 +193,4 @@ onMounted(() => {
onUnmounted(() => {
console.log("unmounted");
});
// window.onpopstate = function(event) {
// alert("location: " + document.location + ", state: " + JSON.stringify(event.state));
// };
</script>