mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-11 01:42:34 +00:00
Components added. Build issues fixed
This commit is contained in:
parent
5b66ed1093
commit
18c3721848
344 changed files with 12446 additions and 8758 deletions
|
@ -1,12 +1,12 @@
|
|||
<template>
|
||||
<template v-for="(instance, key) in instanceMap" :key="key">
|
||||
<DDialog :_instance="instance" v-bind="instance.options.props" v-model:visible="instance.visible" @hide="onDialogHide(instance)" @after-hide="onDialogAfterHide">
|
||||
<template #header v-if="instance.options.templates && instance.options.templates.header">
|
||||
<component :is="header" v-for="(header, index) in getTemplateItems(instance.options.templates.header)" :key="index + '_header'"></component>
|
||||
<DDialog v-model:visible="instance.visible" :_instance="instance" v-bind="instance.options.props" @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>
|
||||
<component :is="instance.content"></component>
|
||||
<template #footer v-if="instance.options.templates && instance.options.templates.footer">
|
||||
<component :is="footer" v-for="(footer, index) in getTemplateItems(instance.options.templates.footer)" :key="index + '_footer'"></component>
|
||||
<template v-if="instance.options.templates && instance.options.templates.footer" #footer>
|
||||
<component v-for="(footer, index) in getTemplateItems(instance.options.templates.footer)" :is="footer" :key="index + '_footer'"></component>
|
||||
</template>
|
||||
</DDialog>
|
||||
</template>
|
||||
|
@ -23,7 +23,7 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
instanceMap: {}
|
||||
}
|
||||
};
|
||||
},
|
||||
openListener: null,
|
||||
closeListener: null,
|
||||
|
@ -43,7 +43,7 @@ export default {
|
|||
|
||||
if (currentInstance) {
|
||||
currentInstance.visible = false;
|
||||
currentInstance.options.onClose && currentInstance.options.onClose({ data: params, type: 'config-close' });
|
||||
currentInstance.options.onClose && currentInstance.options.onClose({ data: params, type: 'config-close' });
|
||||
|
||||
this.currentInstance = currentInstance;
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ export default {
|
|||
!this.currentInstance && instance.options.onClose && instance.options.onClose({ type: 'dialog-close' });
|
||||
},
|
||||
onDialogAfterHide() {
|
||||
this.currentInstance && (delete this.currentInstance);
|
||||
this.currentInstance && delete this.currentInstance;
|
||||
this.currentInstance = null;
|
||||
},
|
||||
getTemplateItems(template) {
|
||||
|
@ -69,7 +69,7 @@ export default {
|
|||
}
|
||||
},
|
||||
components: {
|
||||
'DDialog': Dialog
|
||||
DDialog: Dialog
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue