本文介绍了如何从 Electron 应用程序中的 [mat-icon] 按钮中删除工具提示?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要从按钮中删除工具提示.
I need to remove the tooltip from the button.
我将 Angular/Electron 用于桌面应用程序.
I'm using Angular/Electron for a desktop application.
我在 .html 文件中有以下代码:
I have the following code in the .html file:
<button class="close-button" (click)='closeDialog()'>
<mat-icon class="svg-mat-icon" svgIcon="menu_cancel"></mat-icon>
</button>
这是屏幕右上角的X"按钮.当我将鼠标悬停在它上面时,我会在它上面看到一个工具提示menu_Cancel".
This is the 'X' button in the upper-right corner of the screen. When I hover the mouse over it I get a tooltip "menu_Cancel" above it.
我怎样才能删除那个工具提示?该按钮一目了然,用户无需知道使用的文件名.
How can I remove that tooltip? The button is self-explanatory, and the user does not need to know the filename used.
谢谢.
推荐答案
我遇到了同样的问题.我在我的 SCSS 中解决了它:
I had the same problem. I resolved it doing it in my SCSS :
mat-icon {
svg {
pointer-events: none;
}
}
这篇关于如何从 Electron 应用程序中的 [mat-icon] 按钮中删除工具提示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!