【发布时间】:2019-12-17 22:09:00
【问题描述】:
有谁知道如何在 Asp.Net Core 中使用 webchat CDN 集成 HostConfig 以设置 AdaptiveCard 的样式?
例如文件名是什么? 它去了哪里等等?
我的项目设置是: 带 Angular 的 Asp.Net Core
【问题讨论】:
标签: angular asp.net-core botframework web-chat
有谁知道如何在 Asp.Net Core 中使用 webchat CDN 集成 HostConfig 以设置 AdaptiveCard 的样式?
例如文件名是什么? 它去了哪里等等?
我的项目设置是: 带 Angular 的 Asp.Net Core
【问题讨论】:
标签: angular asp.net-core botframework web-chat
RenderWebChat 采用一个名为adaptiveCardHostConfig 的参数,您可以在其中传递您的配置。您可以在这里查看网络聊天 API 参考 https://github.com/microsoft/BotFramework-WebChat#web-chat-api-reference
例子
window.WebChat.renderWebChat({
adaptiveCardHostConfig: {
actions: {
actionsOrientation: 'horizontal',
}
},
styleOptions: {
rootHeight: 500,
rootWidth: 500,
},
directLine: dl,
userID: '@Model.UserId',
username: 'User',
locale: 'en-US',
}, document.getElementById('webchat'));
【讨论】: