refactor: vue3.3 defineOptions

This commit is contained in:
xingyu
2023-06-21 19:14:34 +08:00
parent a5c7c886ee
commit 922f83d99c
259 changed files with 955 additions and 381 deletions

View File

@ -1,4 +1,4 @@
<script lang="ts" name="Qrcode" setup>
<script lang="ts" setup>
import { computed, nextTick, PropType, ref, unref, watch } from 'vue'
import QRCode, { QRCodeRenderersOptions } from 'qrcode'
import { cloneDeep } from 'lodash-es'
@ -7,6 +7,8 @@ import { useDesign } from '@/hooks/web/useDesign'
import { isString } from '@/utils/is'
import { QrcodeLogo } from '@/types/qrcode'
defineOptions({ name: 'Qrcode' })
const props = defineProps({
// img 或者 canvas,img不支持logo嵌套
tag: propTypes.string.validate((v: string) => ['canvas', 'img'].includes(v)).def('canvas'),
@ -241,7 +243,7 @@ $prefix-cls: #{$namespace}-qrcode;
.#{$prefix-cls} {
&--disabled {
background: rgba(255, 255, 255, 0.95);
background: rgb(255 255 255 / 95%);
& > div {
transform: translate(-50%, -50%);