这些天我们开始看到一个奇怪的问题。自适应卡片在频道的预览模式下不可见,但在聊天中可见。我测试了一张只有一个文本的最低自适应卡,我看到了相同的行为。
在聊天中
在频道中:
它完全空白。但是,当您单击发送时,卡片会在聊天中完美发布。
这是代码:
import { Attachment, CardFactory } from "botbuilder";
export class CustomerResultCard {
public static getCard(type: string): Attachment {
const card = CardFactory.adaptiveCard(
{
"type": "AdaptiveCard",
"body": [
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"width": "stretch",
"items": [
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"items": [
{
"type": "TextBlock",
"size": "Large",
"weight": "Bolder",
"text": "Entity Type:" +type+ " not supported",
"height": "stretch"
}
],
"height": "stretch",
"style": "default",
"width": 65
}
],
"height": "stretch"
}
],
"style": "default"
}
]
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.3"
}
);
return card;
}
}