12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <template>
- <view class="index-box">
- <index-nav @setTabNum="setTabNum"></index-nav>
- <view class="list-box">
- <view class="box-one" v-if="tabNum===0">
- <slide-item></slide-item>
- </view>
- <view class="box-two" v-else-if="tabNum===1">
- <attachment-list ref="attachmentObj"></attachment-list>
- </view>
- <view class="box-three" v-else>
- <attachment-list></attachment-list>
- </view>
- </view>
- </view>
- </template>
- <script>
- import IndexNav from "@/pages/index/model/index-nav";
- import AttachmentList from "@/pages/index/model/attachment-list";
- import SlideItem from "@/pages/index/model/slide-item";
- export default {
- components: {SlideItem, AttachmentList, IndexNav},
- data() {
- return {
- tabNum:0
- }
- },
- onReachBottom(){
- if(this.tabNum===1){
- this.$refs.attachmentObj.getAttachmentList()
- }
- },
- methods: {
- setTabNum(tabNum){
- this.tabNum=tabNum
- }
- }
- }
- </script>
- <style scoped lang="scss">
- .index-box{
- overflow: hidden;
- -webkit-overflow-scrolling: touch;
- overscroll-behavior: none;
- height: 100vh ;
- width: 100vw;
- .box-one{
- }
- }
- </style>
|