Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
147958 | Sep 29,2019 02:48 PM UTC | Apr 8,2020 09:48 AM UTC | Vue | 9 |
![]() |
Tags: Menu |
vue.runtime.esm.js?2b0e:619 [Vue warn]: Unknown custom element: <ejs-menu> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
found in
---> <SidebarMenu> at src/components/SidebarMenu.vue
<App> at src/App.vue
<Root>
import Vue from "vue";
import { SidebarPlugin } from '@syncfusion/ej2-vue-navigations';
import { MenuPlugin } from "@syncfusion/ej2-vue-navigations";
import { enableRipple } from '@syncfusion/ej2-base';
Vue.use(SidebarPlugin);
Vue.use( MenuPlugin); |
<ejs-menu id="main-menubar" items="menuItems" select="select" orientation="Vertical"></ejs-menu>
export default Vue.extend({
data: function() {
return {
//..
menuItems: [
{
text: "Overview",
id: "overview",
url: "https://www.google.com",
iconCss: "icon-globe icon",
items: [
//..
]
} //..
],
},
methods: {
select: function(args) {
alert(args.item.id);
//args.item.text // to get the item text
}
}
});
<style>
/* URL customization in sidebar sample*/
.e-menu-wrapper ul .e-menu-item a.e-menu-text.e-menu-url {
color: #fff;
}
</style> |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.