Commit 766ec71 1 parent 4f0d707 commit 766ec71 Copy full SHA for 766ec71
File tree 1 file changed +7
-4
lines changed
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 1
1
<script setup lang="ts">
2
- import ' ldrs/dotStream' ;
3
-
4
2
const props = defineProps <{
5
3
src: string | undefined ,
6
4
imgClass? : string
7
5
}>();
8
6
9
7
const source = ref (props .src );
10
8
const loading = ref (true );
9
+
10
+ onMounted (async () => {
11
+ const { dotStream } = await import (' ldrs' );
12
+ dotStream .register ();
13
+ });
11
14
</script >
12
15
13
16
<template >
14
- <div class =" d-flex justify-content-center align-items-center" >
17
+ <ClientOnly class =" d-flex justify-content-center align-items-center" >
15
18
<l-dot-stream v-if =" loading"
16
19
class =" w-100 h-100"
17
20
size =" 60"
@@ -23,5 +26,5 @@ const loading = ref(true);
23
26
loading =" lazy"
24
27
v-on:load =" loading = false;"
25
28
v-on:error =" loading = false; source = '/clean-cuts/img/error.png';" />
26
- </div >
29
+ </ClientOnly >
27
30
</template >
You can’t perform that action at this time.
0 commit comments