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

This commit is contained in:
puhui999
2023-05-31 15:58:35 +08:00
parent 2ddb605076
commit 6a10a81f58
8 changed files with 22 additions and 18 deletions

View File

@ -46,7 +46,7 @@
{{ t('common.copy') }}
</el-button>
<div>
<pre><code class="hljs" v-html="highlightedCode(item)"></code></pre>
<pre><code v-dompurify-html="highlightedCode(item)" class="hljs"></code></pre>
</div>
</el-tab-pane>
</el-tabs>