From bd299170b26ee9e3da6d5eee0276a20a3cee2e2b Mon Sep 17 00:00:00 2001 From: Cagatay Civici Date: Tue, 14 Jun 2022 14:06:35 +0300 Subject: [PATCH] Update demo --- src/views/dynamicdialog/DynamicDialogDemo.vue | 13 +++++++----- src/views/dynamicdialog/InfoDemo.vue | 6 ++++-- src/views/dynamicdialog/ProductListDemo.vue | 20 +++++++++++++------ 3 files changed, 26 insertions(+), 13 deletions(-) diff --git a/src/views/dynamicdialog/DynamicDialogDemo.vue b/src/views/dynamicdialog/DynamicDialogDemo.vue index b4436a7e6..5f1be3584 100644 --- a/src/views/dynamicdialog/DynamicDialogDemo.vue +++ b/src/views/dynamicdialog/DynamicDialogDemo.vue @@ -10,7 +10,7 @@
-
@@ -28,13 +28,16 @@ import DynamicDialogDoc from './DynamicDialogDoc.vue'; export default { methods:{ - onShow() { + showProducts() { const dialogRef = this.$dialog.open(ProductListDemo, { props: { header: 'Product List', style: { - width: '50%', - height: '550px', + width: '50vw', + }, + breakpoints:{ + '960px': '75vw', + '640px': '90vw' }, modal: true }, @@ -42,7 +45,7 @@ export default { footer: () => { return [ h(Button, { label: "No", icon: "pi pi-times", onClick: () => dialogRef.hide({ buttonType: 'No' }), class: "p-button-text" }), - h(Button, { label: "Yes", icon: "pi pi-check", onClick: () => dialogRef.hide({ buttonType: 'Yes' }), autofocus: true }) + h(Button, { label: "Yes", icon: "pi pi-check", onClick: () => dialogRef.hide({ buttonType: 'Yes' }), autofocus: true}) ] } }, diff --git a/src/views/dynamicdialog/InfoDemo.vue b/src/views/dynamicdialog/InfoDemo.vue index 12337bcac..e3587e339 100644 --- a/src/views/dynamicdialog/InfoDemo.vue +++ b/src/views/dynamicdialog/InfoDemo.vue @@ -1,7 +1,9 @@ diff --git a/src/views/dynamicdialog/ProductListDemo.vue b/src/views/dynamicdialog/ProductListDemo.vue index 57c117f8e..e959c30a9 100644 --- a/src/views/dynamicdialog/ProductListDemo.vue +++ b/src/views/dynamicdialog/ProductListDemo.vue @@ -1,17 +1,25 @@ @@ -31,13 +39,13 @@ export default { this.productService = new ProductService(); }, mounted() { - this.productService.getProductsSmall().then(data => this.products = data); + this.productService.getProductsSmall().then(data => this.products = data.slice(0,5)); }, methods: { - closeDialog(data) { + selectProduct(data) { this.dialogRef.hide(data); }, - onInfoShow() { + showInfo() { this.$dialog.open(InfoDemo, { props: { header: 'Information',