角材料2-禁用波纹? [英] Angular Material 2 - Disable Ripple?

查看:76
本文介绍了角材料2-禁用波纹?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用md-tab-group(昨天才更新为最新版本)...

I'm currently working with md-tab-group (just updated to latest version yesterday)...

有人知道吗

  1. 是否可以在现有组件上禁用/配置Ripple (在这种情况下为md-tab-group)?最新版本导致我的Tab标题跳了,因为涟漪正在计算较大的值,解决方案是直接在MdTabGroup的模板中为md-tab-label的 md-ripple-max-radius 添加一个较小的值.
  2. 是否有计划删除md-tab-labels的最小宽度?我正在使用一个很小的选项卡组(仅300px宽度),因此160px最小宽度不可用.
  1. if it is possible to disable/configure Ripple on existing components (md-tab-group in this case)? Latest version causes my tab headers to jump because ripple is calculating large values, solution is to add a small value for md-ripple-max-radius for md-tab-label directly in the template of MdTabGroup.
  2. if there are plans to remove min-width for md-tab-labels? I'm working with a quite small tab group (only 300px width), therefore 160px min-width is not usable.

谢谢!

推荐答案

使用 disableRipple 作为属性,使用Angular材质将md-tab-group的波纹禁用为 Angular2 +

Use disableRipple as an attribute to disable ripples for the md-tab-group as Angular2+ using the Angular material.

只需执行以下操作即可:

Just simply do something like this:

<md-tab-group disableRipple></md-tab-group>

此外,如果您使用的是最新角度材料,则如下所示也有所不同:

Also if you are using the latest Angular Material, it's a little bit different like this below:

<mat-tab-group [disableRipple]="true"></mat-tab-group>

这篇关于角材料2-禁用波纹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆