From 91873a8ae71fc14f43cf66fff188bab734e78828 Mon Sep 17 00:00:00 2001 From: mertsincan Date: Mon, 13 Mar 2023 12:36:33 +0000 Subject: [PATCH] Update dynamic demo --- doc/dynamicdialog/CustomizationDoc.vue | 11 ++--- doc/dynamicdialog/DialogServiceDoc.vue | 2 +- doc/dynamicdialog/EmitsDoc.vue | 49 +++++++++++++++++++ doc/dynamicdialog/UsageDoc.vue | 66 +++++++++++++++++--------- doc/dynamicdialog/demo/FooterDemo.vue | 15 ++++++ pages/dynamicdialog/index.vue | 6 +++ 6 files changed, 118 insertions(+), 31 deletions(-) create mode 100644 doc/dynamicdialog/EmitsDoc.vue create mode 100644 doc/dynamicdialog/demo/FooterDemo.vue diff --git a/doc/dynamicdialog/CustomizationDoc.vue b/doc/dynamicdialog/CustomizationDoc.vue index c995541ed..dd65751a6 100644 --- a/doc/dynamicdialog/CustomizationDoc.vue +++ b/doc/dynamicdialog/CustomizationDoc.vue @@ -11,9 +11,9 @@ export default { return { code: { basic: ` -import { h } from 'vue'; -import Button from 'primevue/button'; +import { markRaw } from 'vue'; import ProductListDemo from './ProductListDemo'; +import FooterDemo from './FooterDemo'; export default { methods:{ @@ -31,12 +31,7 @@ export default { modal: true }, templates: { - footer: () => { - return [ - h(Button, { label: "No", icon: "pi pi-times", onClick: () => dialogRef.close(), class: "p-button-text" }), - h(Button, { label: "Yes", icon: "pi pi-check", onClick: () => dialogRef.close(), autofocus: true}) - ] - } + footer: markRaw(FooterDemo) }, onClose: (options) => { const data = options.data; diff --git a/doc/dynamicdialog/DialogServiceDoc.vue b/doc/dynamicdialog/DialogServiceDoc.vue index fb7c2a477..4c9ca587b 100644 --- a/doc/dynamicdialog/DialogServiceDoc.vue +++ b/doc/dynamicdialog/DialogServiceDoc.vue @@ -6,7 +6,7 @@

$dialog is available as a property in the application instance for Options API. The service can be injected with the useDialog function for Composition API.

- + diff --git a/doc/dynamicdialog/UsageDoc.vue b/doc/dynamicdialog/UsageDoc.vue index 6c5898c0c..2fa311947 100644 --- a/doc/dynamicdialog/UsageDoc.vue +++ b/doc/dynamicdialog/UsageDoc.vue @@ -14,8 +14,8 @@ diff --git a/pages/dynamicdialog/index.vue b/pages/dynamicdialog/index.vue index 78ae1e5f8..e06efc641 100644 --- a/pages/dynamicdialog/index.vue +++ b/pages/dynamicdialog/index.vue @@ -13,6 +13,7 @@ import AccessibilityDoc from '@/doc/dynamicdialog/AccessibilityDoc'; import CloseDialogDoc from '@/doc/dynamicdialog/CloseDialogDoc'; import CustomizationDoc from '@/doc/dynamicdialog/CustomizationDoc'; import DialogServiceDoc from '@/doc/dynamicdialog/DialogServiceDoc'; +import EmitsDoc from '@/doc/dynamicdialog/EmitsDoc'; import ImportDoc from '@/doc/dynamicdialog/ImportDoc'; import OpenDialogDoc from '@/doc/dynamicdialog/OpenDialogDoc'; import PassingDataDoc from '@/doc/dynamicdialog/PassingDataDoc'; @@ -52,6 +53,11 @@ export default { label: 'Passing Data', component: PassingDataDoc }, + { + id: 'emits', + label: 'Emits', + component: EmitsDoc + }, { id: 'customization', label: 'Customization',