famousHallPage.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <template>
  2. <view>
  3. <view class="sticky-tabs" :style="{top:tabTop+'px'}">
  4. <me-tabs v-model="tabIndex" :tabs="mtabs" :height="88" @change="tabChange" :tab-width="134"></me-tabs>
  5. </view>
  6. <swiper :style="{'height': swHeight}" :current="tabIndex" @change="swiperChange" v-if="mtabs.length>0">
  7. <swiper-item v-for="(tab,i) in mtabs" :key="i">
  8. <famous-hall-item ref="mescrollItem" :i="i" :index="tabIndex" :tabs="mtabs" :tipsArr="tipsArr"></famous-hall-item>
  9. </swiper-item>
  10. </swiper>
  11. </view>
  12. </template>
  13. <script>
  14. import MescrollCompMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mixins/mescroll-comp.js";
  15. import MescrollMoreMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mixins/mescroll-more.js";
  16. import famousHallItem from "./famousHallPageItem.vue"
  17. export default {
  18. mixins: [MescrollCompMixin,MescrollMoreMixin], // 多个mescroll-body写在子组件时, 则使用mescroll-more.js补充子组件的页面生命周期
  19. components: {
  20. famousHallItem
  21. },
  22. props: {
  23. keyword: String,
  24. cataType:Number,
  25. i:Number,
  26. index:Number,
  27. tabTop:Number,
  28. mtabs: {
  29. type: Array,
  30. default(){
  31. return []
  32. }
  33. },
  34. tipsArr: {
  35. type: Array,
  36. default(){
  37. return []
  38. }
  39. }
  40. },
  41. watch:{
  42. },
  43. data() {
  44. return {
  45. swHeight: "800px",
  46. tabIndex: 0,
  47. }
  48. },
  49. created(){
  50. },
  51. destroyed() {
  52. },
  53. mounted() {
  54. },
  55. methods: {
  56. swiperChange(e){
  57. this.tabIndex = e.detail.current
  58. },
  59. },
  60. }
  61. </script>
  62. <style lang="scss" scoped>
  63. .item_content{
  64. background-color: #f7f7f7;
  65. margin-top: 20rpx;
  66. width: 100%;
  67. flex: 1;
  68. display: flex;
  69. flex-direction: column;
  70. }
  71. .top-section{
  72. .search-header-nav {
  73. width: 100%;
  74. display: flex;
  75. flex-direction: row;
  76. flex-wrap: nowrap;
  77. align-items: center;
  78. background: #FF5C03;
  79. }
  80. .search-header-main {
  81. width: 300rpx;
  82. flex: auto;
  83. overflow: hidden;
  84. margin:0 20rpx;
  85. height: 48rpx;
  86. background: #fff;
  87. border-radius: 24rpx;
  88. padding: 10rpx 20upx;
  89. display: flex;
  90. justify-content: flex-start;
  91. align-items: center;
  92. image{
  93. width: 28upx;
  94. height: 28upx;
  95. margin-right: 16upx;
  96. }
  97. .input-text{
  98. color: #333;
  99. font-size: 24rpx;
  100. height: 48rpx;
  101. line-height:48rpx ;
  102. }
  103. .uni-input-placeholder{
  104. color:#999;
  105. }
  106. }
  107. }
  108. </style>