禁用按钮时的角度显示工具提示

问题描述 投票:0回答:1
javascript html css bootstrap-4 angular-material
1个回答
0
投票

将此添加到覆盖材质样式的文件中:

// this workaround allows for the tooltips to appear on disabled buttons (since mouse events aren't fired for them)
button:disabled.mat-mdc-tooltip-trigger {
  pointer-events: auto !important;
  // remove the ripple effect on hover
  > span:first-child {
    display: none;
  }
}

悬停时它将显示没有波纹背景的工具提示。

© www.soinside.com 2019 - 2024. All rights reserved.