日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

Extjs显示图片

發布時間:2025/3/15 编程问答 19 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Extjs显示图片 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

1、首先做一個容器

1 xtype : 'container', // 第2行 2 anchor : '100%', 3 layout : 'column', 4 items : [{ 5 columnWidth : 0.4, 6 layout : 'anchor', 7 border : false, 8 items : [{ 9 xtype : 'box', // 或者xtype: 'component', 11 width : 100, // 圖片寬度 12 height : 100, // 圖片高度 13 id : 'imagebox', 14 autoEl : { 15 tag : 'img', // 指定為img標簽 16 src : '../../images/main/imageInfo.png' // 指定url路徑 18 } 19 }] 20 }]

2、圖片的動態更新
1 showProdArchiveWindow.show();
2 Ext.getCmp("imagebox").getEl().dom.src = getHostUrl() + getURLPath() + prodArchiveJson.picUrl;
?

注:動態指定url路徑一定要放在.show()方法后面,不然js會報錯

?3、grid顯示圖片

1 { 2 xtype : 'actioncolumn', 3 text : '產品檔案圖片', 4 tooltip : '產品檔案圖片', 5 // dataIndex : 'picUrl', 6 width : 120, 7 sortable : true, 8 items : [{ 9 icon : '../../images/main/imageInfo.png', 10 tooltip : '點擊查看大圖', 11 handler : function(grid, rowIndex, colIndex) { 12 var rec = grid.getStore().getAt(rowIndex); 13 showImage(rec.data.picUrl); 14 } 15 }] 16 }

?

轉載于:https://www.cnblogs.com/BobXie85/p/8006300.html

總結

以上是生活随笔為你收集整理的Extjs显示图片的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。