1
0
Fork 0
mirror of https://github.com/primefaces/primevue.git synced 2025-05-11 01:42:34 +00:00
primevue-mirror/doc/dynamicdialog/CloseDialogDoc.vue
2023-11-02 09:28:24 +03:00

26 lines
590 B
Vue

<template>
<DocSectionText v-bind="$attrs">
<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 hideToggleCode hideCodeSandbox hideStackBlitz />
</template>
<script>
export default {
data() {
return {
code: {
basic: `
import { inject } from "vue";
const dialogRef = inject('dialogRef');
const closeDialog = () => {
dialogRef.value.close();
}
`
}
};
}
};
</script>