rowDrop() {
const _this = this
this.$nextTick(() => {
const tbody = document.querySelector(
'#test .el-table__body-wrapper tbody'
)
if (tbody) {
console.log(tbody, 333)
Sortable.create(tbody, {
onEnd({
newIndex,
oldIndex
}) {
const currRow = _this.tableData1.splice(oldIndex, 1)[0]
_this.tableData1.splice(newIndex, 0, currRow)
console.log(_this.tableData1, '111')
},
})
}
})
},
在element 中使用sort.js
未经允许不得转载:搜云库技术团队 » 在element 中使用sort.js