zoukankan      html  css  js  c++  java
  • VueMusic-1.首页-路由配置

    1.结构配置:

    <template>
    <div class="index">
    <ul>
    <li>
    <router-link to="/Home"> <img src="../assets/logo-ea5.png" alt=""></router-link>
    </li>
    <li><router-link to="/Artists">歌手</router-link></li>
    <li><router-link to="/Listcate">榜单</router-link></li>
    <li><router-link to="/Ucenter">我的</router-link></li>
    <li><router-link to="/Search">搜索</router-link></li>
    </ul>
    <router-view />
    </div>
    </template>
    <script>

    </script>

    <style scoped>
    .index img {
    26px;
    height: 26px;
    }

    .index ul {
    display: flex;
    height: 50px;
    line-height: 50px;
    background: #f9f9f9;
    }

    .index ul li {
    flex: 1;
    text-align: center;
    }

    .index ul li a {
    font-size: 16px;
    color: #999;
    }
    </style>

    2.路由配置:

    import Vue from 'vue'
    import Router from 'vue-router'
    import Index from '@/pages/index'
    import Home from '@/pages/home'
    import Artists from '@/pages/artists'
    import Search from '@/pages/search'
    import Listcate from '@/pages/listcate'
    import Ucenter from '@/pages/ucenter'
    Vue.use(Router)
    export default new Router({
    routes: [{
    path: '/',
    name: 'Index',
    component: Index,
    children: [{
    path: '/Home',
    component: Home
    },{
    path: '/Artists',
    component: Artists
    },{
    path: '/Search',
    component: Search
    },{
    path: '/Listcate',
    component: Listcate
    },{
    path: '/Ucenter',
    component: Ucenter
    }
    ]
    }]
    })

  • 相关阅读:
    git
    composer
    laravel saas
    算法模板-01背包
    GMP-C/C++(大数库)使用方法
    算法模板-容斥原理
    算法模板-欧拉函数
    算法模板-素数判断/素数筛法
    算法模板-质因数分解
    算法模板-快速幂取模
  • 原文地址:https://www.cnblogs.com/xiao-peng-ji/p/11409096.html
Copyright © 2011-2022 走看看