数组上下移动

swapItems(arr, index1, index2) {
    arr[index1] = arr.splice(index2, 1, arr[index1])[0];
    return arr;
},
upStep(index) {
   const newArray = this.swapItems(this.paramTbObj.dataList, index, index - 1);
},
downStep(index) {
   const newArray = this.swapItems(this.paramTbObj.dataList, index, index + 1);
},

数组上下移动

上一篇:vue使用domtoimage实现移动端H5页面截图


下一篇:Xamarin Forms Prism Navigation from TabbedPage behaves as PushModelAsync or the navigation bar disappears