86 lines
2.0 KiB
Vue
86 lines
2.0 KiB
Vue
<template>
|
|
<div class="page-container">
|
|
<support-tabs model-value="contact-us" />
|
|
<div class="page-header">
|
|
<h1 class="page-title">{{ $t('navigation.contact-info') }}</h1>
|
|
<el-breadcrumb class="breadcrumb" separator="/">
|
|
<el-breadcrumb-item class="text-md opacity-50">
|
|
<NuxtLink :to="$localePath('/')">
|
|
{{ $t('navigation.home') }}
|
|
</NuxtLink>
|
|
</el-breadcrumb-item>
|
|
<el-breadcrumb-item class="text-md opacity-50">
|
|
<NuxtLink :to="$localePath('/support')">
|
|
{{ $t('navigation.support') }}
|
|
</NuxtLink>
|
|
</el-breadcrumb-item>
|
|
<el-breadcrumb-item class="text-md opacity-50">
|
|
<NuxtLink :to="$localePath('/support/contact-us')">
|
|
{{ $t('navigation.contact-info') }}
|
|
</NuxtLink>
|
|
</el-breadcrumb-item>
|
|
</el-breadcrumb>
|
|
</div>
|
|
|
|
<div v-if="!pending" class="page-content">
|
|
<markdown-renderer :content="content || ''" />
|
|
</div>
|
|
<div v-else class="loading">
|
|
<el-skeleton :rows="5" animated />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
const { findOne } = useStrapi();
|
|
const { getStrapiLocale } = useLocalizations();
|
|
const strapiLocale = getStrapiLocale();
|
|
|
|
const { data, pending, error } = useAsyncData('contact-info', () =>
|
|
findOne<StrapiContactInfo>('contact-info', undefined, {
|
|
populate: '*',
|
|
locale: strapiLocale,
|
|
})
|
|
);
|
|
|
|
const content = computed(() => data.value?.data.content ?? '');
|
|
|
|
watch(error, (value) => {
|
|
if (value) {
|
|
console.error('数据获取失败: ', value);
|
|
}
|
|
});
|
|
</script>
|
|
|
|
<style scoped>
|
|
.page-container {
|
|
max-width: 1200px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.page-header {
|
|
display: flex;
|
|
padding: 2rem 2rem 0rem;
|
|
}
|
|
|
|
.page-title {
|
|
font-size: 2rem;
|
|
font-weight: bold;
|
|
color: var(--el-color-primary);
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.breadcrumb {
|
|
margin-left: auto;
|
|
}
|
|
|
|
.page-content {
|
|
padding: 2rem;
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
:deep(.markdown-body ul) {
|
|
list-style-type: none;
|
|
}
|
|
</style>
|