codemirror 加载资源失败:net::ERR_FILE_NOT_FOUND file:/themes.googleusercontent.com。

问题描述 投票:0回答:1

我尝试在电子中使用CodeMirror。

它在电子的开发工具中显示一个错误

Failed to load resource: net::ERR_FILE_NOT_FOUND file://themes.googleusercontent.com/static/fonts/sourcesanspro/v5/ODelI1aHBYDBqgeIAH2zlBM0YzuT7MdOe03otPbuUS0.woff

enter image description here

如何解决这个问题?


我的代码镜像是从主页下载的。https:/codemirror.netindex.html 并将所有文件复制到我的应用程序中。

当我打开我的电子应用程序时,它什么都没有显示。加载CodeMirror需要一些时间。加载CodeMirror后,在电子的开发工具中会显示这个错误。

CodeMirror仍然可以工作,但是CodeMirror的加载时间变得太长。

我相信它一开始会尝试连接云端的google字体,然后放弃并显示结果。

codemirror
1个回答
0
投票

好吧,只要删除这一行。

<link rel=stylesheet href="doc/docs.css">

一切都会变得正常。

© www.soinside.com 2019 - 2024. All rights reserved.