我在2017 TFS工作项表单上有一个按钮。它应该打开一个对话框。
我使用了这个Microsoft文档(https://docs.microsoft.com/en-us/vsts/extend/develop/using-host-dialog)并制作了以下代码:
StackPanel panel = DesignerPanel.panel;
我还在清单中添加了$(us_button[0]).click(function(){
VSS.getService(VSS.ServiceIds.Dialog).then(function(dialogService) {
var extensionCtx = VSS.getExtensionContext();
// Build absolute contribution ID for dialogContent
var contributionId = extensionCtx.publisherId + "." + extensionCtx.extensionId + ".info";
// Show dialog
var dialogOptions = {
title: "My Dialog",
width: 800,
height: 600
};
dialogService.openDialog(contributionId, dialogOptions);
});
});
元素,正如微软指南所示。
它会打开一个窗口,但从不加载页面info
。
调试的唯一内容是info.html
。
清单文件:
(no stack) null
答案 0 :(得分:0)
您没有在info.html中导入扩展程序SDK和<!DOCTYPE html>
<html style="background-color:inherit;height:100%;">
<head>
<title>Continious delivery actions</title>
<script src="dist/VSS.SDK.min.js"></script>
</head>
<body style="background-color:inherit;height:100%;">
<div><table><tr><td>ID</td><td>Поле</td><td>Значение</td></tr></table></div>
<script>
VSS.init();
</script>
</body>
</html>
方法。将其更新到下面,然后再试一次:
before_cursor_execute