Fixed format of events

This commit is contained in:
Torsten Schulz
2024-06-23 17:32:45 +02:00
parent 692e989861
commit 8b89d8b800
26 changed files with 455 additions and 157 deletions

View File

@@ -5,7 +5,7 @@
</template>
<script>
import { menuData } from '../../config/menuData';
import { mapState } from 'vuex';
export default {
name: 'ImageContent',
@@ -15,6 +15,9 @@ export default {
currentImage: '/images/homepage1.png'
};
},
computed: {
...mapState(['menuData']),
},
watch: {
$route: {
immediate: true,
@@ -26,6 +29,7 @@ export default {
methods: {
updateImage() {
const routePath = this.$route.path;
const menuData = this.menuData;
const menuItem = this.findMenuItemByPath(menuData, routePath);
if (menuItem && menuItem.image) {
this.currentImage = `/images/${menuItem.image}`;