|
@ -126,6 +126,7 @@ const emit = defineEmits<{ |
|
|
(e: 'change'): void |
|
|
(e: 'change'): void |
|
|
(e: 'expand', data: INiuTreeData): void |
|
|
(e: 'expand', data: INiuTreeData): void |
|
|
(e: 'itemDragstart'): void |
|
|
(e: 'itemDragstart'): void |
|
|
|
|
|
(e: 'itemDragend'): void |
|
|
}>() |
|
|
}>() |
|
|
|
|
|
|
|
|
const dataSourceKey = ref() |
|
|
const dataSourceKey = ref() |
|
@ -135,6 +136,7 @@ function onDragstart(key: INiuTreeKey) { |
|
|
} |
|
|
} |
|
|
function onDragEnd(key: INiuTreeKey) { |
|
|
function onDragEnd(key: INiuTreeKey) { |
|
|
dataSourceKey.value = undefined |
|
|
dataSourceKey.value = undefined |
|
|
|
|
|
emit("itemDragend") |
|
|
} |
|
|
} |
|
|
async function onDrop(key: INiuTreeKey, status?: ENiuTreeStatus) { |
|
|
async function onDrop(key: INiuTreeKey, status?: ENiuTreeStatus) { |
|
|
if (!dataSourceKey.value) return |
|
|
if (!dataSourceKey.value) return |
|
|