(e)
| 1615 | } |
| 1616 | |
| 1617 | function handleDrop(e) { |
| 1618 | if (e.stopPropagation) { |
| 1619 | e.stopPropagation(); |
| 1620 | } |
| 1621 | |
| 1622 | const targetIndex = parseInt(this.dataset.index); |
| 1623 | if (draggedIndex !== targetIndex) { |
| 1624 | reorderCategoriesAfterDrag(draggedIndex, targetIndex); |
| 1625 | } |
| 1626 | |
| 1627 | // 清理样式 |
| 1628 | document.querySelectorAll('.category-item-drag-over').forEach(el => { |
| 1629 | el.classList.remove('category-item-drag-over'); |
| 1630 | }); |
| 1631 | |
| 1632 | return false; |
| 1633 | } |
| 1634 | |
| 1635 | function handleDragEnd() { |
| 1636 | this.classList.remove('category-item-dragging'); |
nothing calls this directly
no test coverage detected