Vue路由(router)

前言:

凡事不要说“我不会”或“不可能”,因为你根本还没有去做

--------------------------------正文---------------------------------

用法

        login
        login

        const routes = [
            {
                name: 'user',
                path: '/user/:id',
                component: User,
                props: true
            },
            {
                name: 'other',
                path: '/other',
                component: Other
            }
        ];
        const router = new VueRouter({
            routes
        });

你可能感兴趣的:(Vue路由(router))