webdatarocks中的类型“eventemitter”上不存在属性“next”

8aqjt8rx  于 2021-09-29  发布在  Java
关注(0)|答案(1)|浏览(400)

在angular for pivot表中集成webdatarocks时,我得到了错误
类型“eventemitter”上不存在属性“next”
这是我的密码,

import { Component, ElementRef, Input, Output, EventEmitter, OnInit } from '@angular/core';
import * as WebDataRocks from 'webdatarocks';
@Component({
    selector: 'app-wbr-pivot',
    template: `<div><div class='wbr-ng-wrapper'></div></div>`
})
export class WebdatarocksComponent implements OnInit{
    // params
    @Input() toolbar: boolean;
    @Input() width: string | number;
    @Input() height: string | number;
    @Input() report: WebDataRocks.Report | string;
    @Input() global: WebDataRocks.Report;
    @Input() customizeCell: (cell: WebDataRocks.CellBuilder, data: WebDataRocks.CellData) => void;
    // events
    @Output() cellclick: EventEmitter<WebDataRocks.CellData> = new EventEmitter();

    // api
    public webDataRocks: WebDataRocks.Pivot;
    // private
    private root: HTMLElement;

    constructor(private el: ElementRef) {  }

    ngOnInit() {
      this.root = this.el.nativeElement as HTMLElement;
      this.webDataRocks = new WebDataRocks({
          container: this.root.getElementsByClassName('wbr-ng-wrapper')[0],
          width: this.width,
          height: this.height,
          toolbar: this.toolbar,
          report: this.report,
          global: this.global,
          customizeCell: this.customizeCell,
          cellclick: (cell: WebDataRocks.CellData) => this.cellclick.next(cell)
      });
    }
}
flmtquvp

flmtquvp1#

不能用我这边的相同代码复制这个。您是否更改了示例项目中的其他内容?

相关问题