zoukankan      html  css  js  c++  java
  • vue2.0 + vux (二)Footer组件

    1.Footer组件

    Footer.vue

    <!-- 底部 footer -->
    <template>
      <div>
        <tabbar>
          <!-- 综合 -->
          <tabbar-item :link="{path:'/'}" selected>
            <img slot="icon" src="../assets/img/ic_nav_news_normal.png">
            <img slot="icon-active" src="../assets/img/ic_nav_news_actived.png">
            <span slot="label">综合</span>
          </tabbar-item>
          <!-- 动弹 -->
          <tabbar-item :link="{path:'/'}">
            <img slot="icon" src="../assets/img/ic_nav_tweet_normal.png">
            <img slot="icon-active" src="../assets/img/ic_nav_tweet_actived.png">
            <span slot="label">动弹</span>
          </tabbar-item>
          <!-- 中间图标 -->
          <tabbar-item :link="{path:'/'}">
            <img slot="icon" src="../assets/img/ic_nav_add_normal.png" height="40" width="40">
          </tabbar-item>
          <!-- 发现 -->
          <tabbar-item :link="{path:'/'}">
            <img slot="icon" src="../assets/img/ic_nav_discover_normal.png">
            <img slot="icon-active" src="../assets/img/ic_nav_discover_actived.png">
            <span slot="label">发现</span>
          </tabbar-item>
          <!-- 我的 -->
          <tabbar-item :link="{path:'/mySettings'}">
            <img slot="icon" src="../assets/img/ic_nav_my_normal.png">
            <img slot="icon-active" src="../assets/img/ic_nav_my_pressed.png">
            <span slot="label">我的</span>
          </tabbar-item>
        </tabbar>
      </div>
    </template>
    
    <script>
      import { Tabbar, TabbarItem } from 'vux'
    
      export default {
        name: 'AppFooter',
        components: {
          Tabbar,
          TabbarItem
        },
        data(){
          return {
            index: 0
          }
        }
      }
    </script>
    

    2.页面调用

    App.vue

    <template>
      <div id="app">
        <!-- 视图层 -->
        <router-view></router-view>
        <!-- 底部选项卡 -->
        <app-footer></app-footer>
      </div>
    </template>
    
    <script>
      import AppFooter from './components/Footer'
    
      export default {
        components: {
          AppFooter
        }
      }
    </script>
    
    <style lang="less">
      @import '~vux/src/styles/reset.less';
    
      body {
        background-color: #fbf9fe;
        line-height: 1.2;
      }
    </style>
    

    3.效果图

  • 相关阅读:
    【noip模拟赛10】奇怪的贸易 高精度
    【noip模拟赛8】魔术棋子
    【noip模拟赛7】足球比赛 树
    P2502 [HAOI2006]旅行 并查集
    python发邮件:
    读取excel表格.py
    allure的其他参数
    生成allure测试报告:
    Java
    调用阿里云接口实现短信消息的发送源码——CSDN博客
  • 原文地址:https://www.cnblogs.com/crazycode2/p/7861529.html
Copyright © 2011-2022 走看看