首页 > 解决方案 > Angular 6-如何在没有指针事件时显示工具提示

问题描述

我在 td 中有一个表,它将根据 ngClass 条件禁用,但问题是即使在 ngClass 上使用 css 禁用指针事件时也必须显示工具提示,目前由于指针事件没有显示工具提示,
但我想要表td 被禁用,同时还必须显示工具提示

**HTML:**

<td class="allowCursor" (mousedown)="!allowEventBaselineTwo(item) && selectRowExec($event,item,''+(pExec-1)+j);" data-toggle="tooltip"
             data-placement="top" [title]="tooltipHierarchy1(buildbaselineSpendType, item.business.id, item.country.id)"
              [ngClass]="{'noEvent':(bisinessStackholder == 'Y' && executeSaving == 'no' && projectStageNo >= ProjectStageCodeConst.EXECUTED)|| (projectStage == ProjectStageConst.IMPLEMENTED && isImplementedItem(item))|| ((item.businessStage==ProjectStageCodeConst.PENDING_APPROVAL || item.businessStage==ProjectStageCodeConst.AUTO_APPROVED || item.businessStage==ProjectStageCodeConst.APPROVED ) ||  (!rowEditable) || (item.isActive=='N')) }">{{buildbaselineSpendType === 'BF' ? item.business.name :item.country.name}}
                                                    </td>

CSS

.noEvent .allowCursor {
  pointer-events: auto;
}

.noEvent{
    pointer-events: none;
}

标签: htmlcssangulartypescript

解决方案


推荐阅读