parHome.vue 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <template>
  2. <div>
  3. <div class="par_tel">
  4. <!-- <parIndex v-if="tab_type==1" class="tel_class"></parIndex>
  5. <parMy v-if="tab_type==2" class="tel_class"></parMy> -->
  6. </div>
  7. <div class="par_tab">
  8. <div class="par_tab_item" @click="tab_type=1">
  9. <img v-show="tab_type==2" src="@/static/tab_hp_normal@2x.png" alt="" class="w_img">
  10. <img v-show="tab_type==1" src="@/static/tab_hp_selected@2x.png" alt="" class="x_img">
  11. <span :class="{'active': tab_type==1}">首页</span>
  12. </div>
  13. <div class="par_tab_item" @click="tab_type=2">
  14. <img v-show="tab_type==1" src="@/static/tab_hp_my@2x.png" alt="" class="w_img">
  15. <img v-show="tab_type==2" src="@/static/tab_mine_selected@2x.png" alt="" class="x_img">
  16. <span :class="{'active': tab_type==2}">个人中心</span>
  17. </div>
  18. </div>
  19. </div>
  20. </template>
  21. <script>
  22. // import parIndex from "./parIndex"
  23. // import parMy from "./parMy"
  24. export default {
  25. data() {
  26. return {
  27. tab_type: 1, // 首页1 我的2
  28. }
  29. },
  30. components:{
  31. // parIndex,
  32. // parMy,
  33. },
  34. onLoad() {
  35. this.innit()
  36. },
  37. methods:{
  38. innit(){
  39. console.log(34)
  40. }
  41. }
  42. }
  43. </script>
  44. <style lang="scss">
  45. .par_tel{
  46. height: calc(100vh - 134upx);
  47. }
  48. .tel_class{
  49. height: 100%;
  50. }
  51. .par_tab{
  52. position: fixed;
  53. left: 0;
  54. bottom: 0;
  55. height: 134upx;
  56. display: flex;
  57. background: #fff;
  58. width: 100%;
  59. .par_tab_item{
  60. flex: 1;
  61. display: flex;
  62. flex-direction: column;
  63. justify-content: center;
  64. align-items: center;
  65. span{
  66. font-size: 28upx;
  67. color: #AAAAAA;
  68. }
  69. img{
  70. width: 48upx;
  71. height: 48upx;
  72. margin-bottom: 10upx;
  73. object-fit: scale-down;
  74. }
  75. .active{
  76. color: #1678FF;
  77. }
  78. }
  79. }
  80. </style>