Мы должны внедрить систему бронирования билетов в нашей капсуле, где нам нужно выбрать поле для выбора билетов. Но я не получил селектор в Биксби. Итак, я использую ползунок для выбора. На этом я должен отобразить событие с ползунком элемента формы ввода. Но не удается отобразить js подробности и ползунок на одной странице.
Ссылка: https://bixbydevelopers.com/dev/docs/reference/type/input-view.render.form.elements.slider
Действие:
action (Book) {
type(Search)
collect {
input (rating) {
type (Rating)
min (Required) max (One)
}
input (event) {
type (Event)
min (Optional) max (One)
}
}
output (OrderBooking)
}
Структура :
structure (OrderBooking){
property (event) {
type (Event)
min (Optional)
max (One)
}
property (rating){
type (Rating)
min (Required)
max (One)
}
}
Вид:
input-view {
match {
OrderBooking (rating)
}
render {
form {
elements {
slider {
id (rating)
min-value (0)
max-value (10)
min-label (0 - Lowest)
max-label (10 - Highest)
step (1)
type (Rating)
}
}
on-submit {
goal: Rating
value: viv.core.FormElement(rating)
}
}
if (exists(rating.ticketName)){
selection-of (rating) {
navigation-mode {
read-many {
page-size (3)
page-content{
underflow-statement (This is the final set)
item-selection-question {
if(exists(rating.ticketName)){
template ("Here are a few suggestions for the events.")
}else{
template (Which one would you like)
}
}
overflow-statement (That's all I have)
}
}
}
has-details (false)
where-each (item) {
layout-macro (book-type-summary) {
param (singlebook) {
expression (item)
}
}
}
}
}
}
}
Макет:
layout-macro-def(book-type-summary) {
params {
param (singlebook) {
type (OrderBooking)
min (Required)
max (One)
}
}
content {
compound-card {
content {
paragraph {
value {
if (exists(singlebook.event)){
template ("#{value(singlebook.event)}")
}
}
style (Detail_M)
}
}
}
}
}