mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Documentation updates
This commit is contained in:
parent
c6f69602c1
commit
8036b64523
49 changed files with 620 additions and 468 deletions
|
@ -1,22 +1,36 @@
|
|||
//TODO:
|
||||
<template>
|
||||
<DocSectionText v-bind="$attrs">
|
||||
<p>Dynamic dialogs require the <i>DialogService</i> to be configured globally.</p>
|
||||
<p>Dynamic dialogs are controlled via the <i>DialogService</i> that needs to be installed as an application plugin.</p>
|
||||
</DocSectionText>
|
||||
<DocSectionCode :code="code" hideToggleCode importCode hideCodeSandbox hideStackBlitz />
|
||||
<DocSectionCode :code="code1" hideToggleCode importCode hideCodeSandbox hideStackBlitz />
|
||||
<div class="doc-section-description">
|
||||
<p><i>$dialog</i> is available as a property in the application instance for Options API. The service can be injected with the <i>useDialog</i> function for Composition API.</p>
|
||||
</div>
|
||||
<DocSectionCode :code="code2" import hideCodeSandbox hideStackBlitz />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
code: {
|
||||
code1: {
|
||||
basic: `
|
||||
import {createApp} from 'vue';
|
||||
import DialogService from 'primevue/dialogservice';
|
||||
|
||||
const app = createApp(App);
|
||||
app.use(DialogService);`
|
||||
},
|
||||
code2: {
|
||||
basic: `
|
||||
import { useDialog } from 'primevue/usedialog';
|
||||
|
||||
const dialog = useDialog();`,
|
||||
options: `const dialogRef = this.$dialog;`,
|
||||
composition: `
|
||||
import { useDialog } from 'primevue/usedialog';
|
||||
|
||||
const dialog = useDialog();`
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue