mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-10 09:22:34 +00:00
Convert to PrimeVue monorepo
This commit is contained in:
parent
970ba75b06
commit
61929eae75
4144 changed files with 59008 additions and 36177 deletions
|
@ -1,147 +0,0 @@
|
|||
<template>
|
||||
<DocSectionText v-bind="$attrs">
|
||||
<p>The <i>command</i> property defines the callback to run when an item is activated by click or a key event.</p>
|
||||
</DocSectionText>
|
||||
<div class="card">
|
||||
<TabMenu :model="items" />
|
||||
</div>
|
||||
<DocSectionCode :code="code" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
items: [
|
||||
{
|
||||
label: 'Dashboard',
|
||||
icon: 'pi pi-home',
|
||||
command: () => {
|
||||
this.$toast.add({ severity: 'success', summary: 'Selected', detail: 'Dashboard', life: 3000 });
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Transactions',
|
||||
icon: 'pi pi-chart-line',
|
||||
command: () => {
|
||||
this.$toast.add({ severity: 'success', summary: 'Selected', detail: 'Transactions', life: 3000 });
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Products',
|
||||
icon: 'pi pi-list',
|
||||
command: () => {
|
||||
this.$toast.add({ severity: 'success', summary: 'Selected', detail: 'Products', life: 3000 });
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Messages',
|
||||
icon: 'pi pi-inbox',
|
||||
command: () => {
|
||||
this.$toast.add({ severity: 'success', summary: 'Selected', detail: 'Messages', life: 3000 });
|
||||
}
|
||||
}
|
||||
],
|
||||
code: {
|
||||
basic: `
|
||||
<TabMenu :model="items" />
|
||||
<Toast />
|
||||
`,
|
||||
options: `
|
||||
<template>
|
||||
<div class="card">
|
||||
<TabMenu :model="items" />
|
||||
<Toast />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
items: [
|
||||
{
|
||||
label: 'Dashboard',
|
||||
icon: 'pi pi-home',
|
||||
command: () => {
|
||||
this.$toast.add({ severity: 'success', summary: 'Selected', detail: 'Dashboard', life: 3000 });
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Transactions',
|
||||
icon: 'pi pi-chart-line',
|
||||
command: () => {
|
||||
this.$toast.add({ severity: 'success', summary: 'Selected', detail: 'Transactions', life: 3000 });
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Products',
|
||||
icon: 'pi pi-list',
|
||||
command: () => {
|
||||
this.$toast.add({ severity: 'success', summary: 'Selected', detail: 'Products', life: 3000 });
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Messages',
|
||||
icon: 'pi pi-inbox',
|
||||
command: () => {
|
||||
this.$toast.add({ severity: 'success', summary: 'Selected', detail: 'Messages', life: 3000 });
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
<\/script>
|
||||
`,
|
||||
composition: `
|
||||
<template>
|
||||
<div class="card">
|
||||
<TabMenu :model="items" />
|
||||
<Toast />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from "vue";
|
||||
import { useToast } from "primevue/usetoast";
|
||||
|
||||
const toast = useToast();
|
||||
|
||||
const items = ref([
|
||||
{
|
||||
label: 'Dashboard',
|
||||
icon: 'pi pi-home',
|
||||
command: () => {
|
||||
toast.add({ severity: 'success', summary: 'Selected', detail: 'Dashboard', life: 3000 });
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Transactions',
|
||||
icon: 'pi pi-chart-line',
|
||||
command: () => {
|
||||
toast.add({ severity: 'success', summary: 'Selected', detail: 'Transactions', life: 3000 });
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Products',
|
||||
icon: 'pi pi-list',
|
||||
command: () => {
|
||||
toast.add({ severity: 'success', summary: 'Selected', detail: 'Products', life: 3000 });
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Messages',
|
||||
icon: 'pi pi-inbox',
|
||||
command: () => {
|
||||
toast.add({ severity: 'success', summary: 'Selected', detail: 'Messages', life: 3000 });
|
||||
}
|
||||
}
|
||||
]);
|
||||
<\/script>
|
||||
`
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue