Commit e3574bd2 by cwq0219

表格组件-优化

1 parent 0f70eae8
......@@ -19,4 +19,4 @@ VUE_APP_MAIN_COLOR=#3D6FE4
VUE_APP_STORAGE_PREFIX=tfims
# 全局变量
VUE_APP_BTN_SIZE=small
\ No newline at end of file
VUE_APP_BTN_SIZE=mini
\ No newline at end of file
......@@ -143,7 +143,8 @@ export default {
},
total: 10,
// 多选数组
mutiSelectArr: {}
mutiSelectArr: {},
dropCols: []
}
},
......@@ -306,6 +307,12 @@ export default {
onStart: evt => {
this.isMove = true
clearTimeout(this.timer)
this.dropCols = [...document.getElementsByClassName('el-table__row')]
this.dropIndex = evt.oldIndex
this.dropCols.forEach(item => {
let nodes = [...item.cells]
nodes[this.dropIndex].className = 'drop-col'
})
},
onEnd: evt => {
if (this.hasNum && evt.newIndex === 0) {
......@@ -317,6 +324,11 @@ export default {
this.tableParams.dropCol.splice(oldIndex, 1)
this.tableParams.dropCol.splice(newIndex, 0, oldItem)
this.isMove = false
this.dropCols.forEach(item => {
let nodes = [...item.cells]
nodes[this.dropIndex].className = ''
})
this.dropCols = []
this.timer = setTimeout(() => {
(!this.isMove) && this.handleSave()
}, 400)
......
......@@ -562,10 +562,6 @@ export default {
prop: 'channelName',
width: this.tdWidth
}, {
label: '商户渠道',
prop: 'channelName',
width: this.tdWidth
}, {
label: '下单客户',
prop: 'merchantName',
width: this.tdWidth
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!