import Vue from 'vue'
import VueRouter from 'vue-router'
import ff from '../views/ff.vue'
import ff2 from '../views/ff2.vue'
import fff from '../views/fff.vue'
Vue.use(VueRouter)
const routes = [
{
path: '/',
name: 'Index',
redirect :{name :"FF"}//重定向到名字为FF的标签这里即重定向到/ff
},
{
path: '/ff',
name: 'FF',
component: ff
},
{
path: '/ff2',
name: 'FF2',
component: ff2
},
{
path: '/ff/fff',
name: 'FFF',
component: fff
},
]
const router = new VueRouter({
mode: 'history',
base: process.env.BASE_URL,
routes
})
export default router
Vue路由配置
最新推荐文章于 2024-09-19 07:27:32 发布