fix: Export image in dark mode (#2332)

Co-authored-by: 亢奋猫 <kangfenmao@qq.com>
This commit is contained in:
icinggslits 2025-02-25 19:20:11 +08:00 committed by GitHub
parent aeeded2aa1
commit 91104e288c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -306,7 +306,7 @@ export const captureScrollableDiv = async (divRef: React.RefObject<HTMLDivElemen
allowTaint: true, // Allow cross-origin images
logging: false, // Disable logging
imageTimeout: 0, // Disable image timeout
backgroundColor: null,
backgroundColor: getComputedStyle(div).getPropertyValue('--color-background'),
onclone: (clonedDoc) => {
// 克隆时保留原始样式
if (div.id) {