diff --git a/src/components/HomeDialog/HomeDialog.vue b/src/components/HomeDialog/HomeDialog.vue index 0fbf37f..f808c31 100644 --- a/src/components/HomeDialog/HomeDialog.vue +++ b/src/components/HomeDialog/HomeDialog.vue @@ -51,9 +51,9 @@ function move() { // } // console.log('x,y :>> ', x, y) tip.value.style.transform = `translate(${x}px,${y}px)` //移动它的位置 - i += 0.5 //随意设置,与快慢有关,但也会影响35行判断到达最大移动距离时改变颜色,因为它可能加不到等于最大距离的时候 + i += 0.75 //随意设置,与快慢有关,但也会影响35行判断到达最大移动距离时改变颜色,因为它可能加不到等于最大距离的时候 //假如最大距离为10,i+=3,那i的值只能为3,6,9,12...则进不了改变颜色那个条件,则到达右边时不会改变颜色 - j += 0.5 + j += 0.75 x = i y = j if (i >= winWidth) { diff --git a/src/components/Map/Map.vue b/src/components/Map/Map.vue index 0dfb354..e3f3eca 100644 --- a/src/components/Map/Map.vue +++ b/src/components/Map/Map.vue @@ -43,9 +43,12 @@ function handleDetail() { emits('handle-Detail') } watch(shop, () => { - nextTick(() => { - nameWidth.value = nameRef.value.clientWidth - }) + const timeId = setTimeout(() => { + clearTimeout(timeId) + nextTick(() => { + nameWidth.value = nameRef.value.clientWidth + }) + }, 400) }) diff --git a/src/composables/useHandleScreen.ts b/src/composables/useHandleScreen.ts index d990a21..5737830 100644 --- a/src/composables/useHandleScreen.ts +++ b/src/composables/useHandleScreen.ts @@ -81,7 +81,9 @@ export const useHandleScreen = (callback: () => void) => { //监听时间 大于等于0且小于等于5时显示弹框 watch([toIndexTime, toWallpaperTime], ([indexTime, wallpaperTime]) => { if ((indexTime >= MIN_TIME && indexTime <= MAX_TIME) || (wallpaperTime >= MIN_TIME && wallpaperTime <= MAX_TIME)) { - showCountDownDialog.value = true + if (!isWallpaper.value) { + showCountDownDialog.value = true + } } else { showCountDownDialog.value = false }