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

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(() => {