mirror of
https://github.com/pipipi-pikachu/PPTist.git
synced 2025-04-15 02:20:00 +08:00
fix: 新建表格的单元格ID重复
This commit is contained in:
parent
4412af30bb
commit
d669404c92
@ -103,8 +103,14 @@ export default () => {
|
||||
fontname: fontName.value,
|
||||
color: fontColor.value,
|
||||
}
|
||||
const rowCells: TableCell[] = new Array(col).fill({ id: createRandomCode(), colspan: 1, rowspan: 1, text: '', style })
|
||||
const data: TableCell[][] = new Array(row).fill(rowCells)
|
||||
const data: TableCell[][] = []
|
||||
for (let i = 0; i < row; i++) {
|
||||
const rowCells: TableCell[] = []
|
||||
for (let j = 0; j < col; j++) {
|
||||
rowCells.push({ id: createRandomCode(), colspan: 1, rowspan: 1, text: '', style })
|
||||
}
|
||||
data.push(rowCells)
|
||||
}
|
||||
|
||||
const DEFAULT_CELL_WIDTH = 100
|
||||
const DEFAULT_CELL_HEIGHT = 36
|
||||
|
Loading…
x
Reference in New Issue
Block a user