1👍
✅
Define the user
as a function and pass the menuid
as parameter, then define breadCrumb
as computed that returns the user
function with this.$route.params.menuid
as argument :
const user = menuid => [{ title: 'User List', link: `/${menuid}/user` }]
then:
export default {
computed: {
breadCrumb() {
return user(this.$route.params.menuid)
},
},
}
Source:stackexchange.com