【问题标题】:Angular-material table pagination not working in IE 10角度材料表分页在 IE 10 中不起作用
【发布时间】:2019-12-23 16:04:49
【问题描述】:

我在 angular(4.4.4) 应用程序中使用了 angular-material 的组件。但是,表格的分页(mat-paginatior)出现故障。下一个和上一个按钮似乎被禁用。此问题仅在 IE 10 中。

根据文档,angular-material 应该支持 n-1 个浏览器,这意味着 IE 10 也在列表中。但是很明显,库在其中不起作用。

是否有任何修复或 polyfill 可以使组件在 IE 10 中正常工作?

【问题讨论】:

    标签: html css angular angular-material2


    【解决方案1】:

    在全局 scss 中添加此样式,分页器将正常工作:D

    // IE 10

    @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
      // bug with pagination in table
      .mat-button-focus-overlay, .mat-ripple.mat-button-ripple {
        display: none;
      }
    }
    

    【讨论】:

      【解决方案2】:

      如果您打开polyfills.ts并导入了所有需要取消注释的IE10行,以及npm install --save classlist.js和web-animations-js,但它仍然不起作用,那么它可能不兼容。

      The Angular Material 2 github notes the following

      浏览器和屏幕阅读器支持

      Angular Material 支持所有主流浏览器的最新两个版本:Chrome(包括 Android)、Firefox、Safari(包括 iOS)和 IE11 / Edge

      IE11 和 Edge(但不是 IE10 或更低版本)

      【讨论】:

      • @lancovici 我已经添加了那些 polyfills 。我想对此无能为力。
      【解决方案3】:

      所以,正如我所见 - 角材料不支持--IE10,仅支持 IE11+。

      issue about it and answer

      another issue and answer

      【讨论】:

        猜你喜欢
        • 2019-07-29
        • 2020-12-17
        • 2017-05-22
        • 2019-10-17
        • 1970-01-01
        • 2018-07-20
        • 2018-11-14
        • 1970-01-01
        • 2018-05-26
        相关资源
        最近更新 更多