| | |
| | | keyboardConfig:{ |
| | | isArrow: true, |
| | | isDel: true, |
| | | isEnter: true, |
| | | //isEnter: true, |
| | | isTab: true, |
| | | isEdit: true, |
| | | isChecked: true |
| | |
| | | } |
| | | if(evnt.$event.keyCode === 13 ){ |
| | | const { rowIndex,row,column } = xGrid.value.getSelectedCell() || xGrid.value.getEditRecord() |
| | | let nextRowIndex = xGrid.value.getRowIndex(row) + 1; |
| | | if (nextRowIndex < xGrid.value.getTableData().fullData.length) { |
| | | let nextRowIndex = xGrid.value.getRowIndex(row) + 1 |
| | | |
| | | |
| | | switch (column.field){ |
| | | case 'width': |
| | | xGrid.value.setSelectCell(row, 'height') |
| | | break; |
| | | case 'height': |
| | | xGrid.value.setSelectCell(row, 'quantity') |
| | | break; |
| | | case 'quantity': |
| | | if(nextRowIndex === length){ |
| | | xGrid.value.insertAt({}, xGrid.value.getTableData.length || -1) |
| | | } |
| | | const nextRow = xGrid.value.getTableData().fullData[nextRowIndex] |
| | | xGrid.value.setCurrentRow(nextRow) |
| | | xGrid.value.scrollToRow(nextRow) |
| | | xGrid.value.setSelectCell(nextRow, 'width') |
| | | break; |
| | | default: |
| | | /*if (nextRowIndex < length) { |
| | | const nextRow = xGrid.value.getTableData().fullData[nextRowIndex] |
| | | xGrid.value.setCurrentRow(nextRow) |
| | | xGrid.value.scrollToRow(nextRow) |
| | | xGrid.value.setSelectCell(nextRow, column.field) |
| | | }*/ |
| | | if(nextRowIndex === length){ |
| | | xGrid.value.insertAt({}, xGrid.value.getTableData.length || -1) |
| | | } |
| | | const nextRow1 = xGrid.value.getTableData().fullData[nextRowIndex] |
| | | xGrid.value.setCurrentRow(nextRow1) |
| | | xGrid.value.scrollToRow(nextRow1) |
| | | xGrid.value.setSelectCell(nextRow1, column.field) |
| | | break; |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | /*if (nextRowIndex < xGrid.value.getTableData().fullData.length) { |
| | | xGrid.value.setCurrentRow(xGrid.value.getTableData().fullData[nextRowIndex]); |
| | | } |
| | | if(rowIndex === length-1){ |
| | | xGrid.value.insertAt({}, xGrid.value.getTableData.length || -1) |
| | | } |
| | | }*/ |
| | | |
| | | } |
| | | if(evnt.$event.keyCode === 38 ){ |