0

我收到以下导入的语法错误。有人可以告诉如何解决这个问题吗?

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

模块 '"../../../../../../../../Users/denisputnam/git/nb-niche-app/node_modules/@nebular/theme"' 没有导出成员“NbSortDirection”。您的意思是 'NbLayoutDirection' 吗?ts(2724) 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() {
  }

}
4

1 回答 1

0

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

于 2019-03-12T14:14:21.410 回答