vue-devui icon indicating copy to clipboard operation
vue-devui copied to clipboard

🐛 [Bug]: Modal拖拽异常

Open Zz-ZzzZ opened this issue 2 years ago • 1 comments

Version

latest

Vue Version

latest

Link to minimal reproduction

https://vue-devui.github.io/components/modal/

Step to reproduce

打开modal并拖拽

What is expected

正常拖拽

What is actually happening

第一次拖拽时发生了不正确的偏移,请看下图

20220923_153538

Any additional comments (optional)

No response

Zz-ZzzZ avatar Sep 23 '22 07:09 Zz-ZzzZ

看了一下代码,是使用top/left transform来做的居中,由于初始设置了transform: translate(-50%, -50%),而开始拖拽那一刻开始重新设置了translate覆盖了原本的定位数值,导致了位置偏移异常

Zz-ZzzZ avatar Sep 23 '22 08:09 Zz-ZzzZ

Fixed by @wowCheng on #1364

kagol avatar Sep 28 '22 08:09 kagol