@ nebular / theme的NbSortDirection,NbSortRequest在哪里?

时间:2019-03-10 17:06:33

标签: angular nebular

我在下面的导入过程中遇到语法错误。有人可以告诉您如何解决此问题吗?

All imports in import declaration are unused.ts(6192)

模块'“ ../../../../../../../../Users/denisputnam/git/nb-niche-app/node_modules/@nebular/theme”'没有导出的成员“ NbSortDirection”。 ts(2724)是指'NbLayoutDirection'吗? direction.service.d.ts(6,21):在此处声明了“ NbLayoutDirection”。

import { NbSortDirection, NbSortRequest, NbTreeGridDataSource, NbTreeGridDataSourceBuilder } from '@nebular/theme';

enter code     import { Component, OnInit } from '@angular/core';
import { NbSortDirection, NbSortRequest, NbTreeGridDataSource, NbTreeGridDataSourceBuilder } from '@nebular/theme';

@Component({
  selector: 'app-checkpoint-criteria',
  templateUrl: './checkpoint-criteria.component.html',
  styleUrls: ['./checkpoint-criteria.component.scss']
})
export class CheckpointCriteriaComponent implements OnInit {
  customColumn = 'name';
  defaultColumns = [ 'size', 'kind', 'items' ];
  allColumns = [ this.customColumn, ...this.defaultColumns ];

  dataSource: NbTreeGridDataSource<any>;

  sortColumn: string = '';
  sortDirection: NbSortDirection = NbSortDirection.NONE;

  constructor() { }

  ngOnInit() {
  }

}

1 个答案:

答案 0 :(得分:0)

我这边工作很好,这是一个示例https://stackblitz.com/edit/github-7y2b27?file=src%2Fapp%2Fhome%2Fhome.component.ts。只需确保至少@nebular/theme上有3.4.0版本。