Update menu docs for router
parent
8cc457318b
commit
b5e0455c2e
|
@ -1,5 +1,10 @@
|
||||||
<template>
|
<template>
|
||||||
<DocSectionText v-bind="$attrs"> </DocSectionText>
|
<DocSectionText v-bind="$attrs">
|
||||||
|
<p>
|
||||||
|
Since v3.23.0 the vue-router dependency of menu components is deprecated and templating should be used to define router links instead. This approach provides flexibility to be able to use any kind of router link component such as
|
||||||
|
<i>NuxtLink</i> or <i>router-link</i>. Here is an example with vue-router.
|
||||||
|
</p>
|
||||||
|
</DocSectionText>
|
||||||
<div class="card flex justify-content-center">
|
<div class="card flex justify-content-center">
|
||||||
<Menu :model="items">
|
<Menu :model="items">
|
||||||
<template #item="{ label, item, props }">
|
<template #item="{ label, item, props }">
|
||||||
|
@ -55,9 +60,7 @@ export default {
|
||||||
{
|
{
|
||||||
label: 'Upload',
|
label: 'Upload',
|
||||||
icon: 'pi pi-upload',
|
icon: 'pi pi-upload',
|
||||||
command: () => {
|
to: '/fileupload'
|
||||||
this.$toast.add({ severity: 'success', summary: 'Upload', detail: 'File Uploaded', life: 3000 });
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
<template>
|
<template>
|
||||||
<DocSectionText v-bind="$attrs">
|
<DocSectionText v-bind="$attrs">
|
||||||
<p>Two slots named "start" and "end" are provided to embed content before or after the menu. In additon Menu, offers item customization with the <i>item</i> template that receives the menuitem instance from the model as a parameter.</p>
|
<p>
|
||||||
|
Menu offers item customization with the <i>item</i> template that receives the menuitem instance from the model as a parameter. When item templating is used, it is suggested to bind the <i>action</i> prop from the slot props to handle
|
||||||
|
accessibility and pass through attributes. Additionally, two slots named <i>start</i> and <i>end</i> are provided to embed content before or after the menu.
|
||||||
|
</p>
|
||||||
</DocSectionText>
|
</DocSectionText>
|
||||||
<div class="card flex justify-content-center">
|
<div class="card flex justify-content-center">
|
||||||
<Menu :model="items">
|
<Menu :model="items">
|
||||||
|
|
Loading…
Reference in New Issue