Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

插入的表格高度超过2页时,第三页内容不展示 #228

Closed
guangze233 opened this issue Jul 31, 2023 · 1 comment
Closed

插入的表格高度超过2页时,第三页内容不展示 #228

guangze233 opened this issue Jul 31, 2023 · 1 comment

Comments

@guangze233
Copy link

version

0.9.41

Link to minimal reproduction

No response

Steps to reproduce

分页模式下

  1. executeInsertTable 命令插入表格
instance.command.executeInsertTable(100, 6)
  1. 或者executeAppendElementList 方法插入表格,代码插入表格 6列 100行
onInsertCustomTable () {
      const table = {
        value: '',
        type: 'table',
        trList: [
        ],
        width: 558,
        height: 42,
        colgroup: []
      }

      // colgroup
      const colgroup = []
      const colNum = 6
      for (let i = 0; i < colNum; i++) {
        colgroup.push({
          width: 558 / colNum
        })
      }
      table.colgroup = colgroup

      // trList
      const rowNum = 100
      for (let i = 0; i < rowNum; i++) {
        const trList = {
          height: 42,
          tdList: []
        }
        for (let j = 0; j < colNum; j++) {
          const td = {
            colspan: 1,
            rowspan: 1,
            value: `${i + 1}-${j + 1}`
          }
          trList.tdList.push(this.getCell(td))
        }
        table.trList.push(trList)
      }

      // insert table
      this.$refs.CanvasEditor.instance.command.executeAppendElementList([table])
    }

What is expected?

插入行列数正确的表格
表格30

What is actually happening?

  1. 执行插入指令

  2. 插入的表格过高时(高度超过两页,可能原因:行过多、单元格内容高度过多=高),编辑器中的表格截断多余行;
    表格60行 -- 1

  3. 此时鼠标点击第二页表格中的单元格,编辑器变化,展示表格外框,但不展示page

表格60 -- 2

System Info

No response

Any additional comments?

相似问题: #41

@Hufe921
Copy link
Owner

Hufe921 commented Jul 31, 2023

相同问题,请等待后续方案

@Hufe921 Hufe921 closed this as completed Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants