|
发表于 2017-5-8 17:02:01
|
显示全部楼层
轮播可以用carousel,动态设置可以参考如下,自己调用add动态添加
- var carousel = this.comp("carousel1");
- var sphoto = data.getValue("fFJ2");
- if (sphoto != null && sphoto != "" && sphoto != "[]") {
- var imageJson = eval("(" + sphoto + ")");
- if (imageJson.length > 0) {
- for (var i = 0; i < imageJson.length; i++) {
- var fileID = imageJson[i]["fileID"];
- var docPath = imageJson[i]["docPath"];
- var url = DocUtils.InnerUtils.getdocServerAction({
- "docPath" : docPath,
- urlPattern : "/repository/file/view/" + fileID + "/last/content",
- isFormAction : false,
- context : this.getContext()
- });
- carousel.add('<img src="' + url + '" class="tb-img1"/>');
- }
- }
- this.comp("contents1").to(0);
复制代码 |
|