Skip to content

trackExpression渲染两次office #15772

@hdthhh

Description

@hdthhh

描述问题:

当我在一个page里添加office-viewer和initapi时,因为返回的数据是多个对象和数组的混合,但是对象能正常显示,数组会不显示,所以添加了trackExpression,但是又出现新问题,office-viewer的文档渲染了两次,这个是为什么,怎么样能解决这个问题

截图或视频:

Image

如何复现(请务必完整填写下面内容):

  1. 你是如何使用 amis 的?
    sdk

  2. amis 版本是什么?请先在最新 beta 版本测试问题是否存在
    v6.11.0

  3. 粘贴有问题的完整 amis schema 代码:

{
  "type": "page",
  "body": {
    "type": "form",
    "initApi": {
      "url": "/business/api/unit",
      "method": "get",
      "dataType": "form",
    },
    "api": {
      "url": "/business/api/unit",
      "method": "get",
      "dataType": "form",
    },
    "title": "业务表单",
    "data": {
    },
    "body": [
      {
        "type": "office-viewer",
        "id": "office-viewer",
        "src": "/meta-reportStyle/1897850782246506497/style.doc",
        "wordOptions": {
          "enableVar": true,
          "padding": "8px"
        }
        ,"trackExpression": "${dw_1}",
      }
    ],
    "actions": []
  }
}
  1. 操作步骤
    请简单描述一下复现的操作步骤...

Metadata

Metadata

Assignees

No one assigned

    Labels

    docoptimizing documentneed confirmspamAuto-marked as spamstyleBug or PR related to component's style

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions