我的按钮在禁用ng时被禁用,但是按钮显示工具提示,即使它被禁用,我想在按钮被禁用时删除工具提示。
这是我的按钮
<button type="button" class="btn btn-default"
personinsuranceid="{{row.entity.PersonInsuranceId}}"
ng-disabled="row.entity.Sequence != 1"
ng-click="$event.stopPropagation(); grid.appScope.AddPlantoCase(row.entity, 1)"
data-toggle="tooltip" title="Add as Primary to case">
1
</button>
请建议我删除工具提示的方法。
答案 0 :(得分:0)
工具提示直接从浏览器呈现,使用os-settings。因此,使用按钮可能很难隐藏工具提示。
您可以使用带有ng-click的跨度来处理调用而使用ng-class来执行样式,而不是按钮。不要忘记在AddPlantoCase()中检查已禁用的条件,并在其为真时不执行任何操作。
<span class="btn btn-default"
personinsuranceid="{{row.entity.PersonInsuranceId}}"
ng-click="grid.appScope.AddPlantoCase(row.entity, 1)"
ng-class="{disabled: row.entity.Sequence != 1}"
data-toggle="tooltip" title="Add as Primary to case">
1
<span>
/* CSS */
.disabled {
cursor: not-allowed;
filter: alpha(opacity=65);
-webkit-box-shadow: none;
box-shadow: none;
opacity: .65;
}