| | |
| | | import {useI18n} from "vue-i18n" |
| | | import request from "@/utils/request" |
| | | import footSum from "@/hook/footSum"; |
| | | import {addListener} from "@/hook/mouseMove"; |
| | | import {addListener,destroyAreaBox} from "@/hook/mouseMove"; |
| | | const { t } = useI18n() |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | |
| | | rowConfig: {isCurrent: true, isHover: true,height: 30},//鼠标移动或选择高亮 |
| | | virtualScroll: true, // 开启虚拟滚动功能 |
| | | id: 'OrderDetail', |
| | | printConfig: {}, |
| | | importConfig: {}, |
| | | exportConfig: {}, |
| | | scrollY:{ enabled: true,gt:13 },//开启虚拟滚动 |
| | | //scrollX:{ enabled: true,gt:15 },//开启虚拟滚动 |
| | | |
| | |
| | | }, |
| | | mouseConfig:{selected: true},//鼠标选中 |
| | | keyboardConfig:{ |
| | | isArrow: true, |
| | | isDel: true, |
| | | isEnter: true, |
| | | isTab: true, |
| | | isEdit: true, |
| | | isChecked: true |
| | | isArrow: true |
| | | }, |
| | | |
| | | columns:[ |
| | |
| | | } |
| | | |
| | | 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) { |
| | |
| | | |
| | | } |
| | | 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]); |