fix: 引入 v-dompurify-html 指令解决 v-html 的安全隐患

This commit is contained in:
shizhong
2023-07-27 18:36:06 +08:00
parent 144be6ef44
commit c2168466f3
7 changed files with 55 additions and 24 deletions

View File

@ -37,7 +37,12 @@
v-if="actionType === 'detail'"
:schema="allSchemas.detailSchema"
:data="detailData"
/>
>
<!-- 展示 HTML 内容 -->
<template #templateContent="{ row }">
<div v-dompurify-html="row.templateContent"></div>
</template>
</Descriptions>
<template #footer>
<!-- 按钮关闭 -->
<XButton :loading="actionLoading" :title="t('dialog.close')" @click="modelVisible = false" />