| | |
| | | //cellarea.value = newElement |
| | | //添加多选列 |
| | | nextTick(() => { |
| | | window.addEventListener("keypress", (event)=>{ |
| | | destroyAreaBox() |
| | | }) |
| | | window.addEventListener("mousedown", tableOutDestroyAreaBox)//给window添加鼠标按下事件,判断是否在表格外,是销毁 |
| | | window.addEventListener("mouseup", tbodymouseup)//给window添加鼠标松开事件 |
| | | let tbody = getTablexGrid().$el.querySelector(".vxe-table--main-wrapper table tbody")//获取tbody区域 |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | //表格外销毁范围框 |
| | | const tableOutDestroyAreaBox = (event: MouseEvent) => { |
| | | var element = getTablexGrid().$el.querySelector(".vxe-table--render-wrapper") |
| | |
| | | customConfig: { |
| | | storage: true |
| | | }, |
| | | mouseConfig:{selected: true},//鼠标选中 |
| | | keyboardConfig:{isArrow: true, isDel: true, isEnter: true, isTab: true, isEdit: true, isChecked: true}, |
| | | editConfig: { |
| | | trigger: 'click', |
| | | trigger: 'dblclick', |
| | | mode: 'cell', |
| | | showStatus: true, |
| | | showIcon:false |
| | |
| | | } |
| | | }, |
| | | cellDblclick (params) {//表格内容双击打开产品界面 |
| | | const { row } = params |
| | | productVisible.value = true |
| | | rowIndex=row |
| | | const { row,column } = params |
| | | console.log(column) |
| | | if(column.field==='productName' || column.field==='productId'){ |
| | | productVisible.value = true |
| | | rowIndex=row |
| | | } |
| | | |
| | | }, |
| | | cellClick({ row }){ |
| | | rowClickIndex.value = row |