有没有办法在 VSCode 中更改装饰器的语法高亮颜色?鉴于小例子:
@HostListener('mouseenter')
onMouseEnter() {}
Run Code Online (Sandbox Code Playgroud)
双方@HostListener并onMouseEnter突出显示为相同的颜色。我想改变这一点。到目前为止,我试图搞乱"editor.tokenColorCustomizations": { "functions" : "SomeColorHere"}},但这种改变既装饰和函数声明。
我正在尝试对有棱角的材料进行排序MatTable,MatSort但问题是我只能对我的两列进行排序,MatTable但我想要的是对所有列进行排序,但我不明白为什么它不起作用......我可以单击箭头,就像我想对表的数据进行排序时一样,但除了列multiple和occupation排序良好之外什么也没有发生。
这是我的代码(我很好地导入MatSortModule到我的app.module.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)