mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-11 01:42:34 +00:00
Update avatar and dialog demos
This commit is contained in:
parent
7d14c7ef30
commit
0cb9eb29b1
9 changed files with 249 additions and 169 deletions
|
@ -4,29 +4,34 @@
|
|||
</DocSectionText>
|
||||
<div class="card">
|
||||
<div class="flex flex-wrap justify-content-center gap-2 mb-2">
|
||||
<Button label="Left" icon="pi pi-arrow-right" @click="openPosition('left')" severity="help" style="min-width: 10rem" />
|
||||
<Button label="Right" icon="pi pi-arrow-left" @click="openPosition('right')" severity="help" style="min-width: 10rem" />
|
||||
<Button label="Left" icon="pi pi-arrow-right" @click="openPosition('left')" severity="secondary" style="min-width: 10rem" />
|
||||
<Button label="Right" icon="pi pi-arrow-left" @click="openPosition('right')" severity="secondary" style="min-width: 10rem" />
|
||||
</div>
|
||||
<div class="flex flex-wrap justify-content-center gap-2 mb-2">
|
||||
<Button label="TopLeft" icon="pi pi-arrow-down-right" @click="openPosition('topleft')" severity="warning" style="min-width: 10rem" />
|
||||
<Button label="Top" icon="pi pi-arrow-down" @click="openPosition('top')" severity="warning" style="min-width: 10rem" />
|
||||
<Button label="TopRight" icon="pi pi-arrow-down-left" @click="openPosition('topright')" severity="warning" style="min-width: 10rem" />
|
||||
<Button label="TopLeft" icon="pi pi-arrow-down-right" @click="openPosition('topleft')" severity="secondary" style="min-width: 10rem" />
|
||||
<Button label="Top" icon="pi pi-arrow-down" @click="openPosition('top')" severity="secondary" style="min-width: 10rem" />
|
||||
<Button label="TopRight" icon="pi pi-arrow-down-left" @click="openPosition('topright')" severity="secondary" style="min-width: 10rem" />
|
||||
</div>
|
||||
<div class="flex flex-wrap justify-content-center gap-2">
|
||||
<Button label="BottomLeft" icon="pi pi-arrow-up-right" @click="openPosition('bottomleft')" severity="success" style="min-width: 10rem" />
|
||||
<Button label="Bottom" icon="pi pi-arrow-up" @click="openPosition('bottom')" severity="success" style="min-width: 10rem" />
|
||||
<Button label="BottomRight" icon="pi pi-arrow-up-left" @click="openPosition('bottomright')" severity="success" style="min-width: 10rem" />
|
||||
<Button label="BottomLeft" icon="pi pi-arrow-up-right" @click="openPosition('bottomleft')" severity="secondary" style="min-width: 10rem" />
|
||||
<Button label="Bottom" icon="pi pi-arrow-up" @click="openPosition('bottom')" severity="secondary" style="min-width: 10rem" />
|
||||
<Button label="BottomRight" icon="pi pi-arrow-up-left" @click="openPosition('bottomright')" severity="secondary" style="min-width: 10rem" />
|
||||
</div>
|
||||
|
||||
<Dialog v-model:visible="visible" header="Header" :style="{ width: '50rem' }" :breakpoints="{ '1199px': '75vw', '575px': '90vw' }" :position="position" :modal="true" :draggable="false">
|
||||
<p class="m-0">
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
|
||||
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
||||
</p>
|
||||
<template #footer>
|
||||
<Button label="No" icon="pi pi-times" @click="visible = false" text />
|
||||
<Button label="Yes" icon="pi pi-check" @click="visible = false" autofocus />
|
||||
</template>
|
||||
<Dialog v-model:visible="visible" header="Edit Profile" :style="{ width: '25rem' }" :position="position" :modal="true" :draggable="false">
|
||||
<span class="p-text-secondary block mb-5">Update your information.</span>
|
||||
<div class="flex align-items-center gap-3 mb-3">
|
||||
<label for="username" class="font-semibold w-6rem">Username</label>
|
||||
<InputText id="username" class="flex-auto" autocomplete="off" />
|
||||
</div>
|
||||
<div class="flex align-items-center gap-3 mb-5">
|
||||
<label for="email" class="font-semibold w-6rem">Email</label>
|
||||
<InputText id="Email" class="flex-auto" autocomplete="off" />
|
||||
</div>
|
||||
<div class="flex justify-content-end gap-2">
|
||||
<Button type="button" label="Cancel" severity="secondary" @click="visible = false"></Button>
|
||||
<Button type="button" label="Save" @click="visible = false"></Button>
|
||||
</div>
|
||||
</Dialog>
|
||||
</div>
|
||||
<DocSectionCode :code="code" />
|
||||
|
@ -41,58 +46,68 @@ export default {
|
|||
code: {
|
||||
basic: `
|
||||
<div class="flex flex-wrap justify-content-center gap-2 mb-2">
|
||||
<Button label="Left" icon="pi pi-arrow-right" @click="openPosition('left')" severity="help" style="min-width: 10rem" />
|
||||
<Button label="Right" icon="pi pi-arrow-left" @click="openPosition('right')" severity="help" style="min-width: 10rem" />
|
||||
<Button label="Left" icon="pi pi-arrow-right" @click="openPosition('left')" severity="secondary" style="min-width: 10rem" />
|
||||
<Button label="Right" icon="pi pi-arrow-left" @click="openPosition('right')" severity="secondary" style="min-width: 10rem" />
|
||||
</div>
|
||||
<div class="flex flex-wrap justify-content-center gap-2 mb-2">
|
||||
<Button label="TopLeft" icon="pi pi-arrow-down-right" @click="openPosition('topleft')" severity="warning" style="min-width: 10rem" />
|
||||
<Button label="Top" icon="pi pi-arrow-down" @click="openPosition('top')" severity="warning" style="min-width: 10rem" />
|
||||
<Button label="TopRight" icon="pi pi-arrow-down-left" @click="openPosition('topright')" severity="warning" style="min-width: 10rem" />
|
||||
<Button label="TopLeft" icon="pi pi-arrow-down-right" @click="openPosition('topleft')" severity="secondary" style="min-width: 10rem" />
|
||||
<Button label="Top" icon="pi pi-arrow-down" @click="openPosition('top')" severity="secondary" style="min-width: 10rem" />
|
||||
<Button label="TopRight" icon="pi pi-arrow-down-left" @click="openPosition('topright')" severity="secondary" style="min-width: 10rem" />
|
||||
</div>
|
||||
<div class="flex flex-wrap justify-content-center gap-2">
|
||||
<Button label="BottomLeft" icon="pi pi-arrow-up-right" @click="openPosition('bottomleft')" severity="success" style="min-width: 10rem" />
|
||||
<Button label="Bottom" icon="pi pi-arrow-up" @click="openPosition('bottom')" severity="success" style="min-width: 10rem" />
|
||||
<Button label="BottomRight" icon="pi pi-arrow-up-left" @click="openPosition('bottomright')" severity="success" style="min-width: 10rem" />
|
||||
<Button label="BottomLeft" icon="pi pi-arrow-up-right" @click="openPosition('bottomleft')" severity="secondary" style="min-width: 10rem" />
|
||||
<Button label="Bottom" icon="pi pi-arrow-up" @click="openPosition('bottom')" severity="secondary" style="min-width: 10rem" />
|
||||
<Button label="BottomRight" icon="pi pi-arrow-up-left" @click="openPosition('bottomright')" severity="secondary" style="min-width: 10rem" />
|
||||
</div>
|
||||
|
||||
<Dialog v-model:visible="visible" header="Header" :style="{ width: '50rem' }" :breakpoints="{ '1199px': '75vw', '575px': '90vw' }" :position="position" :modal="true" :draggable="false">
|
||||
<p class="m-0">
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
|
||||
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
||||
</p>
|
||||
<template #footer>
|
||||
<Button label="No" icon="pi pi-times" @click="visible = false" text />
|
||||
<Button label="Yes" icon="pi pi-check" @click="visible = false" autofocus />
|
||||
</template>
|
||||
<Dialog v-model:visible="visible" header="Edit Profile" :style="{ width: '25rem' }" :position="position" :modal="true" :draggable="false">
|
||||
<span class="p-text-secondary block mb-5">Update your information.</span>
|
||||
<div class="flex align-items-center gap-3 mb-3">
|
||||
<label for="username" class="font-semibold w-6rem">Username</label>
|
||||
<InputText id="username" class="flex-auto" autocomplete="off" />
|
||||
</div>
|
||||
<div class="flex align-items-center gap-3 mb-5">
|
||||
<label for="email" class="font-semibold w-6rem">Email</label>
|
||||
<InputText id="Email" class="flex-auto" autocomplete="off" />
|
||||
</div>
|
||||
<div class="flex justify-content-end gap-2">
|
||||
<Button type="button" label="Cancel" severity="secondary" @click="visible = false"></Button>
|
||||
<Button type="button" label="Save" @click="visible = false"></Button>
|
||||
</div>
|
||||
</Dialog>
|
||||
`,
|
||||
options: `
|
||||
<template>
|
||||
<div class="card">
|
||||
<div class="flex flex-wrap justify-content-center gap-2 mb-2">
|
||||
<Button label="Left" icon="pi pi-arrow-right" @click="openPosition('left')" severity="help" style="min-width: 10rem" />
|
||||
<Button label="Right" icon="pi pi-arrow-left" @click="openPosition('right')" severity="help" style="min-width: 10rem" />
|
||||
<Button label="Left" icon="pi pi-arrow-right" @click="openPosition('left')" severity="secondary" style="min-width: 10rem" />
|
||||
<Button label="Right" icon="pi pi-arrow-left" @click="openPosition('right')" severity="secondary" style="min-width: 10rem" />
|
||||
</div>
|
||||
<div class="flex flex-wrap justify-content-center gap-2 mb-2">
|
||||
<Button label="TopLeft" icon="pi pi-arrow-down-right" @click="openPosition('topleft')" severity="warning" style="min-width: 10rem" />
|
||||
<Button label="Top" icon="pi pi-arrow-down" @click="openPosition('top')" severity="warning" style="min-width: 10rem" />
|
||||
<Button label="TopRight" icon="pi pi-arrow-down-left" @click="openPosition('topright')" severity="warning" style="min-width: 10rem" />
|
||||
<Button label="TopLeft" icon="pi pi-arrow-down-right" @click="openPosition('topleft')" severity="secondary" style="min-width: 10rem" />
|
||||
<Button label="Top" icon="pi pi-arrow-down" @click="openPosition('top')" severity="secondary" style="min-width: 10rem" />
|
||||
<Button label="TopRight" icon="pi pi-arrow-down-left" @click="openPosition('topright')" severity="secondary" style="min-width: 10rem" />
|
||||
</div>
|
||||
<div class="flex flex-wrap justify-content-center gap-2">
|
||||
<Button label="BottomLeft" icon="pi pi-arrow-up-right" @click="openPosition('bottomleft')" severity="success" style="min-width: 10rem" />
|
||||
<Button label="Bottom" icon="pi pi-arrow-up" @click="openPosition('bottom')" severity="success" style="min-width: 10rem" />
|
||||
<Button label="BottomRight" icon="pi pi-arrow-up-left" @click="openPosition('bottomright')" severity="success" style="min-width: 10rem" />
|
||||
<Button label="BottomLeft" icon="pi pi-arrow-up-right" @click="openPosition('bottomleft')" severity="secondary" style="min-width: 10rem" />
|
||||
<Button label="Bottom" icon="pi pi-arrow-up" @click="openPosition('bottom')" severity="secondary" style="min-width: 10rem" />
|
||||
<Button label="BottomRight" icon="pi pi-arrow-up-left" @click="openPosition('bottomright')" severity="secondary" style="min-width: 10rem" />
|
||||
</div>
|
||||
|
||||
<Dialog v-model:visible="visible" header="Header" :style="{ width: '50rem' }" :breakpoints="{ '1199px': '75vw', '575px': '90vw' }" :position="position" :modal="true" :draggable="false">
|
||||
<p class="m-0">
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
|
||||
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
||||
</p>
|
||||
<template #footer>
|
||||
<Button label="No" icon="pi pi-times" @click="visible = false" text />
|
||||
<Button label="Yes" icon="pi pi-check" @click="visible = false" autofocus />
|
||||
</template>
|
||||
<Dialog v-model:visible="visible" header="Edit Profile" :style="{ width: '25rem' }" :position="position" :modal="true" :draggable="false">
|
||||
<span class="p-text-secondary block mb-5">Update your information.</span>
|
||||
<div class="flex align-items-center gap-3 mb-3">
|
||||
<label for="username" class="font-semibold w-6rem">Username</label>
|
||||
<InputText id="username" class="flex-auto" autocomplete="off" />
|
||||
</div>
|
||||
<div class="flex align-items-center gap-3 mb-5">
|
||||
<label for="email" class="font-semibold w-6rem">Email</label>
|
||||
<InputText id="Email" class="flex-auto" autocomplete="off" />
|
||||
</div>
|
||||
<div class="flex justify-content-end gap-2">
|
||||
<Button type="button" label="Cancel" severity="secondary" @click="visible = false"></Button>
|
||||
<Button type="button" label="Save" @click="visible = false"></Button>
|
||||
</div>
|
||||
</Dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -118,29 +133,34 @@ export default {
|
|||
<template>
|
||||
<div class="card">
|
||||
<div class="flex flex-wrap justify-content-center gap-2 mb-2">
|
||||
<Button label="Left" icon="pi pi-arrow-right" @click="openPosition('left')" severity="help" style="min-width: 10rem" />
|
||||
<Button label="Right" icon="pi pi-arrow-left" @click="openPosition('right')" severity="help" style="min-width: 10rem" />
|
||||
<Button label="Left" icon="pi pi-arrow-right" @click="openPosition('left')" severity="secondary" style="min-width: 10rem" />
|
||||
<Button label="Right" icon="pi pi-arrow-left" @click="openPosition('right')" severity="secondary" style="min-width: 10rem" />
|
||||
</div>
|
||||
<div class="flex flex-wrap justify-content-center gap-2 mb-2">
|
||||
<Button label="TopLeft" icon="pi pi-arrow-down-right" @click="openPosition('topleft')" severity="warning" style="min-width: 10rem" />
|
||||
<Button label="Top" icon="pi pi-arrow-down" @click="openPosition('top')" severity="warning" style="min-width: 10rem" />
|
||||
<Button label="TopRight" icon="pi pi-arrow-down-left" @click="openPosition('topright')" severity="warning" style="min-width: 10rem" />
|
||||
<Button label="TopLeft" icon="pi pi-arrow-down-right" @click="openPosition('topleft')" severity="secondary" style="min-width: 10rem" />
|
||||
<Button label="Top" icon="pi pi-arrow-down" @click="openPosition('top')" severity="secondary" style="min-width: 10rem" />
|
||||
<Button label="TopRight" icon="pi pi-arrow-down-left" @click="openPosition('topright')" severity="secondary" style="min-width: 10rem" />
|
||||
</div>
|
||||
<div class="flex flex-wrap justify-content-center gap-2">
|
||||
<Button label="BottomLeft" icon="pi pi-arrow-up-right" @click="openPosition('bottomleft')" severity="success" style="min-width: 10rem" />
|
||||
<Button label="Bottom" icon="pi pi-arrow-up" @click="openPosition('bottom')" severity="success" style="min-width: 10rem" />
|
||||
<Button label="BottomRight" icon="pi pi-arrow-up-left" @click="openPosition('bottomright')" severity="success" style="min-width: 10rem" />
|
||||
<Button label="BottomLeft" icon="pi pi-arrow-up-right" @click="openPosition('bottomleft')" severity="secondary" style="min-width: 10rem" />
|
||||
<Button label="Bottom" icon="pi pi-arrow-up" @click="openPosition('bottom')" severity="secondary" style="min-width: 10rem" />
|
||||
<Button label="BottomRight" icon="pi pi-arrow-up-left" @click="openPosition('bottomright')" severity="secondary" style="min-width: 10rem" />
|
||||
</div>
|
||||
|
||||
<Dialog v-model:visible="visible" header="Header" :style="{ width: '50rem' }" :breakpoints="{ '1199px': '75vw', '575px': '90vw' }" :position="position" :modal="true" :draggable="false">
|
||||
<p class="m-0">
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
|
||||
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
||||
</p>
|
||||
<template #footer>
|
||||
<Button label="No" icon="pi pi-times" @click="visible = false" text />
|
||||
<Button label="Yes" icon="pi pi-check" @click="visible = false" autofocus />
|
||||
</template>
|
||||
<Dialog v-model:visible="visible" header="Edit Profile" :style="{ width: '25rem' }" :position="position" :modal="true" :draggable="false">
|
||||
<span class="p-text-secondary block mb-5">Update your information.</span>
|
||||
<div class="flex align-items-center gap-3 mb-3">
|
||||
<label for="username" class="font-semibold w-6rem">Username</label>
|
||||
<InputText id="username" class="flex-auto" autocomplete="off" />
|
||||
</div>
|
||||
<div class="flex align-items-center gap-3 mb-5">
|
||||
<label for="email" class="font-semibold w-6rem">Email</label>
|
||||
<InputText id="Email" class="flex-auto" autocomplete="off" />
|
||||
</div>
|
||||
<div class="flex justify-content-end gap-2">
|
||||
<Button type="button" label="Cancel" severity="secondary" @click="visible = false"></Button>
|
||||
<Button type="button" label="Save" @click="visible = false"></Button>
|
||||
</div>
|
||||
</Dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue