Giter Site home page Giter Site logo

Comments (3)

jeremyjone avatar jeremyjone commented on May 14, 2024

具体讲一下

from gantt.

imlinhanchao avatar imlinhanchao commented on May 14, 2024

希望达成下面这种效果,通过 x-gantt-columnlabel 插槽。可以在表头额外添加一些组件实现一些特殊的功能。

<x-gantt
    data-id="id"
    :data="dataList"
    :ref="ganttRef"
    start-key="planStartTime"
    end-key="planEndTime"
    @row-click="rowClick"
  >
    <x-gantt-column  prop="name">
        <!--在表头添加搜索框-->
        <template #label>
            标题 <el-input  type="text" placeholder="搜索标题" />
        </template>
    </x-gantt-column>
    <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-column>
        <template #label>
            <el-button icon="el-icon-setting" @click="setting" />
        </template>
    </x-gantt-column>
</x-gantt>

from gantt.

jeremyjone avatar jeremyjone commented on May 14, 2024

这个看情况吧。。。表头的插槽考虑的东西比较多,目前没有特别的想法,后续可能会考虑吧

from gantt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.