查看: 66|回覆: 0

Error: Attempting to parse an unsupported color function "oklab"。html2canvas报错

[複製鏈接]

6

主題

0

回帖

0

積分

热心网友

金币
0
閲讀權限
220
精華
0
威望
0
贡献
0
在線時間
0 小時
註冊時間
2010-3-27
發表於 2025-8-2 03:08:00 | 顯示全部樓層 |閲讀模式

情况

大致是下面这样的。

Error: Attempting to parse an unsupported color function "oklab" at Object.parse (html2canvas.js:1726:1) at parse (html2canvas.js:3750:1) at new CSSParsedDeclaration (html2canvas.js:3627:1) at new ElementContainer (html2canvas.js:3796:1) at createContainer (html2canvas.js:4793:1) at parseNodeTree (html2canvas.js:4739:1) at parseTree (html2canvas.js:4798:1) at html2canvas.js:7783:1 at step (html2canvas.js:86:1) at Object.next (html2canvas.js:67:1)

解决

https://github.com/parallax/jsPDF/issues/3748
卸载html2canvas,安装html2canvas-pro这个库。

import html2canvas from 'html2canvas-pro';

似乎没什么兼容性问题。



来源:https://www.cnblogs.com/oldsaltfish/p/19017854
回覆

使用道具 舉報

您需要登錄後才可以回帖 登錄 | 立即注册

本版積分規則

相关侵权、举报、投诉及建议等,请发 E-mail:qiongdian@foxmail.com

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部