类型 'Event' 缺少类型 'CronOptions' 的以下属性

Type 'Event' is missing the following properties from type 'CronOptions'

我想在我的 angular 表单中使用 cron-editor 但在终端中出现此错误,

这些是我使用的cronOptions

 this.cronExpression = '4 3 2 12 1/1 ? *';
    this.cronOptions = {
      formInputClass: 'form-control cron-editor-input event',
      formSelectClass: 'form-control cron-editor-select',
      formRadioClass: 'cron-editor-radio',
      formCheckboxClass: 'cron-editor-checkbox',

      defaultTime: '10:00:00',
      use24HourTime: true,

      hideMinutesTab: true,
      hideHourlyTab: false,
      hideDailyTab: false,
      hideWeeklyTab: false,
      hideMonthlyTab: false,
      hideYearlyTab: false,
      hideAdvancedTab: true,

      hideSeconds: false,
      removeSeconds: false,
      removeYears: false

我在终端中遇到的错误是:

Type 'Event' is missing the following properties from type 'CronOptions': formInputClass, formSelectClass, formRadioClass, formCheckboxClass, and 12 more.

编辑: 我已声明为 public cronOptions: CronOptions;,其中类型导入为 import { CronOptions } from 'cron-editor/lib/CronOptions';

您需要删除双向绑定。

传递给组件的选项通常只是输入,而不是输出。

有错误指出:它没有将 CronOptions 识别为事件。

<cron-editor [cron]="cronExpression" [options]="cronOptions">
</cron-editor>