reload images if updated
This commit is contained in:
parent
939c982c40
commit
751370fed4
2 changed files with 40 additions and 2 deletions
|
@ -1,7 +1,26 @@
|
||||||
<template>
|
<template>
|
||||||
<img :src="url + '/api/public/icon.png'" alt="LOGO" class="h-full w-auto" />
|
<img ref="icon" :src="url + '/api/public/icon.png'" alt="LOGO" class="h-full w-auto" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { url } from "@/serverCom";
|
import { url } from "@/serverCom";
|
||||||
|
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");
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,7 +1,26 @@
|
||||||
<template>
|
<template>
|
||||||
<img :src="url + '/api/public/applogo.png'" alt="LOGO" class="h-full w-auto" />
|
<img ref="logo" :src="url + '/api/public/applogo.png'" alt="LOGO" class="h-full w-auto" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { url } from "@/serverCom";
|
import { url } from "@/serverCom";
|
||||||
|
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");
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Add table
Reference in a new issue