我现在想在我的 Zendesk 自定义应用程序中实现弹出窗口的小功能。我希望这个弹出窗口不仅出现在我的嵌入式应用程序中,而且出现在整个页面的中间。
我该怎么做,我在Zendesk文档中没有看到解决方案。如果有人可以帮助我,我将非常感激
Zendesk ZAF 客户端 API,由在 iframe 中运行的自定义应用程序用来与主机 Zendesk 实例进行通信,它确实提供了一种在主机 Zendesk 实例中创建模式的方法(即“在整个页面的中间”,如下所示):你放它)
Zendesk 文档中的示例:
var client = ZAFClient.init();
client.invoke('instances.create', {
location: 'modal',
url: 'https://en.m.wikipedia.org/wiki/Main_Page',
size: { // optional
width: '450px',
height: '300px'
}
}).then(function(modalContext) {
// The modal is on screen now
var modalClient = client.instance(modalContext['instances.create'][0].instanceGuid);
modalClient.on('modal.close', function() {
// The modal has been closed
});
完整文档可在此处获取。