diff --git a/components/qrcode/QRCodeCanvas.tsx b/components/qrcode/QRCodeCanvas.tsx index 65cd48054..3a24a7a55 100644 --- a/components/qrcode/QRCodeCanvas.tsx +++ b/components/qrcode/QRCodeCanvas.tsx @@ -1,5 +1,6 @@ import type { CSSProperties } from 'vue'; import { defineComponent, ref, watch, computed, watchEffect } from 'vue'; +import type { ImageSettings } from './interface'; import { qrProps } from './interface'; import qrcodegen from './qrcodegen'; @@ -14,15 +15,6 @@ const ERROR_LEVEL_MAP: { [index: string]: qrcodegen.QrCode.Ecc } = { H: qrcodegen.QrCode.Ecc.HIGH, }; -type ImageSettings = { - src: string; - height: number; - width: number; - excavate: boolean; - x?: number; - y?: number; -}; - const DEFAULT_SIZE = 128; const DEFAULT_LEVEL = 'L'; const DEFAULT_BGCOLOR = '#FFFFFF'; diff --git a/components/qrcode/interface.ts b/components/qrcode/interface.ts index 1f6532a0b..01b6b996a 100644 --- a/components/qrcode/interface.ts +++ b/components/qrcode/interface.ts @@ -1,6 +1,6 @@ import { objectType, stringType } from '../_util/type'; -interface ImageSettings { +export interface ImageSettings { src: string; height: number; width: number;