Refactor #3885 - For DynamicDialog
parent
de6494e220
commit
9c9ea7484e
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<template v-for="(instance, key) in instanceMap" :key="key">
|
<template v-for="(instance, key) in instanceMap" :key="key">
|
||||||
<DDialog v-model:visible="instance.visible" :_instance="instance" v-bind="instance.options.props" @hide="onDialogHide(instance)" @after-hide="onDialogAfterHide">
|
<DDialog v-model:visible="instance.visible" :_instance="instance" v-bind="instance.options.props" :pt="pt" @hide="onDialogHide(instance)" @after-hide="onDialogAfterHide">
|
||||||
<template v-if="instance.options.templates && instance.options.templates.header" #header>
|
<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>
|
<component v-for="(header, index) in getTemplateItems(instance.options.templates.header)" :is="header" :key="index + '_header'"></component>
|
||||||
</template>
|
</template>
|
||||||
|
@ -13,12 +13,14 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import BaseComponent from 'primevue/basecomponent';
|
||||||
import Dialog from 'primevue/dialog';
|
import Dialog from 'primevue/dialog';
|
||||||
import DynamicDialogEventBus from 'primevue/dynamicdialogeventbus';
|
import DynamicDialogEventBus from 'primevue/dynamicdialogeventbus';
|
||||||
import { UniqueComponentId } from 'primevue/utils';
|
import { UniqueComponentId } from 'primevue/utils';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'DynamicDialog',
|
name: 'DynamicDialog',
|
||||||
|
extends: BaseComponent,
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Reference in New Issue