简体   繁体   English

Angular 材质分页器通过全局背景颜色隐藏按钮和页数

[英]Angular Material paginator hides the buttons and number of pages by the global background color

在此处输入图像描述 在此处输入图像描述

I implemented material paginator and the number of items per page and buttons(next and previous) are hided by the global backgroud color.我实现了材料分页器,每页的项目数和按钮(下一个和上一个)被全局背景颜色隐藏。 I have attached 2 images and global background color of one of them is deactivated and can see the number of pages and buttons(next and previous).我附上了 2 张图片,其中一张的全局背景颜色已停用,可以看到页面和按钮的数量(下一个和上一个)。

I need to keep the background color and make visible the number of items per page and next and previous buttons.我需要保持背景颜色并使每页的项目数以及下一个和上一个按钮可见。

I did read few releted articles and made few changes for example,我确实阅读了一些相关的文章并进行了一些更改,例如,

::ng-deep my-style-class {
   background-color: unset;
}

All of them were not worked.他们都没有工作。

Can you please give me a suggestion to make visible number of pages and next, previous buttons without disabing the global background color.您能否给我一个建议,以在不禁用全局背景颜色的情况下使页面数和下一个、上一个按钮可见。

The reason why it's not working is that this code is expecting a class called mat-paginator and mat-icon-button.它不起作用的原因是这段代码需要一个名为 mat-paginator 和 mat-icon-button 的 class。

::ng-deep .mat-paginator .mat-icon-button
{
  background-color: YourColor;
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM