mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2026-05-08 00:24:06 +08:00
💄 优化滚动截屏处理,调整抽奖浮窗UI
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @file utils/TGShare.ts
|
||||
* @description 生成分享截图并保存到本地
|
||||
* @since Beta v0.7.7
|
||||
* @since Beta v0.8.2
|
||||
*/
|
||||
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
@@ -86,7 +86,7 @@ function getShareImgBgColor(): string {
|
||||
|
||||
/**
|
||||
* @description 生成分享截图
|
||||
* @since Beta v0.7.7
|
||||
* @since Beta v0.8.2
|
||||
* @param {string} fileName - 文件名
|
||||
* @param {HTMLElement} element - 元素
|
||||
* @param {number} scale - 缩放比例
|
||||
@@ -103,7 +103,7 @@ export async function generateShareImg(
|
||||
const maxHeight = element.style.maxHeight;
|
||||
if (scrollable) element.style.maxHeight = "100%";
|
||||
const width = element.clientWidth + 30;
|
||||
const height = element.clientHeight + 30;
|
||||
const height = (scrollable ? element.scrollHeight : element.clientHeight) + 30;
|
||||
canvas.width = width * scale;
|
||||
canvas.height = height * scale;
|
||||
const opts = {
|
||||
|
||||
Reference in New Issue
Block a user