|
@@ -10,7 +10,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
-import { ref, onMounted, onUnmounted, nextTick, watch } from "vue"
|
|
|
+import { ref, onMounted, onUnmounted, nextTick } from "vue"
|
|
|
|
|
|
const props = defineProps<{
|
|
|
title: string
|
|
@@ -41,7 +41,7 @@ let widthCalc = 0
|
|
|
function handleIsScroll(e: MouseEvent) {
|
|
|
const target = e.target as HTMLElement
|
|
|
widthCalc = target.scrollWidth - target.clientWidth
|
|
|
- if (widthCalc > 0) {
|
|
|
+ if (widthCalc >= 0) {
|
|
|
isScroll.value = true
|
|
|
} else {
|
|
|
isScroll.value = false
|
|
@@ -49,7 +49,7 @@ function handleIsScroll(e: MouseEvent) {
|
|
|
}
|
|
|
function handleAutoScroll(target: any) {
|
|
|
widthCalc = target.scrollWidth - target.clientWidth
|
|
|
- if (widthCalc > 0) {
|
|
|
+ if (widthCalc >= 0) {
|
|
|
isScroll.value = true
|
|
|
} else {
|
|
|
isScroll.value = false
|