我使用的是react-wordcloud
包,每当容器的大小改变时,它都会对单词Cloud进行排序,以适应当前(70%)的屏幕大小。
我的主机收到垃圾邮件警告:
我尝试使用该程序包的默认设置,但仍收到此警告。
import ReactWordcloud from "react-wordcloud";
const options = {
colors: ["#FFF7E5", "#F9D3AB", "#f4cc72", "#ffbe2d", "#ffb100"],
enableTooltip: false,
deterministic: true,
fontFamily: "impact",
fontSizes: [40, 80],
fontStyle: "normal",
fontWeight: "normal",
padding: 2,
rotations: 1,
rotationAngles: [0],
scale: "sqrt",
spiral: "archimedean",
transitionDuration: 1000,
};
return(<div
style={{ width: "100%", height: "100%" }}
>
<ReactWordcloud options={options} words={props.wordCloud} />
</div>)
2条答案
按热度按时间3zwtqj6y1#
您可以尝试此getContext(‘2d’,{will ReadFurly:True});
有关详细信息,请参阅:
https://developer.mozilla.org/pt-BR/docs/Web/API/HTMLCanvasElement/getContext
TKS
wkyowqbh2#
这也发生在我身上。我认为这与
Dark Reader
Chrome扩展有关。为警告引用的URL:https://html.spec.whatwg.org/multipage/canvas.html#concept-canvas-will-read-frequently