bug修复

如果初始值是空数组, 通过动态获取数据后仍然不能触发滚动.
原因是因为data 从 props解构出来后不再是一个响应性变量.
This commit is contained in:
spe_rains 2021-05-27 18:15:01 +08:00 committed by GitHub
parent b554356ba1
commit aa2cc33ec9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -188,7 +188,8 @@ export default defineComponent({
});
let scrollSwitch = computed(() => {
return data.length >= unref(options).limitMoveNum;
// props .
return props.data.length >= unref(options).limitMoveNum;
});
let hoverStopSwitch = computed(() => {