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> |