vue-drag-resize icon indicating copy to clipboard operation
vue-drag-resize copied to clipboard

拖动的时候对移动的区域做限制,如果拖动y小于某个值,重新设置y的值,但是无法生效

Open alicecoding opened this issue 5 years ago • 5 comments

alicecoding avatar Dec 08 '20 02:12 alicecoding

dragstop(ev)里面对获取的到ev.top判断,如果小于某个值(比如100),就设置为 100,然后vuex重新设置组件的y属性, 打印设置后的y是100,但是页面上组件的位置还是拖动的位置(小于100),这个要怎么解决呢

alicecoding avatar Dec 08 '20 02:12 alicecoding

dragstop(ev)里面对获取的到ev.top判断,如果小于某个值(比如100),就设置为 100,然后vuex重新设置组件的y属性, 打印设置后的y是100,但是页面上组件的位置还是拖动的位置(小于100),这个要怎么解决呢

using refs set the transform style of the drag element, like this:

<vue-draggable-resizable ref="dragEl"> ... </vue-draggable-resizable>

DarwinniwraD avatar May 20 '21 07:05 DarwinniwraD

dragstop(ev)里面对获取的到ev.top判断,如果小于某个值(比如100),就设置为 100,然后vuex重新设置组件的y属性, 打印设置后的y是100,但是页面上组件的位置还是拖动的位置(小于100),这个要怎么解决呢

using refs set the transform style of the drag element, like this:

<vue-draggable-resizable ref="dragEl"> ... </vue-draggable-resizable>

good

wpz614467735 avatar Aug 26 '21 08:08 wpz614467735

您好,打扰一下,我按照这个办法限制了拖拽区域,但是拖到边界点之后,拖动的元素尺寸发生变化了,您有遇到这个问题吗?是怎么解决的呢?

peachapp avatar Sep 13 '23 07:09 peachapp