Files
jinshen-website/app/components/pages/solutions/SolutionDetail.vue
R2m1liA ec9a097ef5
All checks were successful
deploy to server / build-and-deploy (push) Successful in 2m56s
fix: 暂时弃用html-renderer将html渲染回滚到v-html
- 增添table样式
2025-11-14 13:29:00 +08:00

60 lines
1.3 KiB
Vue

<template>
<article class="solution-defail">
<header class="solution-header">
<h1 class="solution-title">{{ solution.title }}</h1>
<p class="solution-summary">{{ solution.summary }}</p>
</header>
<section class="solution-content">
<!-- eslint-disable-next-line vue/no-v-html -->
<div class="html-typography" v-html="solution?.content || ''" />
<!-- <div v-if="!hydrated" v-html="solution?.content || ''" /> -->
<!-- <div v-else> -->
<!-- <html-renderer class="html-typography" :html="solution.content || ''" /> -->
<!-- </div> -->
</section>
</article>
</template>
<script setup lang="ts">
defineProps({
solution: {
type: Object as PropType<SolutionView>,
default: null,
},
});
const hydrated = ref(false);
onMounted(() => {
hydrated.value = true;
});
</script>
<style scoped>
.solution-title {
font-size: 2rem;
font-weight: bold;
color: var(--el-color-primary);
text-align: center;
}
.solution-meta {
display: flex;
justify-content: center;
gap: 1rem;
margin-bottom: 0.5rem;
font-size: 0.8rem;
color: var(--el-text-color-secondary);
}
.solution-summary {
font-size: 0.8rem;
color: var(--el-text-color-secondary);
text-align: center;
}
.solution-content {
margin-top: 1rem;
}
</style>