primevue-mirror/apps/showcase/doc/megamenu/CommandDoc.vue

27 lines
550 B
Vue
Raw Normal View History

2023-11-08 18:16:31 +00:00
<template>
<DocSectionText v-bind="$attrs">
<p>The <i>command</i> property of a menuitem defines the callback to run when an item is activated by click or a key event.</p>
</DocSectionText>
2024-01-30 08:16:35 +00:00
<DocSectionCode :code="code" importCode hideToggleCode hideStackBlitz />
2023-11-08 18:16:31 +00:00
</template>
<script>
export default {
data() {
return {
code: {
basic: `
{
label: 'Log out',
icon: 'pi pi-signout',
command: () => {
// Callback to run
}
}
`
}
};
}
};
</script>