fix: 补全骨架屏渲染机制
- 补全各个页面的骨架屏渲染机制修改
This commit is contained in:
@ -1,23 +1,18 @@
|
||||
<template>
|
||||
<div class="page-container">
|
||||
<div v-if="!pending">
|
||||
<div v-if="solution">
|
||||
<div class="page-header">
|
||||
<app-breadcrumb class="breadcrumb" :items="breadcrumbItems" />
|
||||
</div>
|
||||
<solution-detail :solution="solution" />
|
||||
</div>
|
||||
<div v-else class="not-found">
|
||||
<not-found-result
|
||||
:title="$t('solution-not-found')"
|
||||
:sub-title="$t('solution-not-found-desc')"
|
||||
:back-text="$t('back-to-solutions')"
|
||||
:on-back="() => $router.push($localePath('/solutions'))"
|
||||
/>
|
||||
<div v-if="solution">
|
||||
<div class="page-header">
|
||||
<app-breadcrumb class="breadcrumb" :items="breadcrumbItems" />
|
||||
</div>
|
||||
<solution-detail :solution="solution" />
|
||||
</div>
|
||||
<div v-else class="loading">
|
||||
<el-skeleton :rows="5" animated />
|
||||
<div v-else class="not-found">
|
||||
<not-found-result
|
||||
:title="$t('solution-not-found')"
|
||||
:sub-title="$t('solution-not-found-desc')"
|
||||
:back-text="$t('back-to-solutions')"
|
||||
:on-back="() => $router.push($localePath('/solutions'))"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -29,7 +24,7 @@
|
||||
// 获取路由参数
|
||||
const id = route.params.slug as string;
|
||||
|
||||
const { data: solution, pending, error } = await useSolution(id);
|
||||
const { data: solution, error } = await useSolution(id);
|
||||
|
||||
const breadcrumbItems = computed(() => [
|
||||
{ label: $t('navigation.home'), to: localePath('/') },
|
||||
|
||||
Reference in New Issue
Block a user