fix tab tooltip

This commit is contained in:
Marcos Moura 2016-12-16 03:04:32 -02:00
parent cfa5772433
commit c0a196eaef
3 changed files with 16 additions and 1 deletions

View file

@ -119,7 +119,13 @@
<md-table-row>
<md-table-cell>md-tooltip</md-table-cell>
<md-table-cell><code>String</code></md-table-cell>
<md-table-cell>Add a tooltip on the tab header. Default: No tooltip.</md-table-cell>
<md-table-cell>Add a tooltip on the tab header. Optional.</md-table-cell>
</md-table-row>
<md-table-row>
<md-table-cell>md-tooltip-delay</md-table-cell>
<md-table-cell><code>String</code></md-table-cell>
<md-table-cell>Delay of the tab header tooltip. Default: <code>0</code></md-table-cell>
</md-table-row>
<md-table-row>

View file

@ -16,6 +16,10 @@
mdActive: Boolean,
mdDisabled: Boolean,
mdTooltip: String,
mdTooltipDelay: {
type: String,
default: '0'
},
mdTooltipDirection: {
type: String,
default: 'bottom'
@ -45,6 +49,9 @@
mdTooltip() {
this.updateTabData();
},
mdTooltipDelay() {
this.updateTabData();
},
mdTooltipDirection() {
this.updateTabData();
}
@ -66,6 +73,7 @@
active: this.mdActive,
disabled: this.mdDisabled,
tooltip: this.mdTooltip,
tooltipDelay: this.mdTooltipDelay,
tooltipDirection: this.mdTooltipDirection,
ref: this
};

View file

@ -14,6 +14,7 @@
<div class="md-tab-header-container">
<md-icon v-if="header.icon">{{ header.icon }}</md-icon>
<span v-if="header.label">{{ header.label }}</span>
<md-tooltip v-if="header.tooltip" :md-direction="header.tooltipDirection" :md-delay="header.tooltipDelay">{{ header.tooltip }}</md-tooltip>
</div>
</button>