mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-10 01:12:37 +00:00
Update dialog docs
This commit is contained in:
parent
88bb7e6980
commit
c9901c3c0c
8 changed files with 168 additions and 108 deletions
|
@ -4,8 +4,8 @@
|
|||
</DocSectionText>
|
||||
<ConfirmPopup></ConfirmPopup>
|
||||
<div class="card flex flex-wrap gap-2 justify-content-center">
|
||||
<Button @click="confirm1($event)" icon="pi pi-check" label="Confirm"></Button>
|
||||
<Button @click="confirm2($event)" icon="pi pi-times" label="Delete" severity="danger"></Button>
|
||||
<Button @click="confirm1($event)" label="Save" outlined></Button>
|
||||
<Button @click="confirm2($event)" label="Delete" severity="danger" outlined></Button>
|
||||
</div>
|
||||
<DocSectionCode :code="code" />
|
||||
</template>
|
||||
|
@ -17,16 +17,16 @@ export default {
|
|||
code: {
|
||||
basic: `
|
||||
<ConfirmPopup></ConfirmPopup>
|
||||
<Button @click="confirm1($event)" icon="pi pi-check" label="Confirm"></Button>
|
||||
<Button @click="confirm2($event)" icon="pi pi-times" label="Delete" severity="danger"></Button>
|
||||
<Button @click="confirm1($event)" label="Save" outlined></Button>
|
||||
<Button @click="confirm2($event)" label="Delete" severity="danger" outlined></Button>
|
||||
`,
|
||||
options: `
|
||||
<template>
|
||||
<Toast />
|
||||
<ConfirmPopup></ConfirmPopup>
|
||||
<div class="card flex flex-wrap gap-2 justify-content-center">
|
||||
<Button @click="confirm1($event)" icon="pi pi-check" label="Confirm"></Button>
|
||||
<Button @click="confirm2($event)" icon="pi pi-times" label="Delete" severity="danger"></Button>
|
||||
<Button @click="confirm1($event)" label="Save" outlined></Button>
|
||||
<Button @click="confirm2($event)" label="Delete" severity="danger" outlined></Button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -38,6 +38,10 @@ export default {
|
|||
target: event.currentTarget,
|
||||
message: 'Are you sure you want to proceed?',
|
||||
icon: 'pi pi-exclamation-triangle',
|
||||
rejectClass: 'p-button-secondary p-button-outlined p-button-sm',
|
||||
acceptClass: 'p-button-sm',
|
||||
rejectLabel: 'Cancel',
|
||||
acceptLabel: 'Save',
|
||||
accept: () => {
|
||||
this.$toast.add({ severity: 'info', summary: 'Confirmed', detail: 'You have accepted', life: 3000 });
|
||||
},
|
||||
|
@ -51,7 +55,10 @@ export default {
|
|||
target: event.currentTarget,
|
||||
message: 'Do you want to delete this record?',
|
||||
icon: 'pi pi-info-circle',
|
||||
rejectClass: 'p-button-secondary p-button-outlined p-button-sm',
|
||||
acceptClass: 'p-button-danger p-button-sm',
|
||||
rejectLabel: 'Cancel',
|
||||
acceptLabel: 'Delete',
|
||||
accept: () => {
|
||||
this.$toast.add({ severity: 'info', summary: 'Confirmed', detail: 'Record deleted', life: 3000 });
|
||||
},
|
||||
|
@ -69,8 +76,8 @@ export default {
|
|||
<Toast />
|
||||
<ConfirmPopup></ConfirmPopup>
|
||||
<div class="card flex flex-wrap gap-2 justify-content-center">
|
||||
<Button @click="confirm1($event)" icon="pi pi-check" label="Confirm"></Button>
|
||||
<Button @click="confirm2($event)" icon="pi pi-times" label="Delete" severity="danger"></Button>
|
||||
<Button @click="confirm1($event)" label="Save" outlined></Button>
|
||||
<Button @click="confirm2($event)" label="Delete" severity="danger" outlined></Button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -86,6 +93,10 @@ const confirm1 = (event) => {
|
|||
target: event.currentTarget,
|
||||
message: 'Are you sure you want to proceed?',
|
||||
icon: 'pi pi-exclamation-triangle',
|
||||
rejectClass: 'p-button-secondary p-button-outlined p-button-sm',
|
||||
acceptClass: 'p-button-sm',
|
||||
rejectLabel: 'Cancel',
|
||||
acceptLabel: 'Save',
|
||||
accept: () => {
|
||||
toast.add({ severity: 'info', summary: 'Confirmed', detail: 'You have accepted', life: 3000 });
|
||||
},
|
||||
|
@ -100,7 +111,10 @@ const confirm2 = (event) => {
|
|||
target: event.currentTarget,
|
||||
message: 'Do you want to delete this record?',
|
||||
icon: 'pi pi-info-circle',
|
||||
rejectClass: 'p-button-secondary p-button-outlined p-button-sm',
|
||||
acceptClass: 'p-button-danger p-button-sm',
|
||||
rejectLabel: 'Cancel',
|
||||
acceptLabel: 'Delete',
|
||||
accept: () => {
|
||||
toast.add({ severity: 'info', summary: 'Confirmed', detail: 'Record deleted', life: 3000 });
|
||||
},
|
||||
|
@ -120,6 +134,10 @@ const confirm2 = (event) => {
|
|||
target: event.currentTarget,
|
||||
message: 'Are you sure you want to proceed?',
|
||||
icon: 'pi pi-exclamation-triangle',
|
||||
rejectClass: 'p-button-secondary p-button-outlined p-button-sm',
|
||||
acceptClass: 'p-button-sm',
|
||||
rejectLabel: 'Cancel',
|
||||
acceptLabel: 'Save',
|
||||
accept: () => {
|
||||
this.$toast.add({ severity: 'info', summary: 'Confirmed', detail: 'You have accepted', life: 3000 });
|
||||
},
|
||||
|
@ -133,7 +151,10 @@ const confirm2 = (event) => {
|
|||
target: event.currentTarget,
|
||||
message: 'Do you want to delete this record?',
|
||||
icon: 'pi pi-info-circle',
|
||||
rejectClass: 'p-button-secondary p-button-outlined p-button-sm',
|
||||
acceptClass: 'p-button-danger p-button-sm',
|
||||
rejectLabel: 'Cancel',
|
||||
acceptLabel: 'Delete',
|
||||
accept: () => {
|
||||
this.$toast.add({ severity: 'info', summary: 'Confirmed', detail: 'Record deleted', life: 3000 });
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue