简体   繁体   English

有没有办法在团队机器人框架的同一行中对齐表格内容?

[英]Is there any way to align the table contents in the same line in the teams bot framework?

The below image shows how the current table is displayed on teams.下图显示了当前表格在团队中的显示方式。 We can see that the cells are not aligned properly.我们可以看到单元格没有正确对齐。 Using adaptive card (columnset).使用自适应卡片(列集)。

The image shows how the cells are not aligned and the separator is jagged.该图像显示了单元格如何不对齐以及分隔符是如何锯齿状的。

Below is the json payload.下面是 json 有效负载。

{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.0",
"body": [
    {
        "type": "ColumnSet",
        "columns": [
            {
                "type": "Column",
                "items": [
                    {
                        "type": "TextBlock",
                        "weight": "bolder",
                        "text": "LMAOOOOOOOOOOOOOOO"
                    },
                    {
                        "type": "TextBlock",
                        "separator":true,
                        "text": "Apple"
                    },{
                        "type": "TextBlock",
                        "separator":true,
                        "text": "Kiwi"
                    }
                ]
            },
            {
                "type": "Column",
                "items": [
                    {
                        "type": "TextBlock",
                        "weight": "bolder",
                        "text": "YEEEEEEEEEEEEEEEEEEEE"
                    },
                    {
                        "type": "TextBlock",
                        "separator":true,
                        "text": "Fruit"
                    },{
                        "type": "TextBlock",
                        "separator":true,
                        "text": "Fruit"
                    }
                ]
            },
            {
                "type": "Column",
                "items": [
                    {
                        "type": "TextBlock",
                        "weight": "bolder",
                        "text": "Price"
                    },
                    {
                        "type": "TextBlock",
                        "separator":true,
                        "text": "2"
                    },{
                        "type": "TextBlock",
                        "separator":true,
                        "text": "1"
                    }
                ]
            }
        ]
    }
]

} }

Is there a way to keep all the rows in the same line.有没有办法将所有行保持在同一行。

I tried it from my end & it's working fine for me:我从头开始尝试过,它对我来说很好用:

在此处输入图片说明

I tried to decrease the browser size and still it's working fine:我试图减小浏览器的大小,但它仍然工作正常: 在此处输入图片说明

I tested it in both Teams Desktop client and browser client and it's working fine for me我在 Teams Desktop 客户端和浏览器客户端中对其进行了测试,对我来说效果很好

Could you please try using below JSON file:您能否尝试使用以下 JSON 文件:

{ "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", "type": "AdaptiveCard", "version": "1.0", "body": [ { "type": "ColumnSet", "columns": [ { "type": "Column", "items": [ { "type": "TextBlock", "weight": "bolder", "text": "LMAOOOOOOOOOOOOOOO", "wrap": true } ] }, { "type": "Column", "items": [ { "type": "TextBlock", "weight": "bolder", "text": "YEEEEEEEEEEEEEEEEEEEE", "wrap": true } ] }, { "type": "Column", "items": [ { "type": "TextBlock", "weight": "bolder", "text": "Price", "wrap": true } ] } ] }, { "type": "ColumnSet", "columns": [ { "type": "Column", "items": [ { "type": "TextBlock", "separator":true, "text": "Apple" },{ "type": "TextBlock", "separator":true, "text": "Kiwi" } ] }, { "type": "Column", "items": [ { "type": "TextBlock", "separator":true, "text": "Fruit" },{ "type": "TextBlock", "separator":true, "text": "Fruit" } ] }, { "type": "Column", "items": [ { "type": "TextBlock", "separator":true, "text": "2" },{ "type": "TextBlock", "separator":true, "text": " { "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", "type": "AdaptiveCard", "version": "1.0", "body": [ { "type": "ColumnSet", "columns": [ { "type": "Column", "items": [ { "type": "TextBlock", "weight": "bolder", "text": "LMAOOOOOOOOOOOOOOO", "wrap ": true } ] }, { "type": "Column", "items": [ { "type": "TextBlock", "weight": "Bolder", "text": "YEEEEEEEEEEEEEEEEEEEE", "wrap": true } ] }, { "type": "Column", "items": [ { "type": "TextBlock", "weight": "bolder", "text": "Price", "wrap": true } ] } ] }, { "type": "ColumnSet", "columns": [ { "type": "Column", "items": [ { "type": "TextBlock", "separator":true, "text ": "Apple" },{ "type": "TextBlock", "separator":true, "text": "Kiwi" } ] }, { "type": "Column", "items": [ { "type ": "TextBlock", "separator":true, "text": "Fruit" },{ "type": "TextBlock", "separator":true, "text": "Fruit" } ] }, { "type": "TextBlock" ": "Column", "items": [ { "type": "TextBlock", "separator":true, "text": "2" },{ "type": "TextBlock", "separator":true, “文本”: ” 1" } ] } ] } ] } 1" } ] } ] } ] }

Let me know if you still need any help on it.如果您还需要任何帮助,请告诉我。

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

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