2023-02-28 08:29:30 +00:00
|
|
|
<template>
|
|
|
|
<DocSectionText v-bind="$attrs">
|
|
|
|
<p>The <i>open</i> function of the <i>DialogService</i> is used to open a Dialog. First parameter is the component to load and second one is the configuration object to customize the Dialog.</p>
|
|
|
|
</DocSectionText>
|
2023-03-13 13:31:27 +00:00
|
|
|
<DocSectionCode :code="code" importCode hideCodeSandbox hideStackBlitz />
|
2023-02-28 08:29:30 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
code: {
|
2023-08-16 13:58:31 +00:00
|
|
|
basic: `import ProductListDemo from './ProductListDemo';
|
2023-02-28 08:29:30 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
methods:{
|
|
|
|
showProducts() {
|
|
|
|
this.$dialog.open(ProductListDemo, {});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}`,
|
|
|
|
options: `
|
|
|
|
import ProductListDemo from './ProductListDemo';
|
|
|
|
|
|
|
|
export default {
|
|
|
|
methods:{
|
|
|
|
showProducts() {
|
|
|
|
this.$dialog.open(ProductListDemo, {});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}`,
|
|
|
|
composition: `
|
|
|
|
import ProductListDemo from './ProductListDemo';
|
|
|
|
import { useDialog } from 'primevue/usedialog';
|
|
|
|
|
|
|
|
const showProducts = () => {
|
|
|
|
const dialog = useDialog();
|
|
|
|
dialog.open(ProductListDemo, {});
|
|
|
|
}`
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|