Git Product home page Git Product logo

Comments (11)

w1301625107 avatar w1301625107 commented on May 20, 2024

拖动效果你可以尝试用vue-dragable(好像是这个)去包裹你的自定义组件,但是可能需要自己实现拖动后的数据同步一致的问题

from vue-gantt-chart.

dqiang avatar dqiang commented on May 20, 2024

vue-dragable 主要 列表拖动,我想实现可以甘特条可以横向拖动,纵向不同行拖动,横向拖动行内位置任意放置,有一个方案是用jquery-ui的drag,但是我不知道还有没有其他好的方法,大佬能给点建议嘛,谢谢啦~~

from vue-gantt-chart.

w1301625107 avatar w1301625107 commented on May 20, 2024

我也只是个刚入门的前端啦。之前我也是用的jquery-ui,目前我也不知道其他方法。要注意一点就是纵向不同行拖动,目的行不在可视范围内,因为虚拟列表的原因,你拖动的甘特条可能会不见了,你需要改一下源码
image

from vue-gantt-chart.

w1301625107 avatar w1301625107 commented on May 20, 2024

还有横向拖动同样也有这个问题,默认是显示可视时间轴部分的,这个你在slot里判断就可以了。

但是对于拖动这个需求,之前我们考虑后还是取消了,因为拖动不够精确,还有碰撞,覆盖等问题,有精度要求还是弹窗输入更精准的值更好

from vue-gantt-chart.

dqiang avatar dqiang commented on May 20, 2024

嗯,拖动会有碰撞,即单行会出现甘特条并排显示,每一行高度要重新计算,且每个甘特条的top也要计算,左侧任务栏行高也是同步的。

from vue-gantt-chart.

w1301625107 avatar w1301625107 commented on May 20, 2024

我这个对动态对行高是不支持,因为甘特条都是绝对定位的,每个行高都是固定的,所以你需要考虑下

from vue-gantt-chart.

dqiang avatar dqiang commented on May 20, 2024

嗯,我看你您的代码了,这块儿就是得要修改一下,我先尝试修改下。

from vue-gantt-chart.

wenxiuwang avatar wenxiuwang commented on May 20, 2024

拖动功能实现了吗

from vue-gantt-chart.

L3gacy03 avatar L3gacy03 commented on May 20, 2024

我用的是原生JS实现了拖拽

from vue-gantt-chart.

ZedCoding avatar ZedCoding commented on May 20, 2024

@L3gacy03 可以同意下qq好友嘛 想请教下

from vue-gantt-chart.

kang-int avatar kang-int commented on May 20, 2024

@L3gacy03 可以交流一下吗

from vue-gantt-chart.

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.