arco-design-vue icon indicating copy to clipboard operation
arco-design-vue copied to clipboard

[a-table]树形表格中的拖拽

Open ouyangzx opened this issue 3 years ago • 1 comments

Basic Info

Package Name And Version: @arco-design/[email protected] Browser: chrome103.0.0.0

What are the similar cases of this feature

在[a-tree]中有相同的实现 1657079437272

What problem does this feature solve?

现状: 拖拽行后,通过@change事件,获得变更后的数据data: TableData[],和拖拽节点extra: TableChangeExtra image

新情况: 在树形表格中的拖拽时, 1.不能获取拖拽节点的起始位置和停留位置, 2.不能获取拖拽节点是否变更层级

ouyangzx avatar Jul 06 '22 03:07 ouyangzx

我找到了新的实现方式

自定义solt #tr , 给tr 加上拖拽事件

<template #tr="{ record }"> <tr draggable="true" @dragstart="handleDragstart(record)" @drop.prevent="handleDrop()" @dragover.prevent="handleDragover(record)" >

ouyangzx avatar Jul 06 '22 15:07 ouyangzx