Commit 7e0358d4 authored by chenqikuai's avatar chenqikuai

fix: 修复富文本编辑器样式

parent 007a10c0
......@@ -201,4 +201,24 @@ export default defineComponent({
display: flex;
flex-direction: row;
}
.vhtml {
h1 {
font-size: 1.4rem !important;
font-weight: 300 !important;
line-height: 1.5rem !important;
letter-spacing: -0.01562em !important;
}
h2 {
font-size: 1.2rem !important;
font-weight: 300 !important;
line-height: 1.5rem !important;
letter-spacing: -0.01562em !important;
}
h3 {
font-size: 1rem !important;
font-weight: 300 !important;
line-height: 1.5rem !important;
letter-spacing: -0.01562em !important;
}
}
</style>
......@@ -4,7 +4,7 @@
<p class="text-base text-gray-800 font-semibold">{{ title }}</p>
<p class="text-xs text-gray-400 mt-5">发布时间 {{ timestampFormat(update_at) }}</p>
<img :src="src" class="text-center" />
<p class="text-sm text-gray-800 text-justify mt-5" v-html="content"></p>
<p class="text-sm text-gray-800 text-justify mt-5 vhtml" v-html="content"></p>
</div>
</template>
......
<template>
<nav-bar :title="title" :style="{ 'background-color':'#F7F7FA'}" />
<div class=" px-5 py-8 overflow-hidden break-all">
<p class=" text-base text-gray-800 font-semibold">{{ info.title }}</p>
<p class=" text-xs text-gray-400 mt-5 ">发布时间:{{ $format(info.update_at, 'YYYY-MM-DD') }} <span v-if="title === '政策详情'" class="inline-block ml-8">作者:{{ info.writer }}</span> </p>
<div class=" text-sm text-gray-800 text-justify mt-5" v-html="info.content"></div>
<nav-bar :title="title" :style="{ 'background-color': '#F7F7FA' }" />
<div class="px-5 py-8 overflow-hidden break-all">
<p class="text-base text-gray-800 font-semibold">{{ info.title }}</p>
<p class="text-xs text-gray-400 mt-5">
发布时间:{{ $format(info.update_at, 'YYYY-MM-DD') }}
<span
v-if="title === '政策详情'"
class="inline-block ml-8"
>作者:{{ info.writer }}</span>
</p>
<div class="text-sm text-gray-800 text-justify mt-5 vhtml" v-html="info.content"></div>
</div>
</template>
......@@ -14,8 +20,8 @@ import NavBar from "@/components/NavBar/index.vue"
import { getDetails, getPolicyDetails } from '@/service/NewsService/index'
export default defineComponent({
components:{ NavBar },
setup () {
components: { NavBar },
setup() {
let info = ref({})
let title = ref('')
const route = useRoute()
......@@ -36,6 +42,6 @@ export default defineComponent({
})
</script>
<style scoped>
<style lang="less">
</style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment