mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Refactor #4103 - unstyled option updates
This commit is contained in:
parent
6c9b61aa65
commit
0f0c9b95b2
4 changed files with 23 additions and 23 deletions
|
@ -31,8 +31,8 @@ const Tooltip = BaseTooltip.extend('tooltip', {
|
|||
}
|
||||
}
|
||||
|
||||
target.$_ptooltipZIndex = options.instance.$primevue.config?.zIndex?.tooltip;
|
||||
target.$_ptooltipUnstyled = options.instance.$primevue.config?.unstyled || options.value?.unstyled || false;
|
||||
target.$_ptooltipZIndex = options.instance.$primevue?.config?.zIndex?.tooltip;
|
||||
target.unstyled = options.instance.$primevue?.config?.unstyled || options.value?.unstyled || false;
|
||||
|
||||
this.bindEvents(target, options);
|
||||
},
|
||||
|
@ -75,7 +75,7 @@ const Tooltip = BaseTooltip.extend('tooltip', {
|
|||
}
|
||||
}
|
||||
|
||||
target.$_ptooltipUnstyled = options.instance.$primevue.config?.unstyled || options.value?.unstyled || false;
|
||||
target.unstyled = options.instance.$primevue?.config?.unstyled || options.value?.unstyled || false;
|
||||
},
|
||||
unmounted(el, options) {
|
||||
let target = this.getTarget(el);
|
||||
|
@ -184,7 +184,7 @@ const Tooltip = BaseTooltip.extend('tooltip', {
|
|||
let tooltipElement = this.create(el, options);
|
||||
|
||||
this.align(el);
|
||||
!el.$_ptooltipUnstyled && DomHandler.fadeIn(tooltipElement, 250);
|
||||
!el.unstyled && DomHandler.fadeIn(tooltipElement, 250);
|
||||
|
||||
const $this = this;
|
||||
|
||||
|
@ -224,12 +224,12 @@ const Tooltip = BaseTooltip.extend('tooltip', {
|
|||
},
|
||||
create(el, options) {
|
||||
const tooltipArrow = DomHandler.createElement('div', {
|
||||
class: !el.$_ptooltipUnstyled && this.cx('arrow'),
|
||||
class: !el.unstyled && this.cx('arrow'),
|
||||
'p-bind': this.ptm('arrow')
|
||||
});
|
||||
|
||||
const tooltipText = DomHandler.createElement('div', {
|
||||
class: !el.$_ptooltipUnstyled && this.cx('text'),
|
||||
class: !el.unstyled && this.cx('text'),
|
||||
'p-bind': this.ptm('text')
|
||||
});
|
||||
|
||||
|
@ -249,7 +249,7 @@ const Tooltip = BaseTooltip.extend('tooltip', {
|
|||
display: 'inline-block',
|
||||
width: el.$_ptooltipFitContent ? 'fit-content' : undefined
|
||||
},
|
||||
class: [!el.$_ptooltipUnstyled && this.cx('root'), el.$_ptooltipClass],
|
||||
class: [!el.unstyled && this.cx('root'), el.$_ptooltipClass],
|
||||
'p-bind': this.ptm('root')
|
||||
},
|
||||
tooltipArrow,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue