fix: 暂时弃用html-renderer将html渲染回滚到v-html
All checks were successful
deploy to server / build-and-deploy (push) Successful in 2m56s

- 增添table样式
This commit is contained in:
2025-11-14 13:29:00 +08:00
parent 3fb28c3f00
commit ec9a097ef5
6 changed files with 79 additions and 32 deletions

View File

@ -3,13 +3,14 @@
<el-tabs v-model="activeName" class="product-tabs" stretch>
<el-tab-pane :label="$t('product-tab.details')" name="details">
<!-- eslint-disable-next-line vue/no-v-html -->
<div v-if="!hydrated" v-html="product.description || ''" />
<div v-else>
<html-renderer
class="html-typography"
:html="product.description || ''"
/>
</div>
<div class="html-typography" v-html="product?.description || ''" />
<!-- <div v-if="!hydrated" v-html="product.description || ''" /> -->
<!-- <div v-else> -->
<!-- <html-renderer -->
<!-- class="html-typography" -->
<!-- :html="product.description || ''" -->
<!-- /> -->
<!-- </div> -->
</el-tab-pane>
<el-tab-pane :label="$t('product-tab.specs')" name="specs">
<spec-table :data="product.specs" />

View File

@ -6,10 +6,11 @@
</header>
<section class="solution-content">
<!-- eslint-disable-next-line vue/no-v-html -->
<div v-if="!hydrated" v-html="solution?.content || ''" />
<div v-else>
<html-renderer class="html-typography" :html="solution.content || ''" />
</div>
<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>

View File

@ -9,13 +9,14 @@
:name="question.id"
>
<!-- eslint-disable-next-line vue/no-v-html -->
<div v-if="!hydrated" v-html="question.content" />
<div v-else>
<html-renderer
class="html-typography"
:html="question.content || ''"
/>
</div>
<div class="html-typography" v-html="question.content || ''" />
<!-- <div v-if="!hydrated" v-html="question.content" /> -->
<!-- <div v-else> -->
<!-- <html-renderer -->
<!-- class="html-typography" -->
<!-- :html="question.content || ''" -->
<!-- /> -->
<!-- </div> -->
</el-collapse-item>
</el-collapse>
</div>