feat: 页面懒加载 #98
@ -6,7 +6,10 @@
|
|||||||
<app-breadcrumb class="breadcrumb" :items="breadcrumbItems" />
|
<app-breadcrumb class="breadcrumb" :items="breadcrumbItems" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="!pending" class="page-content">
|
<div v-if="pending" class="page-content">
|
||||||
|
<el-skeleton :rows="5" animated />
|
||||||
|
</div>
|
||||||
|
<div v-else class="page-content">
|
||||||
<!-- eslint-disable-next-line vue/no-v-html -->
|
<!-- eslint-disable-next-line vue/no-v-html -->
|
||||||
<div class="html-typography" v-html="contactInfo?.content || ''" />
|
<div class="html-typography" v-html="contactInfo?.content || ''" />
|
||||||
<!-- <div v-if="!hydrated" v-html="contactInfo?.content || ''" /> -->
|
<!-- <div v-if="!hydrated" v-html="contactInfo?.content || ''" /> -->
|
||||||
@ -17,9 +20,6 @@
|
|||||||
<!-- /> -->
|
<!-- /> -->
|
||||||
<!-- </div> -->
|
<!-- </div> -->
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="loading">
|
|
||||||
<el-skeleton :rows="5" animated />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -31,7 +31,7 @@
|
|||||||
{ label: $t('navigation.support'), to: localePath('/support') },
|
{ label: $t('navigation.support'), to: localePath('/support') },
|
||||||
{ label: $t('navigation.contact-info') },
|
{ label: $t('navigation.contact-info') },
|
||||||
];
|
];
|
||||||
const { data: contactInfo, pending, error } = await useContactInfo();
|
const { data: contactInfo, pending, error } = useContactInfo();
|
||||||
|
|
||||||
watch(error, (value) => {
|
watch(error, (value) => {
|
||||||
if (value) {
|
if (value) {
|
||||||
|
|||||||
@ -1,15 +1,30 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="page-container">
|
<div class="page-container">
|
||||||
<div v-if="pending">
|
<div>
|
||||||
<el-skeleton :rows="5" animated />
|
|
||||||
</div>
|
|
||||||
<div v-else>
|
|
||||||
<support-tabs model-value="documents" />
|
<support-tabs model-value="documents" />
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<h1 class="page-title">{{ $t('navigation.documents') }}</h1>
|
<h1 class="page-title">{{ $t('navigation.documents') }}</h1>
|
||||||
<app-breadcrumb class="breadcrumb" :items="breadcrumbItems" />
|
<app-breadcrumb class="breadcrumb" :items="breadcrumbItems" />
|
||||||
</div>
|
</div>
|
||||||
<div class="page-content">
|
<div v-if="pending" class="page-content">
|
||||||
|
<el-skeleton :rows="10" animated class="py-4" throttle="100">
|
||||||
|
<template #template>
|
||||||
|
<div class="flex flex-col gap-xl">
|
||||||
|
<el-skeleton-item
|
||||||
|
variant="rect"
|
||||||
|
style="width: 100%; height: 100px"
|
||||||
|
/>
|
||||||
|
<el-skeleton-item
|
||||||
|
v-for="i in 10"
|
||||||
|
:key="i"
|
||||||
|
variant="h1"
|
||||||
|
style="height: 60px"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-skeleton>
|
||||||
|
</div>
|
||||||
|
<div v-else class="page-content">
|
||||||
<document-filter
|
<document-filter
|
||||||
v-model="filters"
|
v-model="filters"
|
||||||
:product-type-options="productTypeOptions"
|
:product-type-options="productTypeOptions"
|
||||||
@ -56,7 +71,7 @@
|
|||||||
const page = ref(1);
|
const page = ref(1);
|
||||||
const documentsPerPage = 10;
|
const documentsPerPage = 10;
|
||||||
|
|
||||||
const { data: documents, pending, error } = await useDocumentList();
|
const { data: documents, pending, error } = useDocumentList();
|
||||||
|
|
||||||
const documentTypeOptions = computed(() => {
|
const documentTypeOptions = computed(() => {
|
||||||
const types: DocumentTypeView[] = [];
|
const types: DocumentTypeView[] = [];
|
||||||
|
|||||||
@ -1,34 +1,47 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="page-container">
|
<div class="page-container">
|
||||||
<div v-if="pending" class="flex justify-center items-center h-64">
|
<support-tabs model-value="faq" />
|
||||||
<el-skeleton :rows="6" animated />
|
<div class="page-header">
|
||||||
|
<h1 class="page-title">{{ $t('navigation.faq') }}</h1>
|
||||||
|
<app-breadcrumb class="breadcrumb" :items="breadcrumbItems" />
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
|
||||||
<support-tabs model-value="faq" />
|
|
||||||
<div class="page-header">
|
|
||||||
<h1 class="page-title">{{ $t('navigation.faq') }}</h1>
|
|
||||||
<app-breadcrumb class="breadcrumb" :items="breadcrumbItems" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="page-content">
|
<div v-if="pending" class="page-content">
|
||||||
<question-filter
|
<el-skeleton :rows="10" animated class="py-4" throttle="100">
|
||||||
v-model="filters"
|
<template #template>
|
||||||
:product-type-options="productTypeOptions"
|
<div class="flex flex-col gap-xl">
|
||||||
:product-options="productOptions"
|
<el-skeleton-item
|
||||||
:question-type-options="questionTypeOptions"
|
variant="rect"
|
||||||
/>
|
style="width: 100%; height: 100px"
|
||||||
|
/>
|
||||||
|
<el-skeleton-item
|
||||||
|
v-for="i in 10"
|
||||||
|
:key="i"
|
||||||
|
variant="h1"
|
||||||
|
style="height: 60px"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-skeleton>
|
||||||
|
</div>
|
||||||
|
<div v-else class="page-content">
|
||||||
|
<question-filter
|
||||||
|
v-model="filters"
|
||||||
|
:product-type-options="productTypeOptions"
|
||||||
|
:product-options="productOptions"
|
||||||
|
:question-type-options="questionTypeOptions"
|
||||||
|
/>
|
||||||
|
|
||||||
<question-list :questions="paginatedQuestions" />
|
<question-list :questions="paginatedQuestions" />
|
||||||
|
|
||||||
<el-pagination
|
<el-pagination
|
||||||
v-model:current-page="page"
|
v-model:current-page="page"
|
||||||
class="justify-center pagination-container"
|
class="justify-center pagination-container"
|
||||||
layout="prev, pager, next"
|
layout="prev, pager, next"
|
||||||
hide-on-single-page
|
hide-on-single-page
|
||||||
:page-size="questionsPerPage"
|
:page-size="questionsPerPage"
|
||||||
:total="filteredQuestions.length"
|
:total="filteredQuestions.length"
|
||||||
/>
|
/>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -57,7 +70,7 @@
|
|||||||
{ label: $t('navigation.faq') },
|
{ label: $t('navigation.faq') },
|
||||||
];
|
];
|
||||||
|
|
||||||
const { data: questions, pending, error } = await useQuestionList();
|
const { data: questions, pending, error } = useQuestionList();
|
||||||
|
|
||||||
const questionTypeOptions = computed(() => {
|
const questionTypeOptions = computed(() => {
|
||||||
const types: QuestionTypeView[] = [];
|
const types: QuestionTypeView[] = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user