2023-02-28 08:29:30 +00:00
|
|
|
<template>
|
|
|
|
<DocSectionText v-bind="$attrs">
|
2023-11-02 06:28:24 +00:00
|
|
|
<p>DynamicDialog uses the Dialog component internally, visit <NuxtLink to="/dialog">dialog</NuxtLink> for more information about the available props.</p>
|
2023-02-28 08:29:30 +00:00
|
|
|
</DocSectionText>
|
2024-01-30 08:16:35 +00:00
|
|
|
<DocSectionCode :code="code" hideToggleCode importCode hideStackBlitz />
|
2023-02-28 08:29:30 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
code: {
|
2023-09-22 12:54:14 +00:00
|
|
|
basic: `
|
2023-02-28 08:29:30 +00:00
|
|
|
import ProductListDemo from './ProductListDemo';
|
2023-11-02 06:28:24 +00:00
|
|
|
import { useDialog } from 'primevue/usedialog';
|
2023-02-28 08:29:30 +00:00
|
|
|
|
2023-11-02 06:28:24 +00:00
|
|
|
const dialog = useDialog();
|
|
|
|
|
|
|
|
const showProducts = () => {
|
|
|
|
dialog.open(ProductListDemo, {
|
|
|
|
props: {
|
|
|
|
header: 'Product List',
|
|
|
|
style: {
|
|
|
|
width: '50vw',
|
|
|
|
},
|
|
|
|
breakpoints:{
|
|
|
|
'960px': '75vw',
|
|
|
|
'640px': '90vw'
|
|
|
|
},
|
|
|
|
modal: true
|
2023-02-28 08:29:30 +00:00
|
|
|
}
|
2023-11-02 06:28:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
`
|
2023-02-28 08:29:30 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|