index.vue 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <template>
  2. <view class="index-box">
  3. <index-nav @setTabNum="setTabNum"></index-nav>
  4. <view class="list-box">
  5. <view class="box-one" v-if="tabNum===0">
  6. <slide-item></slide-item>
  7. </view>
  8. <view class="box-two" v-else-if="tabNum===1">
  9. <attachment-list></attachment-list>
  10. </view>
  11. <view class="box-three" v-else>
  12. <attachment-list></attachment-list>
  13. </view>
  14. </view>
  15. </view>
  16. </template>
  17. <script>
  18. import IndexNav from "@/pages/index/model/index-nav";
  19. import AttachmentList from "@/pages/index/model/attachment-list";
  20. import SlideItem from "@/pages/index/model/slide-item";
  21. export default {
  22. components: {SlideItem, AttachmentList, IndexNav},
  23. data() {
  24. return {
  25. tabNum:0
  26. }
  27. },
  28. methods: {
  29. setTabNum(tabNum){
  30. this.tabNum=tabNum
  31. }
  32. }
  33. }
  34. </script>
  35. <style scoped lang="scss">
  36. .index-box{
  37. overflow: hidden;
  38. -webkit-overflow-scrolling: touch;
  39. overscroll-behavior: none;
  40. height: 100vh ;
  41. width: 100vw;
  42. .box-one{
  43. }
  44. }
  45. </style>