1

加载摘要页面本身时,我需要更改“ms.vss-build-web.build-results-section”贡献点的高度。当前,这些值在扩展清单中设置为固定大小,当没有信息显示为摘要时,会导致多余的空白。我无法从 html 级别操作此值,因为摘要页面是在 iFrame 元素内生成的。iFrame 的大小由上层 DIV 元素决定。有没有办法从 VSS.SDK 做到这一点?

延伸点

    {
        "id": "my-build-status-section",
        "type": "ms.vss-build-web.build-results-section",
        "description": "My Summary",
        "targets": [
            ".build-info-tab",
            "ms.vss-build-web.build-results-summary-tab"
        ],
        "properties": {
            "name": "My Summary Section",
            "uri": "TestExtension/MyBuildSummary.html",
            "order": 20,
            "height": 1200,
            "width": 450
        }
    }
4

2 回答 2

2

是的,您可以通过Core SDK 中的resize()方法执行此操作。

首先,"height": 1200,从贡献属性中删除该部分。

然后,在您的 html 页面中调用 resize() 方法。例如,将宽度调整为 450,高度调整为 900:

VSS.resize(450,900); 
于 2016-11-01T09:22:28.370 回答
1
于 2016-10-28T04:46:57.157 回答