mirror of
https://github.com/pengzhanbo/vuepress-theme-plume.git
synced 2026-05-01 12:38:12 +08:00
16 lines
403 B
Vue
16 lines
403 B
Vue
<script setup lang="ts">
|
|
import { computed } from 'vue'
|
|
import { useData, useEncrypt } from '../composables/index.js'
|
|
|
|
const { frontmatter, isDark } = useData()
|
|
const { isPageDecrypted } = useEncrypt()
|
|
|
|
const hasComment = computed(() =>
|
|
frontmatter.value.comments !== false && isPageDecrypted.value,
|
|
)
|
|
</script>
|
|
|
|
<template>
|
|
<DocComment v-if="hasComment" :darkmode="isDark" vp-comment />
|
|
</template>
|