mirror of
https://github.com/BlossomiShymae/clean-cuts.git
synced 2025-12-06 10:10:47 +01:00
Attempt to fix LDRS on live
This commit is contained in:
@@ -1,6 +1,4 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import 'ldrs/dotStream';
|
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
src: string | undefined,
|
src: string | undefined,
|
||||||
imgClass?: string
|
imgClass?: string
|
||||||
@@ -8,10 +6,15 @@ const props = defineProps<{
|
|||||||
|
|
||||||
const source = ref(props.src);
|
const source = ref(props.src);
|
||||||
const loading = ref(true);
|
const loading = ref(true);
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
const { dotStream } = await import('ldrs');
|
||||||
|
dotStream.register();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="d-flex justify-content-center align-items-center">
|
<ClientOnly class="d-flex justify-content-center align-items-center">
|
||||||
<l-dot-stream v-if="loading"
|
<l-dot-stream v-if="loading"
|
||||||
class="w-100 h-100"
|
class="w-100 h-100"
|
||||||
size="60"
|
size="60"
|
||||||
@@ -23,5 +26,5 @@ const loading = ref(true);
|
|||||||
loading="lazy"
|
loading="lazy"
|
||||||
v-on:load="loading = false;"
|
v-on:load="loading = false;"
|
||||||
v-on:error="loading = false; source = '/clean-cuts/img/error.png';" />
|
v-on:error="loading = false; source = '/clean-cuts/img/error.png';" />
|
||||||
</div>
|
</ClientOnly>
|
||||||
</template>
|
</template>
|
||||||
Reference in New Issue
Block a user