u
This commit is contained in:
1 parent
e7c84a82a2
commit
025d3232c4
65 files changed
+9838
-9111
No files matched your search
@@ -43,9 +43,10 @@ const dragData = ref<TableRow[]>([
|
||||
|
||||
const orderText = ref('')
|
||||
|
||||
function onRowOrderChange(rows: TableRow[], sourceIndex: number, targetIndex: number) {
|
||||
// ⚠️ 后两个参数是**行 key**(底座的 dragStartKey / targetRowKey),不是索引。
|
||||
function onRowOrderChange(rows: TableRow[], dragStartKey: string | number, targetRowKey: string | number) {
|
||||
dragData.value = rows
|
||||
orderText.value = `${sourceIndex} → ${targetIndex}:${rows.map((r) => r.name).join(' → ')}`
|
||||
orderText.value = `${dragStartKey} → ${targetRowKey}:${rows.map((r) => r.name).join(' → ')}`
|
||||
}
|
||||
|
||||
// 当前列宽(演示 v-model:columns 的回写确实发生了)
|
||||
|
||||
Reference in new issue
Block a user