mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-11 01:42:34 +00:00
Tooltip: autoHide (#4126)
* Add autohide to tooltip * Add missing enter --------- Co-authored-by: Mikołaj Andrasiak <mikolaj.andrasiak@ncbj.gov.pl>
This commit is contained in:
parent
9f4cc77f3a
commit
5b876bebfc
5 changed files with 77 additions and 3 deletions
41
doc/tooltip/AutoHideDoc.vue
Normal file
41
doc/tooltip/AutoHideDoc.vue
Normal file
|
@ -0,0 +1,41 @@
|
|||
<template>
|
||||
<DocSectionText v-bind="$attrs">
|
||||
<p>Tooltip is hidden when mouse leaves the target element, in cases where tooltip needs to be interacted with, set <i>autoHide</i> to false to change the default behavior.</p>
|
||||
</DocSectionText>
|
||||
<div class="card flex flex-wrap justify-content-center gap-2">
|
||||
<InputText v-tooltip="{ value: 'Enter your username', autoHide: false }" type="text" placeholder="autoHide: false" />
|
||||
<InputText v-tooltip="'Enter your username'" type="text" placeholder="autoHide: true" />
|
||||
</div>
|
||||
<DocSectionCode :code="code" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
code: {
|
||||
basic: `
|
||||
<InputText v-tooltip="{ value: 'Enter your username', autoHide: false }" type="text" placeholder="autoHide: false" />
|
||||
<InputText v-tooltip="'Enter your username'" type="text" placeholder="autoHide: true" />
|
||||
`,
|
||||
options: `
|
||||
<template>
|
||||
<div class="card flex flex-wrap justify-content-center gap-2">
|
||||
<InputText v-tooltip="{ value: 'Enter your username', autoHide: false }" type="text" placeholder="autoHide: false" />
|
||||
<InputText v-tooltip="'Enter your username'" type="text" placeholder="autoHide: true" />
|
||||
</div>
|
||||
</template>
|
||||
`,
|
||||
composition: `
|
||||
<template>
|
||||
<div class="card flex flex-wrap justify-content-center gap-2">
|
||||
<InputText v-tooltip="{ value: 'Enter your username', autoHide: false }" type="text" placeholder="autoHide: false" />
|
||||
<InputText v-tooltip="'Enter your username'" type="text" placeholder="autoHide: true" />
|
||||
</div>
|
||||
</template>
|
||||
`
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue