Skip to content
New issue

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

[BUG] 在 x-gantt-column 中无法通过修改 row 实现数据联动 #42

Closed
imlinhanchao opened this issue May 25, 2023 · 1 comment
Closed
Assignees
Labels
reactive Something about reactive

Comments

@imlinhanchao
Copy link

Describe the bug
在 x-gantt-column 中使用组件对 row 做修改,没有联动变化。

To Reproduce

  1. x-gantt-column 开始和结束时间使用日期组件渲染
  2. 使用 v-model 将 row 的值绑定到日期组件
  3. 操作组件修改数据,组件的值没有变化;
  4. 鼠标移动到组件上方,值随即变化为修改的值;
  5. 使用vue devtool 查看 data,确认数据是有变化;
  6. 但右侧甘特图,仍然不变。

Expected behavior
操作组件应该要可以修改数据并联动甘特图。

Versions

  • Version 2.0.3
  • Browser Edge 113.0.1774.50

Additional context

<x-gantt
        data-id="id"
        :data="dataList"
        :ref="ganttRef"
        start-key="planStartTime"
        end-key="planEndTime"
      >
        <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,
        },
    ]
}
@imlinhanchao imlinhanchao added the bug Something isn't working label May 25, 2023
@jeremyjone jeremyjone added reactive Something about reactive and removed bug Something isn't working labels May 25, 2023
@jeremyjone
Copy link
Collaborator

row 抛出的是无响应数据,所以不会联动。我没考虑到这个问题,后续修改一个联动的效果

@xpyjs xpyjs closed this as completed in d8f582c May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
reactive Something about reactive
Projects
None yet
Development

No branches or pull requests

2 participants