mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-08 16:37:15 +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
45
doc/dynamicdialog/OpenDialogDoc.vue
Normal file
45
doc/dynamicdialog/OpenDialogDoc.vue
Normal file
|
@ -0,0 +1,45 @@
|
|||
<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>
|
||||
<DocSectionCode :code="code" import hideCodeSandbox hideStackBlitz />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
code: {
|
||||
basic: `
|
||||
import ProductListDemo from './ProductListDemo';
|
||||
|
||||
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>
|
Loading…
Add table
Add a link
Reference in a new issue