guAnsunyata / vue-nested-menu

A simple hands-on mobile nested menu UI component with a smooth slide animation
33 stars 11 forks source link

It's always loading default data as menu items #1

Closed d4rkr3pt0r closed 5 years ago

d4rkr3pt0r commented 5 years ago

Even by defining menu items, It's loading default menu items which is pre-defined at vue-nested-menu.js.

<vue-nested-menu :source="menu"/>
    export default {
        data() {
            return {
                menu: {
                    title: 'MyMenu',
                    children: [
                        {
                            title: `Today's Deals`,
                            link: `/today`,
                            children: [],
                        },
                        {
                        title: `Shop By Department`,
                        children: [
                            {
                                title: `Amazon Music`,
                                link: `/music`,
                                children: [],
                            },
                            {
                                title: `CDs and Vinyl`,
                                link: `/cds`,
                                children: [],
                            },
                        ],
                        },
                    ],
                },
...

Please Fix it

d4rkr3pt0r commented 5 years ago

I found the problem. In package.json at line 5 : "main": "dist/vue-nested-menu.js", Should change to : "main": "src/index.js",