fix: 表格单元格内输入文字时,表格数据更新异常(#37)

This commit is contained in:
pipipi-pikachu 2021-06-09 23:45:53 +08:00
parent f4e64cec73
commit 8b15e02a17
2 changed files with 2 additions and 1 deletions

View File

@ -505,7 +505,7 @@ export default defineComponent({
//
const handleInput = debounce(function(value, rowIndex, colIndex) {
tableCells.value = tableCells.value[rowIndex][colIndex].text = value
tableCells.value[rowIndex][colIndex].text = value
emit('change', tableCells.value)
}, 300, { trailing: true })

View File

@ -151,6 +151,7 @@ export default defineComponent({
//
const updateTableCells = (data: TableCell[][]) => {
console.log(data)
store.commit(MutationTypes.UPDATE_ELEMENT, {
id: props.elementInfo.id,
props: { data },