ff-admin/src/components/AppLogo.vue

27 lines
675 B
Vue
Raw Normal View History

2025-04-24 16:49:14 +02:00
<template>
2025-04-30 10:51:07 +02:00
<img ref="logo" :src="url + '/api/public/applogo.png'" alt="LOGO" class="h-full w-auto" />
2025-04-24 16:49:14 +02:00
</template>
<script setup lang="ts">
import { url } from "@/serverCom";
2025-04-30 10:51:07 +02:00
import { useSettingStore } from "@/stores/admin/management/setting";
import { mapState } from "pinia";
import { defineComponent } from "vue";
</script>
<script lang="ts">
export default defineComponent({
watch: {
logo() {
(this.$refs.logo as HTMLImageElement).src = url + "/api/public/applogo.png?t=" + new Date().getTime();
},
},
computed: {
...mapState(useSettingStore, ["readSetting"]),
logo() {
return this.readSetting("club.logo");
},
},
});
2025-04-24 16:49:14 +02:00
</script>