Alfred-Skyblue / vue-draggable-plus

Universal Drag-and-Drop Component Supporting both Vue 3 and Vue 2
https://vue-draggable-plus.pages.dev/en/
MIT License
2.72k stars 106 forks source link

TDesign 里的表格组件使用出现问题 #63

Closed Mophar-gift closed 7 months ago

Mophar-gift commented 7 months ago

如图所示,在使用 TDesign 组件库里的 t-table 表格组件时,依据文档里说的指定了 target 属性,发现依旧无法拖动。

image image

使用环境:

"tdesign-vue-next": "^1.7.0", "vue-draggable-plus": "^0.2.7", "vue": "^3.3.8",

Alfred-Skyblue commented 7 months ago

target=".t-table__body"

Alfred-Skyblue commented 7 months ago

Please carefully read the documentation; the target parameter must receive the selector of the parent element of the draggable list. https://alfred-skyblue.github.io/vue-draggable-plus/demo/target-container/

Mophar-gift commented 7 months ago

target=".t-table__body"

不好意思,我的图片上传错了,应该是这两张,类名没有写错的,但还是没有效果 image image

Alfred-Skyblue commented 7 months ago

https://stackblitz.com/edit/vitejs-vite-gpgsrs?file=src%2FApp.vue

@Mophar-gift 请尝试关闭 lazy-load 否则根据TDesign的懒加载机制,将会导致 dom 在 onMounted 声明周期中获取不到

Mophar-gift commented 7 months ago

https://stackblitz.com/edit/vitejs-vite-gpgsrs?file=src%2FApp.vue

@Mophar-gift 请尝试关闭 lazy-load 否则根据TDesign的懒加载机制,将会导致 dom 在 onMounted 声明周期中获取不到

感谢您的解答! 关闭 lazy-load 是有效的。