1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | 4× 4× 4× 8× 8× 6× 1× | import { BlockNode } from '../../model' class Table extends BlockNode { getRowCount() { return this.cells.length } getColCount() { Eif (this.cells.length > 0) { return this.cells[0].length } else { return 0 } } getCellAt(row, col) { let cellId = this.cells[row][col] if (cellId) { return this.document.get(cellId) } } } Table.schema = { type: 'table', cells: { type: ['array', 'array', 'id'], default: [], owned: true } } export default Table |