| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- <template>
- <div class="mobile-footer">
- <span :class="activeType=='home'?'active':''">
- <nuxt-link to="/">
- <i :class="activeType=='home'?'iconfont icon-shouye':'iconfont icon-shouye1'"></i><p>首页</p>
- </nuxt-link>
- </span>
- <span :class="activeType=='shops'?'active':''">
- <nuxt-link to="/mobile/shop">
- <i :class="activeType=='shops'?'iconfont icon-dianpu':'iconfont icon-dianpu1'"></i><p>店铺</p>
- </nuxt-link>
- </span>
- <span :class="activeType=='user'?'active':''">
- <nuxt-link to="/mobile/user">
- <i :class="activeType=='user'?'iconfont icon-icon':'iconfont icon-wo'"></i><p>我</p>
- </nuxt-link>
- </span>
- </div>
- </template>
- <script>
- export default{
- name: 'MobileFooter',
- computed: {
- activeType () {
- return this.$route.path === '/' ? 'home' : this.$route.path === '/mobile/shop' ? 'shops' : this.$route.path === '/mobile/user' ? 'user' : ''
- }
- }
- }
- </script>
- <style scoped>
- .mobile-footer{
- position:fixed;
- bottom:0;
- width:100%;
- height:.98rem;
- text-align: center;
- border-top:.02rem solid #ccc;
- background: #ffffff;
- z-index: 10;
- }
- .mobile-footer span{
- display: inline-block;
- width: 2.5rem;
- font-size:.32rem;
- color:#b0b0b0;
- padding-top:.1rem;
- }
- .mobile-footer span a{
- color:#b0b0b0;
- }
- .mobile-footer span a i{
- font-size:.45rem;
- }
- .mobile-footer span a p{
- font-size:.22rem;
- }
- .mobile-footer span.active a{
- color:#3976f4;
- }
- </style>
|