mirror of
https://github.com/Spythere/pojazdownik.git
synced 2026-05-05 04:28:10 +00:00
feature: routing pomiędzy tabami
This commit is contained in:
+12
@@ -77,6 +77,18 @@ export default defineComponent({
|
|||||||
).json();
|
).json();
|
||||||
|
|
||||||
this.store.stockData = stockData;
|
this.store.stockData = stockData;
|
||||||
|
|
||||||
|
// routing
|
||||||
|
switch (window.location.pathname) {
|
||||||
|
case '/numgnr':
|
||||||
|
this.store.stockSectionMode = 'number-generator';
|
||||||
|
break;
|
||||||
|
case '/stockgnr':
|
||||||
|
this.store.stockSectionMode = 'stock-generator';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<section class="logo-section">
|
<section class="logo-section" @click="navigate">
|
||||||
<img src="/images/logo.svg" alt="logo pojazdownik" />
|
<img src="/images/logo.svg" alt="logo pojazdownik" />
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
@@ -9,6 +9,12 @@ export default {
|
|||||||
setup() {
|
setup() {
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
navigate() {
|
||||||
|
window.location.pathname = '';
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -21,6 +27,8 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
img {
|
img {
|
||||||
|
|||||||
Reference in New Issue
Block a user