|  | @@ -31,7 +31,7 @@
 | 
											
												
													
														|  |              />
 |  |              />
 | 
											
												
													
														|  |            </el-carousel-item>
 |  |            </el-carousel-item>
 | 
											
												
													
														|  |          </el-carousel>
 |  |          </el-carousel>
 | 
											
												
													
														|  | -        <div class="container-box">
 |  | 
 | 
											
												
													
														|  | 
 |  | +        <div class="container-box" :style="{ height: elementHeight + 'px' }">
 | 
											
												
													
														|  |            <ul
 |  |            <ul
 | 
											
												
													
														|  |              ref="container"
 |  |              ref="container"
 | 
											
												
													
														|  |              class="view-list-bottom"
 |  |              class="view-list-bottom"
 | 
											
										
											
												
													
														|  | @@ -68,12 +68,12 @@ export default {
 | 
											
												
													
														|  |        data: getVideoData(),
 |  |        data: getVideoData(),
 | 
											
												
													
														|  |        curVideoIndex: 0,
 |  |        curVideoIndex: 0,
 | 
											
												
													
														|  |        elementWidth: 0,
 |  |        elementWidth: 0,
 | 
											
												
													
														|  | -      elementHeight: 0,
 |  | 
 | 
											
												
													
														|  | 
 |  | +      elementHeight: 139,
 | 
											
												
													
														|  |        viewTopBottomBtn: false,
 |  |        viewTopBottomBtn: false,
 | 
											
												
													
														|  |        fileLen: 0,
 |  |        fileLen: 0,
 | 
											
												
													
														|  |        translateY: 0,
 |  |        translateY: 0,
 | 
											
												
													
														|  |        elementID: '',
 |  |        elementID: '',
 | 
											
												
													
														|  | -      observersMap: {},
 |  | 
 | 
											
												
													
														|  | 
 |  | +      videoObserversMap: {},
 | 
											
												
													
														|  |      };
 |  |      };
 | 
											
												
													
														|  |    },
 |  |    },
 | 
											
												
													
														|  |    watch: {
 |  |    watch: {
 | 
											
										
											
												
													
														|  | @@ -82,8 +82,16 @@ export default {
 | 
											
												
													
														|  |          this.fileLen = val.file_list.length;
 |  |          this.fileLen = val.file_list.length;
 | 
											
												
													
														|  |          if (this.fileLen > 0 && this.data.property.view_method === 'list') {
 |  |          if (this.fileLen > 0 && this.data.property.view_method === 'list') {
 | 
											
												
													
														|  |            const ele = this.$refs.videoAreaBox;
 |  |            const ele = this.$refs.videoAreaBox;
 | 
											
												
													
														|  | -          this.elementWidth = ele.clientWidth;
 |  | 
 | 
											
												
													
														|  | -          this.elementHeight = ele.clientHeight;
 |  | 
 | 
											
												
													
														|  | 
 |  | +          const sn_position = this.data.property.sn_position;
 | 
											
												
													
														|  | 
 |  | +          // 序号在左和右补齐序号高度,去掉padding(8*2)
 | 
											
												
													
														|  | 
 |  | +          if (sn_position.includes('left') || sn_position.includes('right')) {
 | 
											
												
													
														|  | 
 |  | +            this.elementWidth = ele.clientWidth - 16;
 | 
											
												
													
														|  | 
 |  | +            this.elementHeight = ele.clientHeight + 30;
 | 
											
												
													
														|  | 
 |  | +          } else {
 | 
											
												
													
														|  | 
 |  | +            this.elementWidth = ele.clientWidth;
 | 
											
												
													
														|  | 
 |  | +            this.elementHeight = ele.clientHeight;
 | 
											
												
													
														|  | 
 |  | +          }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |            const mainEle = this.$refs.videoArea;
 |  |            const mainEle = this.$refs.videoArea;
 | 
											
												
													
														|  |            // 检查元素是否包含已知的类名
 |  |            // 检查元素是否包含已知的类名
 | 
											
												
													
														|  |            mainEle.classList.forEach((className) => {
 |  |            mainEle.classList.forEach((className) => {
 | 
											
										
											
												
													
														|  | @@ -110,20 +118,27 @@ export default {
 | 
											
												
													
														|  |        const canvasElement = document.querySelector('.canvas');
 |  |        const canvasElement = document.querySelector('.canvas');
 | 
											
												
													
														|  |        if (!canvasElement) return;
 |  |        if (!canvasElement) return;
 | 
											
												
													
														|  |        const instanceName = `observer_${this.elementID}`;
 |  |        const instanceName = `observer_${this.elementID}`;
 | 
											
												
													
														|  | -      this.observersMap[instanceName] = new ResizeObserver((entries) => {
 |  | 
 | 
											
												
													
														|  | 
 |  | +      this.videoObserversMap[instanceName] = new ResizeObserver((entries) => {
 | 
											
												
													
														|  |          if (!this.getDragStatus()) return;
 |  |          if (!this.getDragStatus()) return;
 | 
											
												
													
														|  |          for (let entry of entries) {
 |  |          for (let entry of entries) {
 | 
											
												
													
														|  |            window.requestAnimationFrame(() => {
 |  |            window.requestAnimationFrame(() => {
 | 
											
												
													
														|  | -            this.elementWidth = entry.contentRect.width;
 |  | 
 | 
											
												
													
														|  | -            this.elementHeight = entry.contentRect.height;
 |  | 
 | 
											
												
													
														|  | 
 |  | +            const sn_position = this.data.property.sn_position;
 | 
											
												
													
														|  | 
 |  | +            // 序号在上方和下方减去序号高度,在左右去掉padding(8*2)
 | 
											
												
													
														|  | 
 |  | +            if (sn_position.includes('top') || sn_position.includes('bottom')) {
 | 
											
												
													
														|  | 
 |  | +              this.elementWidth = entry.contentRect.width;
 | 
											
												
													
														|  | 
 |  | +              this.elementHeight = entry.contentRect.height - 30;
 | 
											
												
													
														|  | 
 |  | +            } else {
 | 
											
												
													
														|  | 
 |  | +              this.elementWidth = entry.contentRect.width - 16;
 | 
											
												
													
														|  | 
 |  | +              this.elementHeight = entry.contentRect.height;
 | 
											
												
													
														|  | 
 |  | +            }
 | 
											
												
													
														|  |            });
 |  |            });
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  |        });
 |  |        });
 | 
											
												
													
														|  | -      this.observersMap[instanceName].observe(this.$el);
 |  | 
 | 
											
												
													
														|  | 
 |  | +      this.videoObserversMap[instanceName].observe(this.$el);
 | 
											
												
													
														|  |      });
 |  |      });
 | 
											
												
													
														|  |    },
 |  |    },
 | 
											
												
													
														|  |    beforeDestroy() {
 |  |    beforeDestroy() {
 | 
											
												
													
														|  | -    Object.values(this.observersMap).forEach((observer) => {
 |  | 
 | 
											
												
													
														|  | 
 |  | +    Object.values(this.videoObserversMap).forEach((observer) => {
 | 
											
												
													
														|  |        observer.disconnect();
 |  |        observer.disconnect();
 | 
											
												
													
														|  |      });
 |  |      });
 | 
											
												
													
														|  |    },
 |  |    },
 | 
											
										
											
												
													
														|  | @@ -167,6 +182,7 @@ export default {
 | 
											
												
													
														|  |          this.viewTopBottomBtn = true;
 |  |          this.viewTopBottomBtn = true;
 | 
											
												
													
														|  |        } else {
 |  |        } else {
 | 
											
												
													
														|  |          this.viewTopBottomBtn = false;
 |  |          this.viewTopBottomBtn = false;
 | 
											
												
													
														|  | 
 |  | +        this.translateY = 0;
 | 
											
												
													
														|  |        }
 |  |        }
 | 
											
												
													
														|  |      },
 |  |      },
 | 
											
												
													
														|  |      // 滚动图片列表
 |  |      // 滚动图片列表
 |