refactor: upgrade volar

This commit is contained in:
三咲智子 Kevin Deng 2023-07-03 00:34:39 +08:00
parent fbf49368c1
commit 171f0ec857
No known key found for this signature in database
GPG key ID: 69992F2250DFD93E
5 changed files with 141 additions and 117 deletions

View file

@ -171,7 +171,7 @@ export function useUploadMediaAttachment(draftRef: Ref<Draft>) {
img.src = url
})
function resizeImage(img: CanvasImageSource, type = 'image/png'): Promise<Blob | null> {
function resizeImage(img: HTMLImageElement, type = 'image/png'): Promise<Blob | null> {
const { width, height } = img
const aspectRatio = (width as number) / (height as number)