Fixed #2266 - Type declaration and export bug on ConfirmationService

pull/2324/head
Tuğçe Küçükoğlu 2022-03-16 13:00:50 +03:00
parent 1a2084935a
commit 9fe6164d9a
3 changed files with 61 additions and 2 deletions

View File

@ -4,8 +4,15 @@ import { ConfirmationOptions } from '../confirmationoptions';
declare const plugin: Plugin; declare const plugin: Plugin;
export default plugin; export default plugin;
interface ConfirmationServiceMethods { export interface ConfirmationServiceMethods {
/**
* Displays the dialog using the confirmation object options.
* @param {ConfirmationOptions} options - Confirmation Object
*/
require(options: ConfirmationOptions): void; require(options: ConfirmationOptions): void;
/**
* Hides the dialog without invoking accept or reject callbacks.
*/
close(): void; close(): void;
} }

View File

@ -32,6 +32,7 @@ import ConfirmDialog from 'primevue/confirmdialog';
<ConfirmDialog></ConfirmDialog> <ConfirmDialog></ConfirmDialog>
<Button @click="delete()" icon="pi pi-check" label="Confirm"></Button> <Button @click="delete()" icon="pi pi-check" label="Confirm"></Button>
</code></pre> </code></pre>
<pre v-code.script><code> <pre v-code.script><code>
@ -202,6 +203,31 @@ export default {
</table> </table>
</div> </div>
<h5>ConfirmationService</h5>
<div class="doc-tablewrapper">
<table class="doc-table">
<thead>
<tr>
<th>Name</th>
<th>Parameters</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>require</td>
<td>confirm: Confirmation Object</td>
<td>Displays the dialog using the confirmation object options.</td>
</tr>
<tr>
<td>close</td>
<td>-</td>
<td>Hides the dialog without invoking accept or reject callbacks.</td>
</tr>
</tbody>
</table>
</div>
<h5>Properties</h5> <h5>Properties</h5>
<p>Any property as style and class are passed to the main container element. Following are the additional properties to configure the component.</p> <p>Any property as style and class are passed to the main container element. Following are the additional properties to configure the component.</p>
<div class="doc-tablewrapper"> <div class="doc-tablewrapper">

View File

@ -32,6 +32,7 @@ import ConfirmPopup from 'primevue/confirmpopup';
&lt;ConfirmPopup&gt;&lt;/ConfirmPopup&gt; &lt;ConfirmPopup&gt;&lt;/ConfirmPopup&gt;
&lt;Button @click="delete($event)" icon="pi pi-check" label="Confirm"&gt;&lt;/Button&gt; &lt;Button @click="delete($event)" icon="pi pi-check" label="Confirm"&gt;&lt;/Button&gt;
</code></pre> </code></pre>
<pre v-code.script><code> <pre v-code.script><code>
@ -161,7 +162,7 @@ export default {
<td>null</td> <td>null</td>
<td>Callback to execute when action is rejected.</td> <td>Callback to execute when action is rejected.</td>
</tr> </tr>
<tr> <tr>
<td>acceptLabel</td> <td>acceptLabel</td>
<td>string</td> <td>string</td>
<td>null</td> <td>null</td>
@ -201,6 +202,31 @@ export default {
</table> </table>
</div> </div>
<h5>ConfirmationService</h5>
<div class="doc-tablewrapper">
<table class="doc-table">
<thead>
<tr>
<th>Name</th>
<th>Parameters</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>require</td>
<td>confirm: Confirmation Object</td>
<td>Displays the dialog using the confirmation object options.</td>
</tr>
<tr>
<td>close</td>
<td>-</td>
<td>Hides the dialog without invoking accept or reject callbacks.</td>
</tr>
</tbody>
</table>
</div>
<h5>Properties</h5> <h5>Properties</h5>
<p>Any property as style and class are passed to the main container element. Following are the additional properties to configure the component.</p> <p>Any property as style and class are passed to the main container element. Following are the additional properties to configure the component.</p>
<div class="doc-tablewrapper"> <div class="doc-tablewrapper">