Skip to content

Commit

Permalink
fix(skeleton): layout shifting due to delayed rendering (#2383)
Browse files Browse the repository at this point in the history
  • Loading branch information
2eha0 authored Sep 11, 2024
1 parent 7212083 commit 77c4a20
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/KSkeleton/KSkeleton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,12 @@ const props = defineProps({
},
})
const isVisible = ref(false)
const isVisible = ref(props.delayMilliseconds === 0)
onMounted(() => {
if (isVisible.value) {
return
}
setTimeout(() => {
isVisible.value = true
}, props.delayMilliseconds)
Expand Down

0 comments on commit 77c4a20

Please sign in to comment.