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.效果图

vue2.0 + vux (二)Footer组件的更多相关文章

  1. Vue2.0表单校验组件vee-validate的使用

    vee-validate使用教程 *本文适合有一定Vue2.0基础的同学参考,根据项目的实际情况来使用,关于Vue的使用不做多余解释.本人也是一边学习一边使用,如果错误之处敬请批评指出* 一.安装 n ...

  2. Vue2.0的变化 ,组件模板,生命周期,循环,自定义键盘指令,过滤器

    组件模板: 之前: <template> <h3>我是组件</h3><strong>我是加粗标签</strong> </templat ...

  3. Webpack+vue2.0如何注册全局组件 (01)

    Part 1, 问题: webpack + vue2.0框架中,如何在入口js中注册组件? 就是在一个月以前,匆匆闯入vuejs这个社群,基本了解了vuejs的一些基础特性和语法.笔者兴致勃勃地开始想 ...

  4. Vue2.0中的transition组件

    组件的过度 Vue1.0中transition做为标签的行内属性被vue支持.但在Vue2.0中.Vue放弃了旧属性的支持并提供了transition组件,transition做为标签被使用. 使用t ...

  5. Vue2.0如何实现父组件与子组件之间的事件发射与接收

    关于vue2.0的事件发射和接收,大家都知道$dispatch和$broadcast在vue2.0已经被弃用了,取而代之的是更加方便快捷的方式,使用事件中心,组件通过它来互相通信,不管组件在哪一个层都 ...

  6. 在vue2.0中引用element-ui组件库

    element-ui是由饿了么团队开发的一套基于 Vue 2.0 的桌面端组件库. 官网:http://element.eleme.io/ 安装 npm i element-ui -S 引用完整的el ...

  7. vue2.0 + vux (一)Header 组件

    1.main.js import Vue from 'vue' import FastClick from 'fastclick' import VueRouter from 'vue-router' ...

  8. vue2.0 + vux (六)NewsList 资讯页 及 NewsDetail 资讯详情页

    设置代理,避免出现跨域问题 /*设置代理,避免出现跨域问题*/ proxyTable: { '/api':{ target: 'https://www.oschina.net/action/apiv2 ...

  9. vue2.0的瀑布流组件-使用说明

    做一个小项目,需要瀑布流,就选他了,先看看效果 使用瀑布流布局组件:vue-waterfall-easy 下载引入: 方式一:直接从git上复制组件的完整代码,引入vue组件文件即可 import v ...

随机推荐

  1. js时间格式化工具,时间戳格式化,字符串转时间戳

    在开发中经常会用到时间格式化,有时候在网上搜索一大堆但不是自己想要的,自己总结一下,写一个时间格式化工具方便以后直接使用,欢迎大家来吐槽…… 1 2 3 4 5 6 7 8 9 10 11 12 13 ...

  2. change login screen wallpaper on ubuntu14.04

    install lightdm-gtk-greeter $ apt-get install lightdm config lightdm $ vim /etc/lightdm/lightdm-gtk- ...

  3. [git 学习篇] 创建公钥

    http://riny.net/2014/git-ssh-key/ 1 安装 windows gitbash    msysgit是Windows版的Git,从https://git-for-wind ...

  4. javascript学习笔记 - 面向对象 理解对象

    ECMAScript 中有两种属性:数据属性和访问器属性 一 属性类型 1.数据属性.数据属性有4个描述其行为的特性 [[Configurable]]表示能否通过delete删除属性从而重新定义属性: ...

  5. 【转】Unicode utf8等编码类型的原理

    原文地址http://www.cnblogs.com/daxiong2014/p/4768681.html Unicode utf8等编码类型的原理 1.ASCII码  我们知道,在计算机内部,所有的 ...

  6. [AtCoderContest010D]Decrementing

    [AtCoderContest010D]Decrementing 试题描述 There are \(N\) integers written on a blackboard. The \(i\)-th ...

  7. 洛谷P1469找筷子

    题目描述 经过一段时间的紧张筹备,电脑小组的“RP餐厅”终于开业了,这天,经理LXC接到了一个定餐大单,可把大家乐坏了!员工们齐心协力按要求准备好了套餐正准备派送时,突然碰到一个棘手的问题,筷子!CX ...

  8. POJ4007 Flood-it!

      Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 337   Accepted: 123 Description Flood ...

  9. 浅谈js函数三种定义方式 & 四种调用方式 & 调用顺序

    在Javascript定义一个函数一般有如下三种方式: 函数关键字(function)语句: function fnMethodName(x){alert(x);} 函数字面量(Function Li ...

  10. LeetCode OJ--Path Sum *

    https://oj.leetcode.com/problems/path-sum/ 树的深搜,求从根到叶子的路径. 记住深搜的样子 #include <iostream> using n ...