demo.html
3.02 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<div id="horilistnav" class="page out" data-title="横向列表插件">
<div id="horilistnav-header"></div>
<div id="horilist-a-break"></div>
<div id="horilist-a"></div>
<div id="horilist-b-break"></div>
<div id="horilist-b"></div>
</div>
<script>
require(["NavHeader", "ColumnBreak", "HoriList"], function(NavHeader, ColumnBreak, HoriList) {
var _u = require("mUtil");
var hasClsPicker = typeof clsPicker !== "undefined";
if (!hasClsPicker) {
new NavHeader({
el: "horilistnav-header",
option: {
title:"横向列表插件",
smallTitle:"horilist"
}
}).render();
new ColumnBreak({
el: "horilist-a-break",
option: {
content:"数据来源-查询列表",
align:"center"
}
}).render();
new HoriList({
el: "horilist-a",
option: {
sourceid : -999,//表单建模查询id
pageSize : 10,
contentSource: 2,
normalview : {
imgfield : {fieldid : 6544, fielddesc : "图片上传"},
titlefield : {fieldid : 6528, fielddesc : "单行文本框"},
otherfields : [
[{fieldid : 6534, fielddesc : "人力资源浏览框"}],
[{fieldid : -1, fielddesc : "{rlzyllk}"}],
[{fieldid : 6542, fielddesc : "check框"}]
]
},
options: {
readonly : false //是否只读
},
callback: {
click : function(data){
console.log(data);
$u("/mobilemode/mobile/demo/plugin/HoriList/detail.html?billid="+data.id, true);
}
}
}
}).render();
new ColumnBreak({
el: "horilist-b-break",
option: {
content:"数据来源-URL",
align:"center"
}
}).render();
}
new HoriList({
el: "horilist-b",
option: {
sourceurl : "/mobilemode/mobile/demo/plugin/HoriList/data.jsp",
pageSize : 5,
normalview : {
imgfield : "<img src='{avatar}'/>",
titlefield : "{title}",
otherfields : [
"分类:{cat}",
"日期:{date}"
]
},
options: {
readonly : false //是否只读
},
callback: {
click : function(data){
var title = encodeURIComponent(data.title);
var cat = encodeURIComponent(data.cat);
var content = encodeURIComponent(data.content);
$u("/mobilemode/mobile/demo/plugin/HoriList/detail.html?billid="+data.id, true);
}
},
dataload: function() {
if (!hasClsPicker) return;
_u.vetically("#horilist-b");
clsPicker.golalSetting({
container: ".wev-comp-HoriList",
type: "HoriList"
});
new clsPicker({
selector: ".wev-table-view-cell",
text: ".wev-table-view-cell",
lineYSkew: 50,
skew: [10, -4],
position: "top right"
});
new clsPicker({
selector: "img",
text: " ",
lineYSkew: 0,
skew: ["", -3],
position: "top right"
});
new clsPicker({
selector: ".wev-nowrap:first-child",
text: " ",
lineYSkew: 20,
skew: [20, -0.7],
position: "top right"
});
new clsPicker({
selector: ".wev-nowrap:nth-child(2)",
text: " ",
lineYSkew: 20,
skew: [1.6, -0.5],
position: "top right"
});
}
},
}).render();
});
</script>