guoyuji
2024-05-21 9997f9550e12e57a36ac893d6060ec11d08dc87c
添加键盘移动事件
2个文件已修改
14 ■■■■ 已修改文件
north-glass-erp/northglass-erp/src/hook/mouseMove.ts 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/hook/mouseMove.ts
@@ -34,6 +34,9 @@
    //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区域
@@ -308,6 +311,7 @@
    }
}
//表格外销毁范围框
const tableOutDestroyAreaBox = (event: MouseEvent) => {
    var element = getTablexGrid().$el.querySelector(".vxe-table--render-wrapper")
north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue
@@ -117,8 +117,10 @@
  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
@@ -416,9 +418,13 @@
    }
  },
  cellDblclick (params) {//表格内容双击打开产品界面
    const { row } = params
    const { row,column } = params
    console.log(column)
    if(column.field==='productName' || column.field==='productId'){
    productVisible.value = true
    rowIndex=row
    }
  },
  cellClick({ row }){
    rowClickIndex.value = row