Microsoft Bot框架中的自适应卡设计中的问题

时间:2019-07-04 02:22:12

标签: node.js typescript

我们正在使用Microsoft bot框架V3和打字稿,并在设计自适应卡时遇到了以下问题 1.UI端卡渲染失败当我们使用“ width”:“ 80px”或width:1进行对齐时。

  1. 红色不能正确显示(“ color”:“ Attention”),它将变成砖红色

{

'contentType': 'application/vnd.microsoft.card.adaptive',
'content': {
    '$schema': 'http://adaptivecards.io/schemas/adaptive-card.json',
    'type': 'AdaptiveCard',
    'version': '1.0',
    'body': [
      {
            "type": "ColumnSet",
            "separator": true,
            "columns": [

                {
                    "type": "Column",
                    "style": "emphasis",
                    "items": [
                        {
                            "type": "TextBlock",
                            "horizontalAlignment": "Left",
                            "spacing": "Small",
                            "size": "Small",
                            "color": "Dark",
                            "text": "Company",
                            "isSubtle": true,
                            "wrap": true
                        },
                        {
                            "type": "TextBlock",
                            "horizontalAlignment": "Left",
                            "spacing": "Small",
                            "size": "Small",
                            "color": "Dark",
                            "text": "PO Number",
                            "isSubtle": true,
                            "wrap": true
                        },
                        {
                            "type": "TextBlock",
                            "horizontalAlignment": "Left",
                            "spacing": "Small",
                            "size": "Small",
                            "color": "Dark",
                            "text": "Status",
                            "isSubtle": true,
                            "wrap": true
                        }
                    ],
                    "width": "80px"
                },
                {
                    "type": "Column",
                    "style": "emphasis",
                    "items": [
                        {
                            "type": "TextBlock",
                            "horizontalAlignment": "Left",
                            "spacing": "Small",
                            "size": "Small",
                            "weight": "Bolder",
                            "text": "ABC.COM",
                            "wrap": true
                        },
                        {
                            "type": "TextBlock",
                            "horizontalAlignment": "Left",
                            "spacing": "Small",
                            "size": "Small",
                            "weight": "Bolder",
                            "text": "200123456",
                            "wrap": true
                        },
                        {
                            "type": "TextBlock",
                            "horizontalAlignment": "Left",
                            "spacing": "Small",
                            "size": "Small",
                            "weight": "Bolder",
                            "text": "canceled",
                            "wrap": true,
                            "color": "Attention"
                        }
                    ],
                    "width": "stretch"
                }
            ]
        }
    ]
}

};

0 个答案:

没有答案