2023-02-28 08:29:30 +00:00
|
|
|
<template>
|
|
|
|
<DocSectionText v-bind="$attrs">
|
2023-10-23 12:20:11 +00:00
|
|
|
<p>Header, icons and footer sections of the panel are customizable via templating.</p>
|
2023-02-28 08:29:30 +00:00
|
|
|
</DocSectionText>
|
|
|
|
<div class="card">
|
2023-10-23 12:18:43 +00:00
|
|
|
<Panel toggleable>
|
|
|
|
<template #header>
|
2024-05-20 12:14:38 +00:00
|
|
|
<div class="flex items-center gap-2">
|
2024-09-26 08:20:46 +00:00
|
|
|
<Avatar image="https://primefaces.org/cdn/primevue/images/avatar/amyelsner.png" shape="circle" />
|
2023-10-23 12:18:43 +00:00
|
|
|
<span class="font-bold">Amy Elsner</span>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<template #footer>
|
2024-05-20 12:14:38 +00:00
|
|
|
<div class="flex flex-wrap items-center justify-between gap-4">
|
|
|
|
<div class="flex items-center gap-2">
|
2023-10-23 12:18:43 +00:00
|
|
|
<Button icon="pi pi-user" rounded text></Button>
|
|
|
|
<Button icon="pi pi-bookmark" severity="secondary" rounded text></Button>
|
|
|
|
</div>
|
2024-05-20 12:14:38 +00:00
|
|
|
<span class="text-surface-500 dark:text-surface-400">Updated 2 hours ago</span>
|
2023-10-23 12:18:43 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
2023-02-28 08:29:30 +00:00
|
|
|
<template #icons>
|
2024-04-15 08:08:42 +00:00
|
|
|
<Button icon="pi pi-cog" severity="secondary" rounded text @click="toggle" />
|
2023-02-28 08:29:30 +00:00
|
|
|
<Menu ref="menu" id="config_menu" :model="items" popup />
|
|
|
|
</template>
|
2023-03-02 13:38:18 +00:00
|
|
|
<p class="m-0">
|
2023-02-28 08:29:30 +00:00
|
|
|
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>
|
|
|
|
</Panel>
|
|
|
|
</div>
|
|
|
|
<DocSectionCode :code="code" />
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
items: [
|
|
|
|
{
|
2023-10-23 12:18:43 +00:00
|
|
|
label: 'Refresh',
|
|
|
|
icon: 'pi pi-refresh'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Search',
|
|
|
|
icon: 'pi pi-search'
|
2023-02-28 08:29:30 +00:00
|
|
|
},
|
|
|
|
{
|
2023-10-23 12:18:43 +00:00
|
|
|
separator: true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Delete',
|
|
|
|
icon: 'pi pi-times'
|
2023-02-28 08:29:30 +00:00
|
|
|
}
|
|
|
|
],
|
|
|
|
code: {
|
2023-09-22 12:54:14 +00:00
|
|
|
basic: `
|
2023-10-23 12:18:43 +00:00
|
|
|
<Panel toggleable>
|
|
|
|
<template #header>
|
2024-05-20 12:14:38 +00:00
|
|
|
<div class="flex items-center gap-2">
|
2024-09-26 08:20:46 +00:00
|
|
|
<Avatar image="https://primefaces.org/cdn/primevue/images/avatar/amyelsner.png" shape="circle" />
|
2023-10-23 12:18:43 +00:00
|
|
|
<span class="font-bold">Amy Elsner</span>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<template #footer>
|
2024-05-20 12:14:38 +00:00
|
|
|
<div class="flex flex-wrap items-center justify-between gap-4">
|
|
|
|
<div class="flex items-center gap-2">
|
2023-10-23 12:18:43 +00:00
|
|
|
<Button icon="pi pi-user" rounded text></Button>
|
|
|
|
<Button icon="pi pi-bookmark" severity="secondary" rounded text></Button>
|
|
|
|
</div>
|
2024-05-20 12:14:38 +00:00
|
|
|
<span class="text-surface-500 dark:text-surface-400">Updated 2 hours ago</span>
|
2023-10-23 12:18:43 +00:00
|
|
|
</div>
|
2023-02-28 08:29:30 +00:00
|
|
|
</template>
|
2023-11-01 22:45:53 +00:00
|
|
|
<template #icons>
|
2024-04-15 08:08:42 +00:00
|
|
|
<Button icon="pi pi-cog" severity="secondary" rounded text @click="toggle" />
|
2023-11-01 22:45:53 +00:00
|
|
|
<Menu ref="menu" id="config_menu" :model="items" popup />
|
|
|
|
</template>
|
2023-03-02 13:38:18 +00:00
|
|
|
<p class="m-0">
|
2023-02-28 08:29:30 +00:00
|
|
|
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>
|
2023-10-15 09:38:39 +00:00
|
|
|
</Panel>
|
|
|
|
`,
|
2023-09-22 12:54:14 +00:00
|
|
|
options: `
|
|
|
|
<template>
|
2023-02-28 08:29:30 +00:00
|
|
|
<div class="card">
|
|
|
|
<Toast />
|
2023-10-23 12:18:43 +00:00
|
|
|
<Panel toggleable>
|
|
|
|
<template #header>
|
2024-05-20 12:14:38 +00:00
|
|
|
<div class="flex items-center gap-2">
|
2024-09-26 08:20:46 +00:00
|
|
|
<Avatar image="https://primefaces.org/cdn/primevue/images/avatar/amyelsner.png" shape="circle" />
|
2023-10-23 12:18:43 +00:00
|
|
|
<span class="font-bold">Amy Elsner</span>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<template #footer>
|
2024-05-20 12:14:38 +00:00
|
|
|
<div class="flex flex-wrap items-center justify-between gap-4">
|
|
|
|
<div class="flex items-center gap-2">
|
2023-10-23 12:18:43 +00:00
|
|
|
<Button icon="pi pi-user" rounded text></Button>
|
|
|
|
<Button icon="pi pi-bookmark" severity="secondary" rounded text></Button>
|
|
|
|
</div>
|
2024-05-20 12:14:38 +00:00
|
|
|
<span class="text-surface-500 dark:text-surface-400">Updated 2 hours ago</span>
|
2023-10-23 12:18:43 +00:00
|
|
|
</div>
|
2023-02-28 08:29:30 +00:00
|
|
|
</template>
|
2023-11-01 22:45:53 +00:00
|
|
|
<template #icons>
|
2024-04-15 08:08:42 +00:00
|
|
|
<Button icon="pi pi-cog" severity="secondary" rounded text @click="toggle" />
|
2023-11-01 22:45:53 +00:00
|
|
|
<Menu ref="menu" id="config_menu" :model="items" popup />
|
|
|
|
</template>
|
2023-03-02 13:38:18 +00:00
|
|
|
<p class="m-0">
|
2023-02-28 08:29:30 +00:00
|
|
|
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>
|
|
|
|
</Panel>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
items: [
|
|
|
|
{
|
2023-10-23 12:18:43 +00:00
|
|
|
label: 'Refresh',
|
|
|
|
icon: 'pi pi-refresh'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Search',
|
|
|
|
icon: 'pi pi-search'
|
2023-02-28 08:29:30 +00:00
|
|
|
},
|
|
|
|
{
|
2023-10-23 12:18:43 +00:00
|
|
|
separator: true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Delete',
|
|
|
|
icon: 'pi pi-times'
|
2023-02-28 08:29:30 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
toggle(event) {
|
|
|
|
this.$refs.menu.toggle(event);
|
|
|
|
},
|
|
|
|
save() {
|
|
|
|
this.$toast.add({ severity: 'success', summary: 'Success', detail: 'Data Saved', life: 3000 });
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-10-15 09:38:39 +00:00
|
|
|
<\/script>
|
|
|
|
`,
|
2023-09-22 12:54:14 +00:00
|
|
|
composition: `
|
|
|
|
<template>
|
2023-02-28 08:29:30 +00:00
|
|
|
<div class="card">
|
|
|
|
<Toast />
|
2023-10-23 12:18:43 +00:00
|
|
|
<Panel toggleable>
|
|
|
|
<template #header>
|
2024-05-20 12:14:38 +00:00
|
|
|
<div class="flex items-center gap-2">
|
2024-09-26 08:20:46 +00:00
|
|
|
<Avatar image="https://primefaces.org/cdn/primevue/images/avatar/amyelsner.png" shape="circle" />
|
2023-10-23 12:18:43 +00:00
|
|
|
<span class="font-bold">Amy Elsner</span>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<template #footer>
|
2024-05-20 12:14:38 +00:00
|
|
|
<div class="flex flex-wrap items-center justify-between gap-4">
|
|
|
|
<div class="flex items-center gap-2">
|
2023-10-23 12:18:43 +00:00
|
|
|
<Button icon="pi pi-user" rounded text></Button>
|
|
|
|
<Button icon="pi pi-bookmark" severity="secondary" rounded text></Button>
|
|
|
|
</div>
|
2024-05-20 12:14:38 +00:00
|
|
|
<span class="text-surface-500 dark:text-surface-400">Updated 2 hours ago</span>
|
2023-10-23 12:18:43 +00:00
|
|
|
</div>
|
2023-02-28 08:29:30 +00:00
|
|
|
</template>
|
2023-11-01 22:45:53 +00:00
|
|
|
<template #icons>
|
2024-04-15 08:08:42 +00:00
|
|
|
<Button icon="pi pi-cog" severity="secondary" rounded text @click="toggle" />
|
2023-11-01 22:45:53 +00:00
|
|
|
<Menu ref="menu" id="config_menu" :model="items" popup />
|
|
|
|
</template>
|
2023-03-02 13:38:18 +00:00
|
|
|
<p class="m-0">
|
2023-02-28 08:29:30 +00:00
|
|
|
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>
|
|
|
|
</Panel>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
import { ref } from 'vue';
|
|
|
|
import { useToast } from "primevue/usetoast";
|
|
|
|
import { useRouter } from 'vue-router';
|
|
|
|
import Menu from 'primevue/menu';
|
|
|
|
|
|
|
|
const menu = ref(null);
|
|
|
|
const toast = useToast();
|
|
|
|
const router = useRouter();
|
|
|
|
|
|
|
|
const items = ref([
|
|
|
|
{
|
2023-10-23 12:18:43 +00:00
|
|
|
label: 'Refresh',
|
|
|
|
icon: 'pi pi-refresh'
|
2023-02-28 08:29:30 +00:00
|
|
|
},
|
|
|
|
{
|
2023-10-23 12:18:43 +00:00
|
|
|
label: 'Search',
|
|
|
|
icon: 'pi pi-search'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
separator: true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Delete',
|
|
|
|
icon: 'pi pi-times'
|
2023-02-28 08:29:30 +00:00
|
|
|
}
|
|
|
|
]);
|
|
|
|
|
|
|
|
const toggle = (event) => {
|
|
|
|
menu.value.toggle(event);
|
|
|
|
};
|
|
|
|
|
|
|
|
const save = () => {
|
|
|
|
toast.add({ severity: 'success', summary: 'Success', detail: 'Data Saved', life: 3000 });
|
|
|
|
};
|
2023-10-15 09:38:39 +00:00
|
|
|
<\/script>
|
|
|
|
`
|
2023-02-28 08:29:30 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
toggle(event) {
|
|
|
|
this.$refs.menu.toggle(event);
|
|
|
|
},
|
|
|
|
save() {
|
|
|
|
this.$toast.add({ severity: 'success', summary: 'Success', detail: 'Data Saved', life: 3000 });
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|