UNPKG

tdesign-mobile-vue

Version:
24 lines (20 loc) 669 B
/** * tdesign v1.15.0 * (c) 2026 TDesign Group * @license MIT */ import { _ as _toConsumableArray } from '../../../_chunks/dep-10e61c44.mjs'; import '../../../_chunks/dep-8efef78c.mjs'; function swapDragArrayElement(data, currentIndex, targetIndex) { var newData = _toConsumableArray(data); if (targetIndex - currentIndex > 0) { newData.splice(targetIndex + 1, 0, newData[currentIndex]); newData.splice(currentIndex, 1); } else { newData.splice(targetIndex, 0, newData[currentIndex]); newData.splice(currentIndex + 1, 1); } return newData; } export { swapDragArrayElement as default }; //# sourceMappingURL=swapDragArrayElement.mjs.map