Fixed #3820 - Panel: Footer Templating

This commit is contained in:
Tuğçe Küçükoğlu 2023-03-31 16:42:19 +03:00
parent 3ec57ea283
commit be2f2acb38
52 changed files with 264 additions and 53 deletions

View file

@ -72,6 +72,10 @@ export interface PanelPassThroughOptions {
* Uses to pass attributes to the content's DOM element.
*/
content?: PanelPassThroughOptionType;
/**
* Uses to pass attributes to the footer's DOM element.
*/
footer?: PanelPassThroughOptionType;
}
/**
@ -148,6 +152,10 @@ export interface PanelSlots {
*/
collapsed: boolean;
}): VNode[];
/**
* Custom footer template.
*/
footer(): VNode[];
}
/**

View file

@ -31,6 +31,9 @@
<div class="p-panel-content" v-bind="ptm('content')">
<slot></slot>
</div>
<div v-if="$slots.footer" class="p-panel-footer" v-bind="ptm('footer')">
<slot name="footer"></slot>
</div>
</div>
</transition>
</div>