Merge pull request #117 from 7heMech/patch-1

Better qr styling
This commit is contained in:
面条 2025-03-16 11:19:45 +08:00 committed by GitHub
commit f8130d731d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2,7 +2,7 @@
import { Button } from '#components' import { Button } from '#components'
import { Download } from 'lucide-vue-next' import { Download } from 'lucide-vue-next'
import QRCodeStyling from 'qr-code-styling' import QRCodeStyling from 'qr-code-styling'
import { ref, watch } from 'vue' import { onMounted, ref, watch } from 'vue'
const props = defineProps({ const props = defineProps({
data: { data: {
@ -102,12 +102,14 @@ onMounted(() => {
<div <div
ref="qrCodeEl" ref="qrCodeEl"
:data-text="data" :data-text="data"
class="bg-white p-1 rounded-lg"
/> />
<div class="flex items-center gap-2"> <div class="flex items-center gap-4">
<div class="relative flex items-center"> <div class="relative flex items-center">
<div <div
class="w-8 h-8 rounded-full border cursor-pointer overflow-hidden" class="w-8 h-8 rounded-full border border-gray-300 dark:border-gray-600 cursor-pointer overflow-hidden"
:style="{ backgroundColor: color }" :style="{ backgroundColor: color }"
title="Change QR code color"
> >
<input <input
v-model="color" v-model="color"