Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typescript/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Typescript 如何解决属性';甘特图容器&x27;不存在于类型';甘特图&x27;问题_Typescript_Gantt Chart_Dhtmlx - Fatal编程技术网

Typescript 如何解决属性';甘特图容器&x27;不存在于类型';甘特图&x27;问题

Typescript 如何解决属性';甘特图容器&x27;不存在于类型';甘特图&x27;问题,typescript,gantt-chart,dhtmlx,Typescript,Gantt Chart,Dhtmlx,我想在Dhtmlx库中使用甘特图 使用typescript,我发现启动甘特图时有一个错误。那么我该如何解决这个问题呢? 这是密码 从“React”导入React; 从'dhtmlx gantt'导入{gantt}; 导入'dhtmlxgantt/codebase/dhtmlxgantt.css'; 从“../../../VayuModule”导入VayuModule,{VayuModuleState}; 导入“/Gantt.scss”; 导出接口GantState扩展VayuModuleSta

我想在Dhtmlx库中使用甘特图 使用typescript,我发现启动甘特图时有一个错误。那么我该如何解决这个问题呢? 这是密码

从“React”导入React;
从'dhtmlx gantt'导入{gantt};
导入'dhtmlxgantt/codebase/dhtmlxgantt.css';
从“../../../VayuModule”导入VayuModule,{VayuModuleState};
导入“/Gantt.scss”;
导出接口GantState扩展VayuModuleState{}
类甘特图扩展了VayuModule{
甘特:任何;
public render():JSX.Element{
返回;
}
受保护的getDefaultState():GantState{
返回{};
}
componentDidMount(){
const{tasks}=this.props;
init(this.ganttContainer);
甘特图解析(任务);

}
最简单的方法是在
之前添加以下行。使用甘特Container

// @ts-expect-error
以下是演示: