Refactor #3965 - Update for OverlayPanel
parent
8467dd2a0d
commit
1625d6e4f5
|
@ -4,10 +4,7 @@ import { useStyle } from 'primevue/usestyle';
|
||||||
|
|
||||||
const styles = `
|
const styles = `
|
||||||
.p-overlaypanel {
|
.p-overlaypanel {
|
||||||
position: absolute;
|
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-overlaypanel-flipped {
|
.p-overlaypanel-flipped {
|
||||||
|
@ -87,7 +84,7 @@ const classes = {
|
||||||
],
|
],
|
||||||
content: 'p-overlaypanel-content',
|
content: 'p-overlaypanel-content',
|
||||||
closeButton: 'p-overlaypanel-close p-link',
|
closeButton: 'p-overlaypanel-close p-link',
|
||||||
closeIcon: ({ props }) => ['p-overlaypanel-close-icon ', props.closeIcon]
|
closeIcon: 'p-overlaypanel-close-icon'
|
||||||
};
|
};
|
||||||
|
|
||||||
const { load: loadStyle } = useStyle(styles, { id: 'primevue_overlaypanel_style', manual: true });
|
const { load: loadStyle } = useStyle(styles, { id: 'primevue_overlaypanel_style', manual: true });
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
</div>
|
</div>
|
||||||
<button v-if="showCloseIcon" v-ripple :class="cx('closeButton')" :aria-label="closeAriaLabel" type="button" autofocus @click="hide" @keydown="onButtonKeydown" v-bind="ptm('closeButton')">
|
<button v-if="showCloseIcon" v-ripple :class="cx('closeButton')" :aria-label="closeAriaLabel" type="button" autofocus @click="hide" @keydown="onButtonKeydown" v-bind="ptm('closeButton')">
|
||||||
<slot name="closeicon">
|
<slot name="closeicon">
|
||||||
<component :is="closeIcon ? 'span' : 'TimesIcon'" :class="cx('closeIcon')" v-bind="ptm('closeIcon')"></component>
|
<component :is="closeIcon ? 'span' : 'TimesIcon'" :class="[cx('closeIcon'), closeIcon]" v-bind="ptm('closeIcon')"></component>
|
||||||
</slot>
|
</slot>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -104,6 +104,7 @@ export default {
|
||||||
},
|
},
|
||||||
onEnter(el) {
|
onEnter(el) {
|
||||||
this.container.setAttribute(this.attributeSelector, '');
|
this.container.setAttribute(this.attributeSelector, '');
|
||||||
|
DomHandler.addStyles(el, { position: 'absolute', top: '0', left: '0' });
|
||||||
this.alignOverlay();
|
this.alignOverlay();
|
||||||
|
|
||||||
if (this.dismissable) {
|
if (this.dismissable) {
|
||||||
|
|
Loading…
Reference in New Issue