feat: 将Markdown渲染改为HTML渲染
- CMS相关字段由Markdown改为WYSIWYG,前端做出对应更改 - AssetUrl重写:将CMS地址重写为本地API
This commit is contained in:
@ -4,7 +4,14 @@
|
||||
<app-breadcrumb class="breadcrumb" :items="breadcrumbItems" />
|
||||
|
||||
<div class="content">
|
||||
<markdown-renderer :content="companyProfile.content || ''" />
|
||||
<!-- eslint-disable-next-line vue/no-v-html -->
|
||||
<div v-if="!hydrated" v-html="companyProfile.content || ''" />
|
||||
<div v-else>
|
||||
<html-renderer
|
||||
class="html-typography"
|
||||
:html="companyProfile.content || ''"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-divider content-position="left">{{ $t('learn-more') }}</el-divider>
|
||||
@ -28,6 +35,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
const localePath = useLocalePath();
|
||||
const hydrated = ref(false);
|
||||
const breadcrumbItems = [
|
||||
{ label: $t('navigation.home'), to: localePath('/') },
|
||||
{ label: $t('navigation.about-us') },
|
||||
@ -44,6 +52,10 @@
|
||||
useHead({
|
||||
title: pageTitle,
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
hydrated.value = true;
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@ -62,14 +74,6 @@
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
:deep(.markdown-body p) {
|
||||
text-indent: 2em;
|
||||
}
|
||||
|
||||
:deep(.markdown-body h2) {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
:deep(.el-divider__text) {
|
||||
color: var(--el-color-info);
|
||||
font-size: 1em;
|
||||
|
||||
@ -7,7 +7,14 @@
|
||||
</div>
|
||||
|
||||
<div v-if="!pending" class="page-content">
|
||||
<markdown-renderer :content="contactInfo.content || ''" />
|
||||
<!-- eslint-disable-next-line vue/no-v-html -->
|
||||
<div v-if="!hydrated" v-html="contactInfo?.content || ''" />
|
||||
<div v-else>
|
||||
<html-renderer
|
||||
class="html-typography"
|
||||
:html="contactInfo?.content || ''"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="loading">
|
||||
<el-skeleton :rows="5" animated />
|
||||
@ -17,6 +24,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
const localePath = useLocalePath();
|
||||
const hydrated = ref(false);
|
||||
const breadcrumbItems = [
|
||||
{ label: $t('navigation.home'), to: localePath('/') },
|
||||
{ label: $t('navigation.support'), to: localePath('/support') },
|
||||
@ -34,6 +42,10 @@
|
||||
usePageSeo({
|
||||
title: pageTitle,
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
hydrated.value = true;
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user