Closed RanRuan closed 4 months ago
paste your code pls?
paste your code pls?
[gantt-master.zip](https://github.com/xpyjs/gantt/files/14994458/gantt-master.zip)
paste your code pls? gantt-master.zip
paste minimum reproduction code, not zip. I can see it in here
<template>
<div class="gantt-wrap">
<x-gantt
data-id="index"
:data="ganttData"
header-height="48"
:row-height="30"
>
<x-gantt-column label="事项" prop="name"></x-gantt-column>
</x-gantt>
</div>
</template>
<script lang="ts" setup>
import { reactive, ref, onMounted } from 'vue';
const ganttData = reactive([
{
"index": 2,
"name": "t1",
"startDate": new Date('2022-01-24'),
"endDate": new Date('2022-07-24'),
"o": {
"t1": "a",
"t2": "b"
},
"children": [
{
"index": 51,
"name": "sub-t51",
"startDate": new Date('2022-01-27'),
"endDate": new Date('2022-02-24'),
"progress": 0.8,
"o": {
"t1": "a",
"t2": "b"
}
},
{
"index": 52,
"name": "sub-t52",
"startDate":new Date('2022-03-27'),
"endDate": new Date('2022-04-27'),
"progress": 0.5,
"o": {
"t1": "a",
"t2": "b"
},
"children": [
{
"index": 53,
"name": "sub-sub-t53",
"startDate": new Date('2022-06-27'),
"endDate": new Date('2022-06-28'),
"progress": 0.3333333333,
"o": {
"t1": "a",
"t2": "b"
}
}
]
}
]
}
]);</script>
paste minimum reproduction code, not zip. I can see it in here
When the length of ganttData is equal to 1, it displays blank.
paste minimum reproduction code, not zip. I can see it in here
I found in the source code src\composables\useInView.ts,line 14 :
// 预加载条数
const preload = 5;
看到了代码,运行了一下,结果如下图:
并没有你说的问题。
1、检查你的代码 2、确保已经升级到最新版本
paste minimum reproduction code, not zip. I can see it in here
I found in the source code src\composables\useInView.ts,line 14 :
// 预加载条数 const preload = 5;
这个预加载是为了防止滚动时出现白屏,和你说的问题没有关系
Describe the bug 代码链接如下: https://github.com/xpyjs/gantt/blob/master/demo/demo.vue