2023-04-28 07:24:00 +00:00
|
|
|
<template>
|
|
|
|
<DocSectionText v-bind="$attrs"></DocSectionText>
|
|
|
|
<div class="card">
|
|
|
|
<TabMenu
|
|
|
|
:model="items"
|
|
|
|
:pt="{
|
2023-05-02 11:27:56 +00:00
|
|
|
action: ({ props, state, context }) => ({
|
|
|
|
class: context.order === state.d_activeIndex ? 'bg-primary' : undefined
|
2023-04-28 07:24:00 +00:00
|
|
|
})
|
|
|
|
}"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
<DocSectionCode :code="code" />
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
items: [
|
|
|
|
{
|
|
|
|
label: 'Home',
|
|
|
|
icon: 'pi pi-fw pi-home'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Calendar',
|
|
|
|
icon: 'pi pi-fw pi-calendar'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Edit',
|
|
|
|
icon: 'pi pi-fw pi-pencil'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Documentation',
|
|
|
|
icon: 'pi pi-fw pi-file'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Settings',
|
|
|
|
icon: 'pi pi-fw pi-cog'
|
|
|
|
}
|
|
|
|
],
|
|
|
|
code: {
|
2023-09-22 12:54:14 +00:00
|
|
|
basic: `
|
|
|
|
<TabMenu
|
2023-04-28 07:24:00 +00:00
|
|
|
:model="items"
|
|
|
|
:pt="{
|
2023-05-02 11:27:56 +00:00
|
|
|
action: ({ props, state, context }) => ({
|
|
|
|
class: context.order === state.d_activeIndex ? 'bg-primary' : undefined
|
2023-04-28 07:24:00 +00:00
|
|
|
})
|
|
|
|
}"
|
|
|
|
/>`,
|
2023-09-22 12:54:14 +00:00
|
|
|
options: `
|
|
|
|
<template>
|
2023-04-28 07:24:00 +00:00
|
|
|
<div class="card">
|
|
|
|
<TabMenu
|
|
|
|
:model="items"
|
|
|
|
:pt="{
|
2023-05-02 11:27:56 +00:00
|
|
|
action: ({ props, state, context }) => ({
|
|
|
|
class: context.order === state.d_activeIndex ? 'bg-primary' : undefined
|
2023-04-28 07:24:00 +00:00
|
|
|
})
|
|
|
|
}"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
items: [
|
|
|
|
{
|
|
|
|
label: 'Home',
|
|
|
|
icon: 'pi pi-fw pi-home'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Calendar',
|
|
|
|
icon: 'pi pi-fw pi-calendar'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Edit',
|
|
|
|
icon: 'pi pi-fw pi-pencil'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Documentation',
|
|
|
|
icon: 'pi pi-fw pi-file'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Settings',
|
|
|
|
icon: 'pi pi-fw pi-cog'
|
|
|
|
}
|
|
|
|
]
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
|
|
|
<\/script>`,
|
2023-09-22 12:54:14 +00:00
|
|
|
composition: `
|
|
|
|
<template>
|
2023-04-28 07:24:00 +00:00
|
|
|
<div class="card">
|
|
|
|
<TabMenu
|
|
|
|
:model="items"
|
|
|
|
:pt="{
|
2023-05-02 11:27:56 +00:00
|
|
|
action: ({ props, state, context }) => ({
|
|
|
|
class: context.order === state.d_activeIndex ? 'bg-primary' : undefined
|
2023-04-28 07:24:00 +00:00
|
|
|
})
|
|
|
|
}"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
import { ref } from "vue";
|
|
|
|
|
|
|
|
const items = ref([
|
|
|
|
{
|
|
|
|
label: 'Home',
|
|
|
|
icon: 'pi pi-fw pi-home'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Calendar',
|
|
|
|
icon: 'pi pi-fw pi-calendar'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Edit',
|
|
|
|
icon: 'pi pi-fw pi-pencil'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Documentation',
|
|
|
|
icon: 'pi pi-fw pi-file'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Settings',
|
|
|
|
icon: 'pi pi-fw pi-cog'
|
|
|
|
}
|
|
|
|
]);
|
|
|
|
<\/script>`
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|