106 lines
1.9 KiB
Vue
106 lines
1.9 KiB
Vue
<script setup lang="ts">
|
|
import type { ServiceContentBlock } from '@/types/business/home'
|
|
|
|
interface Props {
|
|
contents: ServiceContentBlock[]
|
|
}
|
|
|
|
defineProps<Props>()
|
|
</script>
|
|
|
|
<template>
|
|
<div v-if="contents.length" class="home-contents">
|
|
<section
|
|
v-for="(block, index) in contents"
|
|
:key="`${block.title}-${index}`"
|
|
class="home-contents__block"
|
|
>
|
|
<h3 class="home-contents__title">
|
|
服务内容
|
|
</h3>
|
|
<div class="home-contents__rich" v-html="block.content" />
|
|
</section>
|
|
</div>
|
|
</template>
|
|
|
|
<style lang="less" scoped>
|
|
.home-contents {
|
|
&__block {
|
|
margin-bottom: @spacing-base;
|
|
padding: @spacing-xl;
|
|
border-radius: @radius-base;
|
|
background: @white;
|
|
min-height: 0;
|
|
box-sizing: border-box;
|
|
|
|
&:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
}
|
|
|
|
&__title {
|
|
margin: 0 0 @spacing-lg;
|
|
font-size: @font-size-xl;
|
|
font-weight: 600;
|
|
line-height: 1.4;
|
|
color: @home-ink;
|
|
}
|
|
|
|
&__rich {
|
|
font-size: 16px;
|
|
line-height: 1.75;
|
|
color: @home-paragraph;
|
|
word-break: break-word;
|
|
|
|
:deep(p) {
|
|
margin: 0 0 @spacing-sm;
|
|
}
|
|
|
|
:deep(ol),
|
|
:deep(ul) {
|
|
margin: 0 0 @spacing-sm;
|
|
padding-left: 1.4em;
|
|
}
|
|
|
|
:deep(li) {
|
|
margin-bottom: 2px;
|
|
}
|
|
|
|
:deep(img),
|
|
:deep(video) {
|
|
display: block;
|
|
max-width: 100%;
|
|
margin: 0 auto @spacing-lg;
|
|
border-radius: @radius-base;
|
|
}
|
|
|
|
:deep(h1),
|
|
:deep(h2),
|
|
:deep(h3),
|
|
:deep(h4) {
|
|
margin: @spacing-base 0 @spacing-sm;
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
color: @home-ink;
|
|
}
|
|
|
|
:deep(table) {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
margin-bottom: @spacing-sm;
|
|
}
|
|
|
|
:deep(td),
|
|
:deep(th) {
|
|
padding: @spacing-xs @spacing-sm;
|
|
border: 1px solid @border-color;
|
|
font-size: 14px;
|
|
}
|
|
|
|
:deep(a) {
|
|
color: @primary-color;
|
|
}
|
|
}
|
|
}
|
|
</style>
|