我的应用程序基本上为用户提供了三种选择。
1:我正在使用result-view
和cell-card
。当我使用每个卡片时,我能够点击卡片并触发一个意图,该意图以compound-card
. 现在,为了让用户通过说第一、第二或第三来选择选项,我需要使用navigation-support
,为此我需要list-of
在result-view
. 使用后list-of
,无法触发意图on-click
。如何做到这一点?
2:如果用户说的是第一、第二或第三,如何触发该意图。现在,如果用户通过说第一,第二和第三选择,它会弹出上述cell-card
排除其他两个。如何做到这一点?
我的结果视图是:
result-view {
match: ArtistChoiceResult (artistchoice) {
from-output: ArtistChoice
}
message {template("Here is the upcoming event")}
list-of (artistchoice) {
navigation-mode {
read-many {
page-size(3)
underflow-statement (This is the first set)
item-selection-question (Which one would you like?)
overflow-statement (That's all I have)
}
}
where-each (one) {
layout-match (one) {
mode (Summary)
}
}
}
layout-match
是这样的
layout {
match: ArtistChoiceResult (singleArtist)
mode(Summary)
content{
section{
content{
cell-card {
slot1 {
image {
url ("#{value(singleArtist.multiple_image)}")
shape (Square)
}
}
slot2 {
content {
order (PrimarySecondary)
primary ("#{value(singleArtist.multiple_name)}")
secondary ("#{value(singleArtist.multiple_cat)}")
}
}
on-click {
intent {
goal: ArtistChoice
value-set:MultipleID{$expr(singleArtist.multiple_id)}
}
}
}
}
}
}
}
导航支持文件是
navigation-support {
match: ArtistChoiceResult (this)
ordinal-selection-patterns {
pattern ("(first)[v:viv.core.OrdinalSelector]")
pattern ("(first)[v:viv.core.OrdinalSelector] one")
pattern ("that (first)[v:viv.core.OrdinalSelector] one")
pattern ("yes (first)[v:viv.core.OrdinalSelector]")
pattern ("yes (first)[v:viv.core.OrdinalSelector] one")
pattern ("yes that (first)[v:viv.core.OrdinalSelector] one")
pattern ("result number (one)[v:viv.core.CardinalSelector:1]")
pattern ("the (first)[v:viv.core.CardinalSelector:1]")
pattern ("select (first)[v:viv.core.OrdinalSelector] one")
pattern ("select (first)[v:viv.core.OrdinalSelector]")
}
}