qrcode 改为cdn

This commit is contained in:
tangly1024
2023-07-31 21:30:38 +08:00
parent b7c84d5218
commit 187b173ead
7 changed files with 50 additions and 7 deletions

View File

@@ -1,6 +1,7 @@
import BLOG from '@/blog.config'
import { useGlobal } from '@/lib/global'
import copy from 'copy-to-clipboard'
import dynamic from 'next/dynamic'
import { useState } from 'react'
import {
@@ -48,6 +49,8 @@ import {
HatenaIcon
} from 'react-share'
const QrCode = dynamic(() => import('@/components/QrCode'), { ssr: false })
/**
* @author https://github.com/txs
* @param {*} param0
@@ -345,8 +348,8 @@ const ShareButtons = ({ shareUrl, title, body, image }) => {
</div>
<div className='absolute'>
<div id='pop' className={(qrCodeShow ? 'opacity-100 ' : ' invisible opacity-0') + ' z-40 absolute bottom-10 -left-10 bg-white shadow-xl transition-all duration-200 text-center'}>
<div className='p-2 mt-1'>
{/* <QRCode value={shareUrl} fgColor='#000000' /> */}
<div className='p-2 mt-1 w-28 h-28'>
<QrCode value={shareUrl}/>
</div>
<span className='text-black font-semibold p-1 rounded-t-lg text-sm mx-auto mb-1'>
{locale.COMMON.SCAN_QR_CODE}