Updated DynamicDialog documentation

This commit is contained in:
Cagatay Civici 2023-11-02 09:28:24 +03:00
parent 03732ab3f8
commit dbac600078
11 changed files with 160 additions and 195 deletions

View file

@ -1,8 +1,8 @@
<template>
<DocSectionText v-bind="$attrs">
<p>The <i>close</i> function of the <i>dialogRef</i> is used to hide a Dialog. The <i>dialogRef</i> is injected to the component that is loaded by the dialog.</p>
<p>The <i>close</i> function is available through a <i>dialogRef</i> that is injected to the component loaded by the dialog.</p>
</DocSectionText>
<DocSectionCode :code="code" importCode hideCodeSandbox hideStackBlitz />
<DocSectionCode :code="code" importCode hideToggleCode hideCodeSandbox hideStackBlitz />
</template>
<script>
@ -11,33 +11,14 @@ export default {
return {
code: {
basic: `
export default {
inject: ['dialogRef'],
methods:{
closeDialog() {
this.dialogRef.close();
}
}
}
`,
options: `
export default {
inject: ['dialogRef'],
methods:{
closeDialog() {
this.dialogRef.close();
}
}
}
`,
composition: `
import { inject } from "vue";
const dialogRef = inject('dialogRef');
const closeDialog = () => {
dialogRef.value.close();
}`
}
`
}
};
}