mirror of
				https://github.com/pure-admin/vue-pure-admin.git
				synced 2025-11-03 13:44:47 +08:00 
			
		
		
		
	fix: SeamlessScroll.vue 组件鼠标悬停其中一个,其他的都停止了
This commit is contained in:
		
							parent
							
								
									cf141e973a
								
							
						
					
					
						commit
						3b86ad6fe8
					
				@ -43,18 +43,6 @@ import * as utilsMethods from "./utils";
 | 
			
		||||
const { animationFrame, copyObj } = utilsMethods;
 | 
			
		||||
animationFrame();
 | 
			
		||||
 | 
			
		||||
// move动画的animationFrame定时器
 | 
			
		||||
let reqFrame = null;
 | 
			
		||||
let startPos = null;
 | 
			
		||||
// single 单步滚动的定时器
 | 
			
		||||
let singleWaitTime = null;
 | 
			
		||||
//记录touchStart时候的posY
 | 
			
		||||
let startPosY = null;
 | 
			
		||||
//记录touchStart时候的posX
 | 
			
		||||
let startPosX = null;
 | 
			
		||||
// mouseenter mouseleave 控制scrollMove()的开关
 | 
			
		||||
let isHover = false;
 | 
			
		||||
let ease = "ease-in";
 | 
			
		||||
export default defineComponent({
 | 
			
		||||
  name: "SeamlessScroll",
 | 
			
		||||
  props: {
 | 
			
		||||
@ -84,6 +72,19 @@ export default defineComponent({
 | 
			
		||||
    let realBoxWidth = ref(0);
 | 
			
		||||
    let realBoxHeight = ref(0);
 | 
			
		||||
 | 
			
		||||
    // single 单步滚动的定时器
 | 
			
		||||
    let singleWaitTime = null;
 | 
			
		||||
    // move动画的animationFrame定时器
 | 
			
		||||
    let reqFrame = null;
 | 
			
		||||
    let startPos = null;
 | 
			
		||||
    //记录touchStart时候的posY
 | 
			
		||||
    let startPosY = null;
 | 
			
		||||
    //记录touchStart时候的posX
 | 
			
		||||
    let startPosX = null;
 | 
			
		||||
    // mouseenter mouseleave 控制scrollMove()的开关
 | 
			
		||||
    let isHover = false;
 | 
			
		||||
    let ease = "ease-in";
 | 
			
		||||
 | 
			
		||||
    let { data, classOption } = props;
 | 
			
		||||
 | 
			
		||||
    if (classOption["key"] === undefined) {
 | 
			
		||||
@ -542,7 +543,6 @@ export default defineComponent({
 | 
			
		||||
      realBoxWidth,
 | 
			
		||||
      leftSwitchState,
 | 
			
		||||
      rightSwitchState,
 | 
			
		||||
      defaultOption,
 | 
			
		||||
      options,
 | 
			
		||||
      leftSwitchClass,
 | 
			
		||||
      rightSwitchClass,
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user