diff --git a/src/components/dialog/Dialog.d.ts b/src/components/dialog/Dialog.d.ts index d0d420d3e..26041454f 100755 --- a/src/components/dialog/Dialog.d.ts +++ b/src/components/dialog/Dialog.d.ts @@ -23,6 +23,8 @@ declare class Dialog { $props: DialogProps; $emit(eventName: 'show'): this; $emit(eventName: 'hide'): this; + $emit(eventName: 'maximize'): this; + $emit(eventName: 'unmaximize'): this; $slots: { '': VNode[]; header: VNode[]; diff --git a/src/components/dialog/Dialog.vue b/src/components/dialog/Dialog.vue index 91f0257d3..48ed0e3ff 100755 --- a/src/components/dialog/Dialog.vue +++ b/src/components/dialog/Dialog.vue @@ -34,7 +34,7 @@ import Ripple from 'primevue/ripple'; export default { inheritAttrs: false, - emits: ['update:visible', 'show', 'hide'], + emits: ['update:visible','show','hide','maximize','unmaximize'], props: { header: null, footer: null, @@ -150,8 +150,15 @@ export default { focusTarget.focus(); } }, - maximize() { - this.maximized = !this.maximized; + maximize(event) { + if (this.maximized) { + this.maximized = false; + this.$emit('unmaximize', event); + } + else { + this.maximized = true; + this.$emit('maximize', event); + } if (!this.modal) { if (this.maximized) diff --git a/src/views/dialog/DialogDoc.vue b/src/views/dialog/DialogDoc.vue index 172792328..89897f36f 100755 --- a/src/views/dialog/DialogDoc.vue +++ b/src/views/dialog/DialogDoc.vue @@ -207,16 +207,26 @@ export default {
-