1

我正在尝试在我的项目中使用 bpmn.io。所以我尝试将bpmn-properties-panel与 Angular 集成。

我已经安装了所有模块并导入了它们。但我没有得到他们所展示的所有属性。

bpmn.io 给出的示例

我得到的是下图

在此处输入图像描述

如您所见,我无法查看特定任务的所有属性。

我浏览了他们的官方论坛Angular 6 和属性面板

如果我喜欢那样

import camundaModdleDescriptor from 'camunda-bpmn-moddle/resources/camunda.json';

我收到错误

Cannot find module 'camunda-bpmn-moddle/resources/camunda.json'. Consider using '--resolveJsonModule' to import module with '.json' extension

帮我!

提前致谢。

4

2 回答 2

1

错误中解释了解决方案。您需要从 tsconfig.json 启用 resolveJsonModule 选项:

{
    "compilerOptions": {
    "target": "es2015",
    "module": "commonjs",
    "strict": true,
    "moduleResolution": "node",
    "resolveJsonModule": true
  }
}

此链接中的更多信息: https ://mariusschulz.com/blog/importing-json-modules-in-typescript

于 2019-07-13T11:31:29.893 回答
1

你可以在这里Camunda.json获取文件

于 2018-12-19T14:18:39.400 回答