Giter Club home page Giter Club logo

Comments (4)

ddmy avatar ddmy commented on August 25, 2024

感谢🙏
点击当前格子, 会触发scheduleClick 事件,该事件接受一个包含日期信息的参数。说明文档里面有写。

<Gantt @scheduleClick=""/>

from vue3-gantt.

majingtao avatar majingtao commented on August 25, 2024

比如在6.30-7.5的日程里,点击7.2 或7.3的时候拿到的日期,一直是第一个格子的日期,
{type: 'works', date: '2023-06-30', width: 550, left: 0, id: '1674344695524532226', …}
1688091510914

from vue3-gantt.

ddmy avatar ddmy commented on August 25, 2024

当前甘特图会将日程信息 的格子合成一个,所以获取日程内具体点击的信息会有一些难度。
我这边刚刚更新了vue3-gantt版本 #21
你先更新一下依赖到最新版本1.1.8-3😊。
然后最新的 scheduleClick 点击事件 参数中包含了原始的event 信息(这也是1.1.8-3更新的 内容),你可以通过 offsetX 属性获取点击的横向坐标。
days是一个数组,包含了当前块的所有日期,结合这两个属性,可以快速计算出当前点击坐标所代表的具体日期。

如果还有疑问,欢迎继续提问,非常感谢你的支持❤️

from vue3-gantt.

majingtao avatar majingtao commented on August 25, 2024

好的,非常感谢.

from vue3-gantt.

Related Issues (15)

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.