-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemo.js
66 lines (62 loc) · 1.12 KB
/
demo.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// image with header denmo
function fetch() {
let array = [
{
image: {
src: "http://wx3.sinaimg.cn/mw600/00745YaMgy1g90aguwexyj30kg0aqjso.jpg"
},
},{
image: {
src: "http://pic18.nipic.com/20120103/8993051_170340691334_2.jpg"
}
},
{
image: {
source: {
url: "https://i5.meizitu.net/thumbs/2019/10/195368_15d56_236.jpg",
header: {
"referer": host
}
}
}
}
];
$("mainData").data = array;
console.log($("mainData").data)
}
const template = {
type: "view",
props: {
id: "contentView",
bgcolor: $color("white"),
radius: 7,
},
views: [{
type: "image",
props: {
id: 'image',
},
layout: function(make, view) {
make.center.equalTo(view.super)
make.size.equalTo($size(300, 300))
}
}]
}
$ui.render({
props: {
title: "demo",
list: [],
},
views: [
{
type: 'list',
props: {
id: 'mainData',
template: template,
rowHeight: 500,
},
layout: $layout.fill,
}
]
});
fetch();