|
|
@@ -16,7 +16,7 @@
|
|
16
|
16
|
</template>
|
|
17
|
17
|
|
|
18
|
18
|
<script setup>
|
|
19
|
|
-import { ref, computed, onMounted, onUnmounted, nextTick } from 'vue'
|
|
|
19
|
+import { ref, computed, watch, onMounted, onUnmounted, nextTick } from 'vue'
|
|
20
|
20
|
|
|
21
|
21
|
const props = defineProps({
|
|
22
|
22
|
columns: {
|
|
|
@@ -94,6 +94,15 @@ onMounted(() => {
|
|
94
|
94
|
}
|
|
95
|
95
|
})
|
|
96
|
96
|
|
|
|
97
|
+watch(() => props.data, (val) => {
|
|
|
98
|
+ stopScroll()
|
|
|
99
|
+ if (val && val.length > 0) {
|
|
|
100
|
+ nextTick(() => {
|
|
|
101
|
+ startScroll()
|
|
|
102
|
+ })
|
|
|
103
|
+ }
|
|
|
104
|
+})
|
|
|
105
|
+
|
|
97
|
106
|
onUnmounted(() => {
|
|
98
|
107
|
stopScroll()
|
|
99
|
108
|
})
|