Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork3.9k
-
I wanted to post it in this old issue but it's closed:#5897 {"devDependencies": {"@ant-design-vue/nuxt":"^1.4.2","nuxt":"^3.11.2","vue":"^3.4.34" },"dependencies": {"ant-design-vue":"^4.2.3","dragula":"^3.7.3", }} // nuxt.config.tsvite:{// https://github.com/bevacqua/dragula/issues/602define:{global:'window'}}, // plugins/dragula.client.jsimportdragulafrom'dragula'import'dragula/dist/dragula.css'exportdefaultdefineNuxtPlugin(()=>{return{provide:{dragula:dragula,},}}) mounted(){const{ $dragula}=useNuxtApp()consttableElement=document.querySelector('table tbody')$dragula([tableElement],{moves:function(el,container,handle){returnhandle.classList.contains('handle')},}).on('dragend',(el,target,source,sibling)=>{// Handle row reorderingconsole.log('Row dropped:',el)})}, |
BetaWas this translation helpful?Give feedback.
All reactions
Replies: 0 comments
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment