Refactor #3965 - For DynamicDialog

pull/4004/head
Bahadır Sofuoğlu 2023-05-29 22:00:59 +03:00
parent 3b0c89dffc
commit 2d2e9d9991
2 changed files with 8 additions and 2 deletions

View File

@ -12,7 +12,13 @@ import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
/**
* Defines valid properties in DynamicDialog component.
*/
export interface DynamicDialogProps {}
export interface DynamicDialogProps {
/**
* When enabled, it removes component related styles in the core.
* @defaultValue false
*/
unstyled?: boolean;
}
/**
* Defines valid emits in DynamicDialog component.

View File

@ -1,6 +1,6 @@
<template>
<template v-for="(instance, key) in instanceMap" :key="key">
<DDialog v-model:visible="instance.visible" :_instance="instance" v-bind="instance.options.props" :pt="pt" @hide="onDialogHide(instance)" @after-hide="onDialogAfterHide">
<DDialog v-model:visible="instance.visible" :_instance="instance" v-bind="instance.options.props" :pt="pt" :unstyled="unstyled" @hide="onDialogHide(instance)" @after-hide="onDialogAfterHide">
<template v-if="instance.options.templates && instance.options.templates.header" #header>
<component v-for="(header, index) in getTemplateItems(instance.options.templates.header)" :is="header" :key="index + '_header'"></component>
</template>