vue-grid-layout
vue-grid-layout copied to clipboard
GridItem 中动态绑定 ref,打印出重复多次绑定
Software version (please complete the following information):
- Browser [e.g. chrome, safari]
- Vue Version [e.g. 2.5.7]
- vue-grid-layout Version: [e.g. 2.3.3]
Describe the bug A clear and concise description of what the bug is.
Please use the CodeSandbox Template to demonstrate your bug. It is much easier for us to help you if you do.
To Reproduce Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here.
复现:
<GridLayout :layout="data">
<GridItem
v-for="item in data"
:x="item.x"
:y="item.y"
:w="item.w"
:h="item.h"
:i="item.i"
:key="item.i"
>
<span :ref="setItemRef">{{ console.count() }} --</span>
</GridItem
>
</GridLayout>
我在重新渲染gird-item 后 resized(i) 形参i 传递的参数为累加后的结果(比如之前grid-item是两个 重新请求后gird-item重新生成为三个 这是使用 resized 方法 得到的参数 i ) 并没有重新按照grid-item的顺序从0开始 是什么原因