Roo/bootstrap/Img.js
authoredward <edward@roojs.com>
Thu, 2 Nov 2017 10:55:51 +0000 (18:55 +0800)
committeredward <edward@roojs.com>
Thu, 2 Nov 2017 10:55:51 +0000 (18:55 +0800)
Roo/bootstrap/Img.js

index 98faf30..9e32c01 100644 (file)
@@ -177,7 +177,13 @@ Roo.extend(Roo.bootstrap.Img, Roo.bootstrap.Component,  {
     setSrc : function(url)
     {
         this.src =  url;
-        this.el.dom.src =  url;
+        
+        if(this.src || (!this.xsUrl && !this.smUrl && !this.mdUrl && !this.lgUrl)){
+            this.el.dom.src =  url;
+            return;
+        }
+        
+        this.el.select('img', true).first().dom.src =  url;
     }