mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 08:52:34 +00:00
Merged new Docs and Demos
This commit is contained in:
parent
296cc217fb
commit
dfcc8ef4e7
1235 changed files with 130757 additions and 122640 deletions
55
doc/dynamicdialog/CustomizingDialogDoc.vue
Normal file
55
doc/dynamicdialog/CustomizingDialogDoc.vue
Normal file
|
@ -0,0 +1,55 @@
|
|||
<template>
|
||||
<DocSectionText v-bind="$attrs">
|
||||
<p>DynamicDialog uses the Dialog component internally, visit <NuxtLink to="/dialog">dialog</NuxtLink> for more information.</p>
|
||||
</DocSectionText>
|
||||
<DocSectionCode :code="code" hideToggleCode import hideCodeSandbox hideStackBlitz />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
code: {
|
||||
basic: `
|
||||
import { h } from 'vue';
|
||||
import Button from 'primevue/button';
|
||||
import ProductListDemo from './ProductListDemo';
|
||||
|
||||
export default {
|
||||
methods:{
|
||||
showProducts() {
|
||||
const dialogRef = this.$dialog.open(ProductListDemo, {
|
||||
props: {
|
||||
header: 'Product List',
|
||||
style: {
|
||||
width: '50vw',
|
||||
},
|
||||
breakpoints:{
|
||||
'960px': '75vw',
|
||||
'640px': '90vw'
|
||||
},
|
||||
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})
|
||||
]
|
||||
}
|
||||
},
|
||||
onClose: (options) => {
|
||||
const data = options.data;
|
||||
if (data) {
|
||||
this.$toast.add({ severity:'info', summary: 'Info Message', detail:'Order submitted', life: 3000 });
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}`
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue