0

我想在点击图像时显示叠加层。但它没有显示。我的代码中有什么错误。谁能告诉我如何在点击图像时显示叠加层。

这是我的代码:

  {
      xtype: 'image',
      src: 'http://www.veryicon.com/icon/preview/System/Colored%20Developers%20Button/question%20Yellow%20Icon.jpg',
      listeners: {
                 tap: function () {
                  var popup = Ext.create('Ext.Panel', {
                  modal: true,
                  centered: true,
                  width: 300,
                  height: 400,
                  layout: 'fit',                                                                
                  scrollable: true
                 });
                popup.show();
               }
              },
       height: 32,
       width: 32
    }
4

1 回答 1

1

试试这个代码

{
  xtype: 'image',
  src: 'http://www.veryicon.com/icon/preview/System/Colored%20Developers%20Button/question%20Yellow%20Icon.jpg',
  listeners: {
             tap: function (ele) {
              var popup = Ext.create('Ext.Panel', {
              modal: true,
              centered: true,
              width: 300,
              height: 400,
              layout: 'fit',                                                                
              scrollable: true
             });
            popup.showBy(ele);
           }
          },
   height: 32,
   width: 32
}
于 2012-07-09T12:10:32.600 回答