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 @@
-
+
There are {{totalProducts}} products in total in this list.
-
+
+
+
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',