feat: add skeleton on no content that looks like loading
This commit is contained in:
@@ -63,12 +63,14 @@ const renderedContent = computed(() =>
|
|||||||
: store.readme,
|
: store.readme,
|
||||||
)
|
)
|
||||||
|
|
||||||
const hasContent = computed(() => !!renderedContent.value)
|
|
||||||
const isLoading = computed(() => renderedContent.value === undefined)
|
const isLoading = computed(() => renderedContent.value === undefined)
|
||||||
|
const hasContent = computed(() => !!renderedContent.value)
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
renderedContent,
|
renderedContent,
|
||||||
async () => {
|
async () => {
|
||||||
|
console.log(renderedContent.value)
|
||||||
|
|
||||||
await nextTick()
|
await nextTick()
|
||||||
listenToClick()
|
listenToClick()
|
||||||
},
|
},
|
||||||
@@ -112,7 +114,15 @@ onUnmounted(() => {
|
|||||||
</div>
|
</div>
|
||||||
<slot />
|
<slot />
|
||||||
<lite-loading v-if="isLoading" />
|
<lite-loading v-if="isLoading" />
|
||||||
<div v-else-if="!hasContent">No content here 📝</div>
|
<div v-else-if="!hasContent" class="flex w-full flex-col gap-4">
|
||||||
|
<div class="skeleton h-4 w-full"></div>
|
||||||
|
<div class="skeleton h-4 w-full"></div>
|
||||||
|
<div class="skeleton h-4 w-full"></div>
|
||||||
|
<div class="skeleton h-4 w-full"></div>
|
||||||
|
<div class="skeleton h-4 w-full"></div>
|
||||||
|
<div class="skeleton h-4 w-full"></div>
|
||||||
|
<div class="skeleton h-4 w-28"></div>
|
||||||
|
</div>
|
||||||
<p
|
<p
|
||||||
v-else-if="withContent"
|
v-else-if="withContent"
|
||||||
class="note-display"
|
class="note-display"
|
||||||
|
|||||||
Reference in New Issue
Block a user