UNPKG

xdesign-vue-next

Version:

XDesign Component for vue-next

24 lines (20 loc) 662 B
/** * xdesign v1.0.6 * (c) 2023 xdesign * @license MIT */ import { _ as _toConsumableArray } from '../../../_chunks/dep-5bec687c.mjs'; import '../../../_chunks/dep-89b966f4.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