40 lines
930 B
Vue
40 lines
930 B
Vue
<template>
|
|
<DocSectionText v-bind="$attrs">
|
|
<p>DynamicDialog uses the Dialog component internally, visit <NuxtLink to="/dialog">dialog</NuxtLink> for more information about the available props.</p>
|
|
</DocSectionText>
|
|
<DocSectionCode :code="code" hideToggleCode importCode hideStackBlitz />
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
code: {
|
|
basic: `
|
|
import ProductListDemo from './ProductListDemo';
|
|
import { useDialog } from 'primevue/usedialog';
|
|
|
|
const dialog = useDialog();
|
|
|
|
const showProducts = () => {
|
|
dialog.open(ProductListDemo, {
|
|
props: {
|
|
header: 'Product List',
|
|
style: {
|
|
width: '50vw',
|
|
},
|
|
breakpoints:{
|
|
'960px': '75vw',
|
|
'640px': '90vw'
|
|
},
|
|
modal: true
|
|
}
|
|
});
|
|
}
|
|
`
|
|
}
|
|
};
|
|
}
|
|
};
|
|
</script>
|