diff --git a/src/components/slide/SlideColumnList.vue b/src/components/slide/SlideColumnList.vue index 272af43..382cba4 100644 --- a/src/components/slide/SlideColumnList.vue +++ b/src/components/slide/SlideColumnList.vue @@ -71,9 +71,8 @@ export default { if (oldVal.length === 0) { let startIndex = 0 if (this.currentSlideItemIndex >= this.defaultVirtualItemTotal) { - startIndex = this.currentSlideItemIndex - (this.defaultVirtualItemTotal + 1) / 2 + startIndex = this.currentSlideItemIndex - (this.defaultVirtualItemTotal - 1) / 2 } - console.log('start',startIndex) this.list.slice(startIndex, startIndex + 5).map( (item, index) => { let el = null @@ -87,14 +86,13 @@ export default { }) let that = this if (that.currentSlideItemIndex > 2) { - this.checkChildren() this.$setCss(this.slideList, 'transform', `translate3d(0px, ${-this.currentSlideItemIndex * this.wrapperHeight}px, 0px)`) $(".video-slide-item").each(function () { $(this).css('top', (that.currentSlideItemIndex - 2) * that.wrapperHeight) }) } - + setTimeout(this.checkChildren, 100) } else { let endLength = oldVal.length + 3 newVal.slice(oldVal.length, endLength).map((item, index) => { @@ -141,16 +139,19 @@ export default { this.slideItems = this.slideList.children this.wrapperHeight = this.$getCss(this.slideList, 'height') - for (let i = 0; i < this.slideItems.length; i++) { - let el = this.slideItems[i] - this.slideItemsHeights.push(this.$getCss(el, 'height')) + if (!this.virtual){ + for (let i = 0; i < this.slideItems.length; i++) { + let el = this.slideItems[i] + this.slideItemsHeights.push(this.$getCss(el, 'height')) + } } }, touchStart(e) { + console.log('this.slideItemsHeights',this.slideItemsHeights) + this.$setCss(this.slideList, 'transition-duration', `0ms`) this.showIndicator && this.$setCss(this.indicatorRef, 'transition-duration', `0ms`) this.toolbarStyleTransitionDuration = 0 - this.startLocationX = e.touches[0].pageX this.startLocationY = e.touches[0].pageY this.startTime = Date.now() diff --git a/src/config/index.js b/src/config/index.js index cf85d1c..561787d 100644 --- a/src/config/index.js +++ b/src/config/index.js @@ -1,6 +1,6 @@ export default { - baseUrl: 'http://192.168.0.105//index.php/v1', - filePreview:'http://192.168.0.105/static/uploads/', - // baseUrl: 'http://192.168.10.164//index.php/v1', - // filePreview:'http://192.168.10.164/static/uploads/' + // baseUrl: 'http://192.168.0.105//index.php/v1', + // filePreview:'http://192.168.0.105/static/uploads/', + baseUrl: 'http://192.168.10.164//index.php/v1', + filePreview:'http://192.168.10.164/static/uploads/' } \ No newline at end of file diff --git a/src/pages/home/Index2.vue b/src/pages/home/Index2.vue index 4b2124b..7c1ff1f 100644 --- a/src/pages/home/Index2.vue +++ b/src/pages/home/Index2.vue @@ -96,6 +96,7 @@ :list="videos" :renderSlide="render" v-model:active-index="videoActiveIndex" + v-model:active-index1="videoActiveIndex" @end="end" >