🚨 解决Qodana报错

This commit is contained in:
目棃
2024-09-06 09:24:36 +08:00
parent 6b4b1c0b25
commit 8acdebebf2
14 changed files with 699 additions and 829 deletions

View File

@@ -1,7 +1,7 @@
/**
* @file utils/TGShare.ts
* @description 生成分享截图并保存到本地
* @since Beta v0.5.0
* @since Beta v0.5.5
*/
import { path } from "@tauri-apps/api";
@@ -86,7 +86,7 @@ function getShareImgBgColor(): string {
/**
* @description 生成分享截图
* @since Beta v0.4.2
* @since Beta v0.5.5
* @param {string} fileName - 文件名
* @param {HTMLElement} element - 元素
* @param {number} scale - 缩放比例
@@ -153,6 +153,7 @@ export async function generateShareImg(
});
await TGLogger.Info(`[generateShareImg][${fileName}] 已将图像复制到剪贴板`);
} catch (e) {
await TGLogger.Error(`[generateShareImg][${fileName}] 复制到剪贴板失败 ${e}`);
await saveCanvasImg(buffer, fileName);
}
}