fix: SeamlessScroll.vue 组件鼠标悬停其中一个,其他的都停止了

This commit is contained in:
xiaoxian521 2021-06-23 17:51:31 +08:00
parent cf141e973a
commit 3b86ad6fe8

View File

@ -43,18 +43,6 @@ import * as utilsMethods from "./utils";
const { animationFrame, copyObj } = utilsMethods; const { animationFrame, copyObj } = utilsMethods;
animationFrame(); animationFrame();
// moveanimationFrame
let reqFrame = null;
let startPos = null;
// single
let singleWaitTime = null;
//touchStartposY
let startPosY = null;
//touchStartposX
let startPosX = null;
// mouseenter mouseleave scrollMove()
let isHover = false;
let ease = "ease-in";
export default defineComponent({ export default defineComponent({
name: "SeamlessScroll", name: "SeamlessScroll",
props: { props: {
@ -84,6 +72,19 @@ export default defineComponent({
let realBoxWidth = ref(0); let realBoxWidth = ref(0);
let realBoxHeight = ref(0); let realBoxHeight = ref(0);
// single
let singleWaitTime = null;
// moveanimationFrame
let reqFrame = null;
let startPos = null;
//touchStartposY
let startPosY = null;
//touchStartposX
let startPosX = null;
// mouseenter mouseleave scrollMove()
let isHover = false;
let ease = "ease-in";
let { data, classOption } = props; let { data, classOption } = props;
if (classOption["key"] === undefined) { if (classOption["key"] === undefined) {
@ -542,7 +543,6 @@ export default defineComponent({
realBoxWidth, realBoxWidth,
leftSwitchState, leftSwitchState,
rightSwitchState, rightSwitchState,
defaultOption,
options, options,
leftSwitchClass, leftSwitchClass,
rightSwitchClass, rightSwitchClass,