ff-admin/src/components/AppIcon.vue

27 lines
667 B
Vue
Raw Normal View History

2025-04-28 14:36:47 +02:00
<template>
2025-04-30 10:51:07 +02:00
<img ref="icon" :src="url + '/api/public/icon.png'" alt="LOGO" class="h-full w-auto" />
2025-04-28 14:36:47 +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: {
icon() {
(this.$refs.icon as HTMLImageElement).src = url + "/api/public/icon.png?" + new Date().getTime();
},
},
computed: {
...mapState(useSettingStore, ["readSetting"]),
icon() {
return this.readSetting("club.icon");
},
},
});
2025-04-28 14:36:47 +02:00
</script>