Pass component into hyperscript

This commit is contained in:
2024-06-19 02:07:17 +03:00
parent 05db0b693e
commit 3e39bda014
3 changed files with 34 additions and 33 deletions
+2 -6
View File
@@ -2,6 +2,7 @@
import { formatDate } from 'date-fns'
import chestAnimation from '~/assets/images/chest.webp'
import { render } from 'vue'
import { CodeControls } from '#components'
const config = useAppConfig()
const route = useRoute()
@@ -80,12 +81,7 @@ onMounted(() => {
})
content.value?.querySelectorAll('pre').forEach((pre: HTMLElement) => {
const icon = h('iconify-icon', {
icon: 'mdi:content-copy',
inline: true,
class: 'button',
onClick: () => clipboard(pre),
})
const icon = h(CodeControls)
render(icon, pre)
})