Actions on google 如何在谷歌的基本卡片上添加边框

Actions on google 如何在谷歌的基本卡片上添加边框,actions-on-google,Actions On Google,如谷歌网站上的“行动”中所述,您可以在基本卡上添加边框 我通过下面的代码构建了一张基本卡,它正在工作 conversation.ask(new BasicCard({ text: cardText, subtitle: product.company_name, title: product.name, buttons: new Button({ title: 'View Details', url: deeplink_url,

如谷歌网站上的“行动”中所述,您可以在基本卡上添加边框

我通过下面的代码构建了一张基本卡,它正在工作

 conversation.ask(new BasicCard({
    text: cardText,
    subtitle: product.company_name,
    title: product.name,
    buttons: new Button({
        title: 'View Details',
        url: deeplink_url,
    }),
    image: new Image({
        url: product.image,
        alt: 'Image alternate text',
    }),
}));
谷歌网站上的操作表明,可以通过调用.setImageDisplay方法添加边框,该方法接受字符串作为参数


在上面的代码片段中,我应该在哪里调用此方法?

您链接到的文档是针对客户机库的原始版本的。在我的第1版动作中,我有类似的行

card = app.buildBasicCard()
.setImage(<image_goes_here>, <alternate>, <width>, <height>)
.setImageDisplay('CROPPED');
card=app.buildBasicCard()
.setImage(,)
.setImageDisplay(“裁剪”);
在第二版的动作中,我有这样的动作

card.image = {};
card.image.url = <image_goes_here>;
card.image.width = <width>;
card.image.height = <height>;
card.image.accessibilityText = <alternate_text>;
card.display = 'CROPPED';
...
card = new BasicCard(card);
card.image={};
card.image.url=;
card.image.width=;
card.image.height=;
card.image.accessibilityText=;
card.display=‘裁剪’;
...
卡=新的基本卡(卡);