简体   繁体   English

如何增加自适应卡的大小?

[英]how to increase the size of the adaptive card?

I have used an adaptive card to show data on a table format.我使用自适应卡以表格格式显示数据。 There are four columns showed on the adaptive card.自适应卡上显示了四列。 On Bot framework emulator it shows proper data as shown image.在 Bot 框架模拟器上,它显示正确的数据,如图所示。 On bot framework emulator it shows proper column data.在机器人框架模拟器上,它显示正确的列数据。 But when it deployed on teams, Its last column data get truncated, How to solve it?但是当它部署在团队中时,它的最后一列数据被截断了,如何解决? how to increase the size of the adaptive card?如何增加自适应卡的大小?

BotframeworkImage

团队形象

The width of Adaptive Cards in the Teams client is determined by the Teams client itself based on the current viewing area width - you cannot directly influence this value. Teams 客户端中自适应卡片的宽度由 Teams 客户端本身根据当前查看区域宽度确定 - 您不能直接影响此值。 To make that card work you're going to need to explore alternative methods (shortening the format of the date field looks like it should get you there, at least on desktop clients).要使该卡工作,您将需要探索替代方法(缩短日期字段的格式看起来应该可以让您到达那里,至少在桌面客户端上)。 I'd make sure you're using the card editor available in App Studio to test your card designs, and actually sending them to yourself so that you can test them across the various clients (web, desktop, Android, iOS).我会确保您使用 App Studio 中提供的卡片编辑器来测试您的卡片设计,并将它们实际发送给自己,以便您可以在各种客户端(Web、桌面、Android、iOS)上测试它们。

The "Full Width" Adaptive Card functionality was released at some point and is now available. “全宽”自适应卡片功能在某个时候发布,现在可用。 I haven't tested it with columns like you're using, but it might help with this situation.我没有像您使用的那样使用列对其进行测试,但它可能对这种情况有所帮助。

Microsoft has documented how it works:微软已经记录了它的工作原理:

Constructing full width cards 构建全宽卡片

To make a full width Adaptive card the width object in msteams property in the card content must be set to Full.要制作全宽自适应卡片,卡片内容中msteams属性中的宽度对象必须设置为 Full。 In addition, your app must include the following elements:此外,您的应用必须包含以下元素:

{
    "type": "AdaptiveCard",
    "body": [{
        "type": "Container",
        "items": [{
            "type": "TextBlock",
            "text": "Digest card",
            "size": "Large",
            "weight": "Bolder"
        }]
    }],

    "msteams": {
        "width": "Full"
    },
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.2"
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM