【发布时间】:2012-12-20 15:28:34
【问题描述】:
我需要在通过单击按钮更新 Img 组件的 src 属性期间显示“正在加载图像...”掩码。
此代码不显示加载掩码:
certImg.setLoading('Loading image...');
certImg.setSrc('load_image.php?file_name=' + record.get('invoice_item_file'));
certImg.setLoading(false);
此代码显示,但不隐藏加载掩码(它显示在更新的图像上):
certImg.setLoading('Loading image...');
certImg.setSrc('load_image.php?file_name=' + record.get('invoice_item_file'));
我尝试将图像大小增加到 1-2 Mb,这使得加载它需要 3-4 秒,但加载掩码仍然没有显示... 我也试过把 certImg.setLoading(false) 放到 afterrender Img 事件中,结果是一样的。
当评论“certImg.setLoading(false);”时- img 已更新,但加载掩码仍显示在 img 上...
【问题讨论】:
标签: extjs