|
@@ -68,6 +68,11 @@ const mousemoveFu = (e, flag) => {
|
|
|
|
|
|
let resizeObserver = null
|
|
|
|
|
|
+
|
|
|
+let baseFlag = true
|
|
|
+
|
|
|
+let timeccc = -1
|
|
|
+
|
|
|
onMounted(() => {
|
|
|
const element = document.querySelector('#myElement')
|
|
|
|
|
@@ -80,14 +85,17 @@ onMounted(() => {
|
|
|
pageHeight.value = pageHeightWindow
|
|
|
|
|
|
moveLoc.value = 0
|
|
|
- setTimeout(() => {
|
|
|
+
|
|
|
+ clearTimeout(timeccc)
|
|
|
+
|
|
|
+ timeccc = setTimeout(() => {
|
|
|
if (isRow.value === "竖") {
|
|
|
const dom = document.querySelector(".imgBox")
|
|
|
if (dom && ( dom.offsetHeight > pageHeightWindow)) {
|
|
|
isMove.value = true
|
|
|
imgWidth.value = dom.offsetWidth
|
|
|
imgHeight.value = dom.offsetHeight
|
|
|
- }
|
|
|
+ } else isMove.value = false
|
|
|
} else {
|
|
|
const leftBoxWidthDom = document.querySelector(".leftBxo")
|
|
|
const leftBoxWidthDomWidth = leftBoxWidthDom.offsetWidth
|
|
@@ -99,7 +107,8 @@ onMounted(() => {
|
|
|
imgHeight.value = dom.offsetHeight
|
|
|
}
|
|
|
}
|
|
|
- }, 600)
|
|
|
+ baseFlag = false
|
|
|
+ }, baseFlag ? 600 : 30)
|
|
|
clearInterval(tiemrr.value)
|
|
|
|
|
|
if (zhouMove.value >= 100) return
|
|
@@ -351,6 +360,7 @@ onBeforeUnmount(() => {
|
|
|
.smImgBoxMain {
|
|
|
overflow: hidden;
|
|
|
position: relative;
|
|
|
+ transition: all .3s;
|
|
|
.smBoxBor {
|
|
|
cursor: grab;
|
|
|
position: absolute;
|