【发布时间】:2019-09-30 11:04:00
【问题描述】:
我有一个数据结构,如果我想显示它,它可以选择保存一个值。在我的示例中,它是“数量”字段。但是,如果设置了它,将显示两个块而不是只显示一个。哪里出错了?
{
"when": "${data.quantity === undefined}",
"type": "Text",
"text": "for ${data.price}",
"style": "textStyleDetails"
},
{
"when": "${data.quantity >= 0}",
"type": "Text",
"text": "${data.quantity}x for ${data.price}",
"style": "textStyleDetails"
},
我也试过条件:
data.quantity == 'undefined'!data.quantity(typeOf data.quantity) === 'undefined'
它们都不起作用。
【问题讨论】:
标签: alexa alexa-presentation-language