Fixed #4848 - Dialog: PT options rename

pull/4858/head
tugcekucukoglu 2023-11-20 13:07:00 +03:00
parent 07a57129eb
commit 3047b8a9fd
4 changed files with 10 additions and 10 deletions

View File

@ -54,11 +54,11 @@ export interface ConfirmDialogPassThroughOptions {
/** /**
* Used to pass attributes to the header title's DOM element. * Used to pass attributes to the header title's DOM element.
*/ */
headerTitle?: ConfirmDialogPassThroughOptionType; title?: ConfirmDialogPassThroughOptionType;
/** /**
* Used to pass attributes to the header icons' DOM element. * Used to pass attributes to the header icons' DOM element.
*/ */
headerIcons?: ConfirmDialogPassThroughOptionType; icons?: ConfirmDialogPassThroughOptionType;
/** /**
* Used to pass attributes to the close button's component. * Used to pass attributes to the close button's component.
*/ */

View File

@ -54,11 +54,11 @@ export interface DialogPassThroughOptions {
/** /**
* Used to pass attributes to the header title's DOM element. * Used to pass attributes to the header title's DOM element.
*/ */
headerTitle?: DialogPassThroughOptionType; title?: DialogPassThroughOptionType;
/** /**
* Used to pass attributes to the header icons' DOM element. * Used to pass attributes to the header icons' DOM element.
*/ */
headerIcons?: DialogPassThroughOptionType; icons?: DialogPassThroughOptionType;
/** /**
* Used to pass attributes to the maximizable button's DOM element. * Used to pass attributes to the maximizable button's DOM element.
*/ */

View File

@ -6,10 +6,10 @@
<slot v-if="$slots.container" name="container" :onClose="close" :onMaximize="(event) => maximize(event)" :closeCallback="close" :maximizeCallback="(event) => maximize(event)"></slot> <slot v-if="$slots.container" name="container" :onClose="close" :onMaximize="(event) => maximize(event)" :closeCallback="close" :maximizeCallback="(event) => maximize(event)"></slot>
<template v-else> <template v-else>
<div v-if="showHeader" :ref="headerContainerRef" :class="cx('header')" @mousedown="initDrag" v-bind="ptm('header')"> <div v-if="showHeader" :ref="headerContainerRef" :class="cx('header')" @mousedown="initDrag" v-bind="ptm('header')">
<slot name="header" :class="cx('headerTitle')"> <slot name="header" :class="cx('title')">
<span v-if="header" :id="ariaLabelledById" :class="cx('headerTitle')" v-bind="ptm('headerTitle')">{{ header }}</span> <span v-if="header" :id="ariaLabelledById" :class="cx('title')" v-bind="ptm('title')">{{ header }}</span>
</slot> </slot>
<div :class="cx('headerIcons')" v-bind="ptm('headerIcons')"> <div :class="cx('icons')" v-bind="ptm('icons')">
<button <button
v-if="maximizable" v-if="maximizable"
:ref="maximizableRef" :ref="maximizableRef"
@ -283,7 +283,7 @@ export default {
} }
}, },
initDrag(event) { initDrag(event) {
if (event.target.closest('div').getAttribute('data-pc-section') === 'headericons') { if (event.target.closest('div').getAttribute('data-pc-section') === 'icons') {
return; return;
} }

View File

@ -179,8 +179,8 @@ const classes = {
} }
], ],
header: 'p-dialog-header', header: 'p-dialog-header',
headerTitle: 'p-dialog-title', title: 'p-dialog-title',
headerIcons: 'p-dialog-header-icons', icons: 'p-dialog-header-icons',
maximizableButton: 'p-dialog-header-icon p-dialog-header-maximize p-link', maximizableButton: 'p-dialog-header-icon p-dialog-header-maximize p-link',
maximizableIcon: 'p-dialog-header-maximize-icon', maximizableIcon: 'p-dialog-header-maximize-icon',
closeButton: 'p-dialog-header-icon p-dialog-header-close p-link', closeButton: 'p-dialog-header-icon p-dialog-header-close p-link',