我的图书馆:
当我将cytoscape.js作为静态资产导入index.html时工作。当我在一个新的es6应用程序:Uncaught ReferenceError: cytoscape is not defined at new WbsLayout中使用我的组件时,就不会这么做了。from 'cytoscape' (或任何类似的方式),因为我似乎没有使用类型记录和定义cytoscape的类型的方式,因此我不需要它来使我的组件使用在html中导入的cytoscape工作。"
我在react中使用了plotly的cytoscape for react,here。我已经执行了以下步骤: // import and register the layoutsimport COSEBilkentfrom 'cytoscape-cose-bilkent';
Cytoscape.use(COSEBilkent); 并且我在组件中呈现我的图形(元素的