mirror of
https://github.com/keven1024/015.git
synced 2026-05-26 07:08:02 +00:00
21 lines
500 B
Vue
21 lines
500 B
Vue
<script setup lang="ts">
|
|
import QRCode from "qrcode";
|
|
const props = defineProps<{
|
|
hide: () => void;
|
|
data: any;
|
|
}>();
|
|
const { state } = useAsyncState(async () => {
|
|
return await QRCode.toDataURL(props.data);
|
|
}, null);
|
|
</script>
|
|
|
|
<template>
|
|
<div class="flex flex-col gap-5">
|
|
<div class="text-xl font-bold">分享二维码</div>
|
|
<div class="flex flex-row justify-center">
|
|
<img :src="state" v-if="!!state" />
|
|
<Skeleton class="size-20" v-else />
|
|
</div>
|
|
</div>
|
|
</template>
|