-
Notifications
You must be signed in to change notification settings - Fork 208
ScoreList.ag
huangjing edited this page Sep 3, 2020
·
1 revision
model(MDVChatMovieSearchPageModel)
---
--- UI
ui {
--- layout views
Label(MDVChatMovieSearchPageModel.title)
.fontSize(30),
Label("hahaha"),
}
---
--- preview
local function preview()
local json={
name = {},
title = "我是title",
searchBar={
showCancel=true,
placeholder="搜索想看的视频",
text="电影"
},
history={
"琅琊榜",
"猫和老鼠",
"猫和老鼠",
},
list={
errmsg="",
data= {
{
data1 = "data1",
},
{
data2 = "data2"
},
{
data3 = "data3"
}
}
}
}
function autoWired (origin, viewModel, extra)
--viewModel.title = origin.title
viewModel.title = origin.title
viewModel.searchBar = origin.searchBar
viewModel.history = origin.history
viewModel.list = origin.list
return viewModel
end
autoWired(json, MDVChatMovieSearchPageModel, nil)
print(MDVChatMovieSearchPageModel.list.data[1].data1)
end