gpt4 book ai didi

typescript - 属性 'fonts' 在类型 'Document' 上不存在?

转载 作者:行者123 更新时间:2023-12-03 06:39:33 26 4
gpt4 key购买 nike

我在 vue 中使用 typescript
并使用 document.fonts api
但是控制台这个日志

Property 'fonts' does not exist on type 'Document'

最佳答案

实验性 API 不在 lib 文件中。

您可以通过以下方式修复它:(document as any).fonts

关于typescript - 属性 'fonts' 在类型 'Document' 上不存在?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55723615/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com