如何在材质表Angular 5中创建自定义箭头

Har*_*eek 1 angular-material2 angular

我是Angular Material的新手.有没有办法覆盖材质表中的mat-h​​eader-arrow.我试图让mat-sort-header-container显示:none.但遗憾的是它没有用.

目前的行为:

目前的行为:

预期行为:

在此输入图像描述

任何帮助都非常感谢.

谢谢

San*_*nde 5

是的你可以.

做一件事.将以下CSS代码添加到主样式表(非基于组件)

style.css

.mat-sort-header-stem {
  background: none;
  display: none!important;
}

.mat-sort-header-pointer-middle{
  background: none;
  display: none!important;
}

.mat-sort-header-indicator{
  top: 5px!important;
}
Run Code Online (Sandbox Code Playgroud)

结果:

结果