|
|
|
@ -562,11 +562,6 @@ import { Item } from 'ant-design-vue/lib/menu'
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
afterSelectionEnd: function (isStance, col) {
|
|
|
|
|
// if (col == 4 || col == 5 || col == 6) {
|
|
|
|
|
// hotTb.value.hotInstance.getActiveEditor().beginEditing()
|
|
|
|
|
// }
|
|
|
|
|
},
|
|
|
|
|
columns: columns,
|
|
|
|
|
// 此行直接复制,必须(非商用)
|
|
|
|
|
licenseKey: 'non-commercial-and-evaluation',
|
|
|
|
@ -1087,6 +1082,7 @@ import { Item } from 'ant-design-vue/lib/menu'
|
|
|
|
|
exchangeRateList = res.data
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
const editKeyCode = [33, 34, 35, 36, 37, 38, 39, 40, 46, 16 ,17, 18]
|
|
|
|
|
// 增加行
|
|
|
|
|
const add = () => {
|
|
|
|
|
const hot = hotTb.value.hotInstance
|
|
|
|
@ -1144,7 +1140,21 @@ import { Item } from 'ant-design-vue/lib/menu'
|
|
|
|
|
}
|
|
|
|
|
// 数据初始化
|
|
|
|
|
if (props.isShowBtn) init()
|
|
|
|
|
// 处理输入法第一个字母失效
|
|
|
|
|
document.addEventListener('keyup', handKeyUp, false)
|
|
|
|
|
document.addEventListener('mousedown', handKeyDown, false)
|
|
|
|
|
})
|
|
|
|
|
const handKeyUp = (event) => {
|
|
|
|
|
if (editKeyCode.indexOf(event.keyCode) > -1) {
|
|
|
|
|
hotTb.value.hotInstance.removeHook('afterSelectionEnd', afterSelect)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
const handKeyDown = (event) => {
|
|
|
|
|
hotTb.value.hotInstance.removeHook('afterSelectionEnd', afterSelect)
|
|
|
|
|
}
|
|
|
|
|
const afterSelect = () => {
|
|
|
|
|
hotTb.value.hotInstance.getActiveEditor().beginEditing()
|
|
|
|
|
}
|
|
|
|
|
// 实时更新表格列
|
|
|
|
|
const updateCol = (list) => {
|
|
|
|
|
hotTb.value.hotInstance.updateSettings({
|
|
|
|
|