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

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

问题描述

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

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

有人知道吗

  1. 是否可以在现有组件上禁用/配置 Ripple(在这种情况下为 md-tab-group)?最新版本导致我的选项卡标题跳转,因为ripple 正在计算大值,解决方案是直接在MdTabGroup 的模板中为md-tab-label 添加一个小值md-ripple-max-radius.
  2. 是否有计划删除 md-tab-labels 的最小宽度?我正在使用一个非常小的选项卡组(只有 300 像素宽度),因此 160 像素最小宽度不可用.
  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 作为属性来禁用 md-tab-group 作为 的涟漪Angular2+ 使用 Angular 材质.

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>

此外,如果您使用的是最新的 Angular Material,它会有点不同,如下所示:

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>

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

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