| | |
| | | customConfig: { |
| | | storage: true |
| | | }, |
| | | mouseConfig:{selected: true},//鼠标选中 |
| | | keyboardConfig:{ |
| | | isArrow: true, |
| | | isDel: true, |
| | | isEnter: true, |
| | | isTab: true, |
| | | isEdit: true, |
| | | isChecked: true |
| | | }, |
| | | |
| | | columns:[ |
| | | {type: 'seq', title: t('basicData.Number'), width: 80 }, |
| | |
| | | }) |
| | | } |
| | | |
| | | const handleKeyDown = (evnt) =>{ |
| | | |
| | | if(evnt.$event.keyCode === 38 ){ |
| | | let nextRowIndex = xGrid.value.getRowIndex(xGrid.value.getCurrentRecord()) - 1; |
| | | if (nextRowIndex < xGrid.value.getTableData().fullData.length && nextRowIndex>=0) { |
| | | xGrid.value.setCurrentRow(xGrid.value.getTableData().fullData[nextRowIndex]); |
| | | } |
| | | |
| | | } |
| | | if(evnt.$event.keyCode === 40 ){ |
| | | let nextRowIndex = xGrid.value.getRowIndex(xGrid.value.getCurrentRecord()) + 1; |
| | | if (nextRowIndex < xGrid.value.getTableData().fullData.length) { |
| | | xGrid.value.setCurrentRow(xGrid.value.getTableData().fullData[nextRowIndex]); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | </script> |
| | |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | | @keydown="handleKeyDown" |
| | | > |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |