部分参数配置化

This commit is contained in:
tangly1024.com
2023-11-03 17:10:59 +08:00
parent 545c071f81
commit f145d8b28c
23 changed files with 267 additions and 208 deletions

View File

@@ -1,4 +1,4 @@
import BLOG from '@/blog.config'
import { siteConfig } from '@/lib/config'
import { useEffect } from 'react'
/**
@@ -6,7 +6,7 @@ import { useEffect } from 'react'
*/
export default function DisableCopy() {
useEffect(() => {
if (!JSON.parse(BLOG.CAN_COPY)) {
if (!JSON.parse(siteConfig('CAN_COPY'))) {
// 全栈添加禁止复制的样式
document.getElementsByTagName('html')[0].classList.add('forbid-copy')
// 监听复制事件