vue-drag-resize
vue-drag-resize copied to clipboard
some issues (一些问题)
use this code No effect. I think is that can drag at regular intervals.(使用以下代码没有任何效果,我的理解是可以按照固定的间隔拖拽)
:snapToGrid="true" :gridX="iw" :gridY="ih"
When we use V-for loop, we use: x y to locate the location. When we delete one, we will find that the location will change, but the value has not changed. Why?
(当我们用v-for循环使用的时候,使用:x y来定位位置,当我们删除一个的时候,会发现定位的位置会发生改变,但是值并没有改变,为什么?)
<VueDragResize v-for="(item,index) in detail" :isActive="true" :w="iw*item.width" :h="ih*item.height" :x="iw*item.left" :y="ih*item.top" :snapToGrid="true" :gridX="iw" :gridY="ih" :isResizable="false" parentLimitation :isDraggable="item.width!=12" v-on:dragstop="stopDrag" @clicked="clicked(item)"> <div class="itemLayout" :style="{width:iw*item.width+'px',height: ih*item.height+'px' }"> {{item.name}} <Icon ref="delete" type="ios-backspace" class="itemDelete" size="22" @click="delte(index)"></Icon> </div> </VueDragResize>
<没有删除前 before>
<删除后 after>
the same problem as yrs
Hello, I meet the same problem as you, has this problem been solved?
I got the same issue, is there any updates plan to fix this ?
try setting a :key that is unique and not the array index
我找到原因了:如果是数组 :key=index? index 没有变化,造成vue cache了?主要使用一个唯一的标识就可以了
已经解决!