mirror of
https://github.com/Hopiu/vue-material.git
synced 2026-05-10 16:24:48 +00:00
Merge remote-tracking branch 'origin/develop' into components/mdSnackbar
* origin/develop: adjust menu offset position when scroll is present (#175) add md-tooltip for tabheader (#171)
This commit is contained in:
commit
534b8ca250
3 changed files with 30 additions and 5 deletions
|
|
@ -115,6 +115,18 @@
|
|||
<md-table-cell><code>Boolean</code></md-table-cell>
|
||||
<md-table-cell>Disable the tab and prevent his actions. Default <code>false</code></md-table-cell>
|
||||
</md-table-row>
|
||||
|
||||
<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-row>
|
||||
|
||||
<md-table-row>
|
||||
<md-table-cell>md-tooltip-direction</md-table-cell>
|
||||
<md-table-cell><code>String</code></md-table-cell>
|
||||
<md-table-cell>Direction of the tab header tooltip. Default: <code>bottom</code></md-table-cell>
|
||||
</md-table-row>
|
||||
</md-table-body>
|
||||
</md-table>
|
||||
</api-table>
|
||||
|
|
@ -137,7 +149,7 @@
|
|||
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Deserunt dolorum quas.</p>
|
||||
</md-tab>
|
||||
|
||||
<md-tab id="pictures" md-label="Pictures">
|
||||
<md-tab id="pictures" md-label="Pictures" md-tooltip="This is the pictures tab!">
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Deserunt dolorum quas.</p>
|
||||
</md-tab>
|
||||
</md-tabs>
|
||||
|
|
@ -159,7 +171,7 @@
|
|||
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Deserunt dolorum quas.</p>
|
||||
</md-tab>
|
||||
|
||||
<md-tab id="pictures" md-label="Pictures">
|
||||
<md-tab id="pictures" md-label="Pictures" md-tooltip="This is the pictures tab!">
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Deserunt dolorum quas.</p>
|
||||
</md-tab>
|
||||
</md-tabs>
|
||||
|
|
|
|||
|
|
@ -123,8 +123,8 @@
|
|||
|
||||
position = getInViewPosition(this.menuContent, position);
|
||||
|
||||
this.menuContent.style.top = position.top + 'px';
|
||||
this.menuContent.style.left = position.left + 'px';
|
||||
this.menuContent.style.top = position.top + window.pageYOffset + 'px';
|
||||
this.menuContent.style.left = position.left + window.pageXOffset + 'px';
|
||||
},
|
||||
recalculateOnResize() {
|
||||
window.requestAnimationFrame(this.calculateMenuContentPos);
|
||||
|
|
|
|||
|
|
@ -14,7 +14,12 @@
|
|||
mdLabel: [String, Number],
|
||||
mdIcon: String,
|
||||
mdActive: Boolean,
|
||||
mdDisabled: Boolean
|
||||
mdDisabled: Boolean,
|
||||
mdTooltip: String,
|
||||
mdTooltipDirection: {
|
||||
type: String,
|
||||
default: 'bottom'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -36,6 +41,12 @@
|
|||
},
|
||||
mdLabel() {
|
||||
this.updateTabData();
|
||||
},
|
||||
mdTooltip() {
|
||||
this.updateTabData();
|
||||
},
|
||||
mdTooltipDirection() {
|
||||
this.updateTabData();
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
|
@ -54,6 +65,8 @@
|
|||
icon: this.mdIcon,
|
||||
active: this.mdActive,
|
||||
disabled: this.mdDisabled,
|
||||
tooltip: this.mdTooltip,
|
||||
tooltipDirection: this.mdTooltipDirection,
|
||||
ref: this
|
||||
};
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue