我正在使用am4themes_animated在我的角度项目,并移动到eslint,而不是tslint。
import am4themes_animated from '@amcharts/amcharts4/themes/animated';
但是,ESlint给出了以下错误。
Identifier 'am4themes_animated' is not in camel case camelcase
我试过使用别名,比如import am4themes_animated as am4themesAnimated from '@amcharts/amcharts4/themes/animated';,但是它不允许这样做。
这可能是一个非常新手的问题,但是如果有人能帮忙的话,你会很感激的。谢谢。(我在这里的第一个问题,所以当我学习的时候,如果有什么错误,很抱歉)
更新:
import * as am4themesAnimated不工作,因为我需要将常量作为参数传递,如:am4core.useTheme(am4themes_animated);
发布于 2022-01-12 08:57:41
仅通过引用am4Charts 主题文档解决问题。我们基本上可以将我们进口的主题命名为我们想要的任何东西。
https://stackoverflow.com/questions/70661910
复制相似问题