feat:用shadow dom隔离html样式

This commit is contained in:
caiyuchao
2025-09-19 17:18:14 +08:00
parent 36524fa9ef
commit c1020dc5ff
5 changed files with 75 additions and 5 deletions

View File

@@ -7,6 +7,7 @@ import dayjs from 'dayjs';
import { useVbenVxeGrid } from '#/adapter/vxe-table';
import { exportProject, getProgressByProjectPage } from '#/api/report/progress';
import { ShadowContainer } from '#/components/shadow-container';
import { useProjectGridColumns, useProjectGridFormSchema } from '../data';
@@ -149,5 +150,15 @@ const [Grid, gridApi] = useVbenVxeGrid({
</script>
<template>
<Grid table-title="项目进展" />
<Grid table-title="项目进展">
<template #contentDefault="{ row }">
<!-- <div v-html="row.content" style="white-space: pre-wrap"></div> -->
<ShadowContainer
:content="row.content"
styles="font-family: -apple-system, blinkmacsystemfont, 'Segoe UI', roboto, 'Helvetica Neue',
arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
'Segoe UI Symbol', 'Noto Color Emoji';"
/>
</template>
</Grid>
</template>