docs(other): missing style tag problem (#2539)

This commit is contained in:
msidolphin 2021-07-15 14:26:17 +08:00 committed by GitHub
parent c28d7b3738
commit 9999f2fd10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -201,11 +201,15 @@ export default {
${this.displayDemoCode}
${'</sc' + 'ript>'}
`
const innerStyle = this.codepen.style && this.codepen.style.trim() ? `<style>
${this.codepen.style}
</style>
` : ''
hlcode.innerHTML = sanitizeHTML(`<template>
${this.codepen.html}
</template>
${this.displayDemoCode ? innerScript : ''}`)
${this.displayDemoCode ? innerScript : ''}${innerStyle}`)
nextTick(() => {
if (this.$el.getElementsByClassName('description').length === 0) {