MobileFooter.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <template>
  2. <div class="mobile-footer">
  3. <span :class="activeType=='home'?'active':''" @click="activeType='home'">
  4. <nuxt-link to="/"><i class="fa fa-camera-retro"></i><p>首页</p></nuxt-link>
  5. </span>
  6. <span :class="activeType=='shops'?'active':''" @click="activeType='shops'">
  7. <nuxt-link to="/mobile/shop"><i class="fa fa-camera-retro"></i><p>店铺</p></nuxt-link>
  8. </span>
  9. <span :class="activeType=='user'?'active':''" @click="activeType='user'">
  10. <nuxt-link to="/mobile/user"><i class="fa fa-camera-retro"></i><p>我</p></nuxt-link>
  11. </span>
  12. </div>
  13. </template>
  14. <script>
  15. export default{
  16. name: 'MobileFooter',
  17. data () {
  18. return {
  19. activeType: ''
  20. }
  21. }
  22. }
  23. </script>
  24. <style scoped>
  25. .mobile-footer{
  26. position:fixed;
  27. bottom:0;
  28. width:100%;
  29. height:49px;
  30. display:flex;
  31. text-align: center;
  32. justify-content:space-between;
  33. border-top:1px solid #ccc;
  34. background: #ffffff;
  35. }
  36. .mobile-footer span{
  37. flex:1;
  38. font-size:16px;
  39. color:#b0b0b0;
  40. padding-top:5px;
  41. }
  42. .mobile-footer span a{
  43. color:#b0b0b0;
  44. }
  45. .mobile-footer span.active a{
  46. color:#3976f4;
  47. }
  48. </style>