fix: 调整关于我们页面渲染机制
All checks were successful
deploy to server / build-and-deploy (push) Successful in 3m3s

- 骨架屏:骨架屏由el-skeleton模板控制
This commit is contained in:
2025-12-19 12:53:01 +08:00
parent f1116491b6
commit f2533767d2

View File

@ -1,36 +1,37 @@
<template>
<div class="page-container">
<div v-if="!pending">
<app-breadcrumb class="breadcrumb" :items="breadcrumbItems" />
<app-breadcrumb class="breadcrumb" :items="breadcrumbItems" />
<div class="content">
<!-- eslint-disable-next-line vue/no-v-html -->
<div class="html-typography" v-html="companyProfile.content || ''" />
<!-- <div v-if="!hydrated" v-html="companyProfile.content || ''" /> -->
<!-- <div v-else> -->
<!-- <html-renderer -->
<!-- class="html-typography" -->
<!-- :html="companyProfile.content || ''" -->
<!-- /> -->
<!-- </div> -->
</div>
<div class="content">
<el-skeleton :loading="pending" :rows="10" animated>
<template #default>
<!-- eslint-disable-next-line vue/no-v-html -->
<div class="html-typography" v-html="companyProfile?.content || ''" />
<!-- <div v-if="!hydrated" v-html="companyProfile.content || ''" /> -->
<!-- <div v-else> -->
<!-- <html-renderer -->
<!-- class="html-typography" -->
<!-- :html="companyProfile.content || ''" -->
<!-- /> -->
<!-- </div> -->
<el-divider content-position="left">{{ $t('learn-more') }}</el-divider>
<div class="button-group">
<learn-more-card
:title="$t('navigation.contact-info')"
:icon="ElIconService"
:to="$localePath('/support/contact-us')"
/>
<learn-more-card
:title="$t('navigation.address')"
:icon="ElIconMapLocation"
@click="openMap"
/>
</div>
</div>
<div v-else class="loading">
<el-skeleton :rows="5" animated />
<el-divider content-position="left">{{
$t('learn-more')
}}</el-divider>
<div class="button-group">
<learn-more-card
:title="$t('navigation.contact-info')"
:icon="ElIconService"
:to="$localePath('/support/contact-us')"
/>
<learn-more-card
:title="$t('navigation.address')"
:icon="ElIconMapLocation"
@click="openMap"
/>
</div>
</template>
</el-skeleton>
</div>
</div>
</template>
@ -42,7 +43,9 @@
{ label: $t('navigation.home'), to: localePath('/') },
{ label: $t('navigation.about-us') },
];
const { data: companyProfile, pending, error } = await useCompanyProfile();
const { data, pending, error } = useCompanyProfile();
const companyProfile = computed(() => data.value ?? null);
const openMap = () => {
window.open(localePath('/locate'));