小编Zah*_*ori的帖子

VSCode - 更改打字稿函数装饰器的颜色

有没有办法在 VSCode 中更改装饰器的语法高亮颜色?鉴于小例子:

     @HostListener('mouseenter')
     onMouseEnter() {}
Run Code Online (Sandbox Code Playgroud)

双方@HostListeneronMouseEnter突出显示为相同的颜色。我想改变这一点。到目前为止,我试图搞乱"editor.tokenColorCustomizations": { "functions" : "SomeColorHere"}},但这种改变装饰和函数声明。

syntax-highlighting decorator visual-studio-code

6
推荐指数
2
解决办法
1749
查看次数

Angular 6 - 对所有表列进行排序仅适用于两列而不是全部

我正在尝试对有棱角的材料进行排序MatTableMatSort但问题是我只能对我的两列进行排序,MatTable但我想要的是对所有列进行排序,但我不明白为什么它不起作用......我可以单击箭头,就像我想对表的数据进行排序时一样,但除了列multipleoccupation排序良好之外什么也没有发生。

这是我的代码(我很好地导入MatSortModule到我的app.module.ts):

csr.component.ts

import {AfterViewInit, Component, OnInit, ViewChild} from '@angular/core';
import {PosteCSRPoste, PosteCSRService} from '../../api';
import {MatSort, MatTableDataSource} from '@angular/material';

@Component({
  selector: 'app-csr',
  templateUrl: './csr.component.html',
  styleUrls: [
    './csr.component.css',
    '../app.component.css'
  ]
})
export class CsrComponent implements OnInit, AfterViewInit {
  displayedColumns = [
    'disciplineCsd',
    'disciplineCsr',
    'multiple',
    'communeIdentique',
    'etablissementCsd',
    'etablissementCsr',
    'occupation'
  ];

  postes = new MatTableDataSource<PosteCSRPoste>();

  @ViewChild(MatSort) sort: MatSort;

  constructor(private posteCSRService: PosteCSRService) {
  }

  ngOnInit(): void {
    this.getPostesCSR();
  } …
Run Code Online (Sandbox Code Playgroud)

sorting html-table angular-material angular angular6

3
推荐指数
1
解决办法
6216
查看次数