We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug 对于起始边缘日期的 jumpToDate 设置后跳转的日期对不齐。
To Reproduce
Expected behavior 跳转到设置的日期。
Versions
Additional context
<x-gantt data-id="id" :data="dataList" :ref="ganttRef" start-key="planStartTime" end-key="planEndTime" @row-click="rowClick" > <x-gantt-column label="标题" prop="name" /> <x-gantt-column label="进度" prop="progress" /> <x-gantt-column label="开始日期" width="100"> <template #default="{ row }"> <el-date-picker class="date-picker" v-model="row.planStartTime" type="date" placeholder="选择日期" size="small" style="width: 100%" :clearable="false" value-format="YYYY-MM-DD" /> </template> </x-gantt-column> <x-gantt-column label="结束日期" width="100"> <template #default="{ row }"> <el-date-picker class="date-picker" v-model="row.planEndTime" type="date" placeholder="选择日期" size="small" style="width: 100%" :clearable="false" value-format="YYYY-MM-DD" /> </template> </x-gantt-column> </x-gantt>
const dataList = ref([ { id: 1660933075125125000, name: '小鸡快跑计划', projectId: 1, ganttDataType: 39, planStartTime: '2023-10-04 15:21:27', planEndTime: '2023-11-01 20:33:39', assign: 'anim Ut veniam elit aliquip', progress: 58, estimatedHours: 100, totalManHour: 84, remainingManHour: 93, status: 1, children: [ { id: 1661169300083720200, parentId: 1660933075125125000, name: '孵鸡蛋', projectId: 1, ganttDataType: 2, planStartTime: '2023-11-04 15:21:27', planEndTime: '2023-12-01 20:33:39', assign: '陈小东', progress: 58, estimatedHours: 100, totalManHour: 84, remainingManHour: 93, status: 1, }, { id: 3, parentId: 1660933075125125000, name: '框架搭建', projectId: 1, ganttDataType: 2, planStartTime: '2023-10-19', planEndTime: '2023-11-14', assign: '子路', progress: 18, estimatedHours: 78, totalManHour: 6, remainingManHour: 26, status: 1, }, { id: 4, parentId: 1660933075125125000, name: '发布', projectId: 1, ganttDataType: 1, planStartTime: '2023-11-14', planEndTime: '2023-11-15', assign: '子路', progress: 18, estimatedHours: 78, totalManHour: 6, remainingManHour: 26, status: 1, }, ] } const ganttRef = ref(); function rowClick(data) { ganttRef.value?.jumpToDate(new Date(data.planStartTime)); }
The text was updated successfully, but these errors were encountered:
它本身就不是对齐到起始区域。当时做这个是有需求要跳到展示区域,只是大概算了在区域内即可,后来我也没改,直接把代码粘过来的。
现在这个功能对我没啥用了,看你们希望有什么需求吧~应该到什么样的位置
Sorry, something went wrong.
其实除了第一个,其他的都可以跳转到正确的位置,可能是因为第一个刚好在甘特图日期的边缘,所以导致滚动过去没有办法呈现出完整的甘特图。
边缘可能确实有问题,我记得我是通过对半除算的大概位置。回头我看看,抽空重写一下这个方法的实现吧
fix(jump): 🐛 jumpToDate方法日期位置跳转不准
5673fa9
#43
jeremyjone
No branches or pull requests
Describe the bug
对于起始边缘日期的 jumpToDate 设置后跳转的日期对不齐。
To Reproduce
Expected behavior
跳转到设置的日期。
Versions
Additional context
The text was updated successfully, but these errors were encountered: