2017-04-12 36 views
0

下面是我的代碼,其中顯示面板爲彈出窗口,我能夠看到視頻,但我沒有看到視頻的頂部面板。 正如我們所提供的「可關閉:真」,關閉圖標應該出現在頂部。「closable:true」在面板頂部沒有顯示關閉圖標(sencha touch 2.4)

 Ext.Viewport.add(Ext.create('Ext.Panel', { 
      width: '500px', 
      left: '5%', 
      padding: 10, 
      top: '0%', 
      title: 'Foo', 
      floating: true, 
      closable : true, 
      layout: 'fit', 
      height: '380px', 
      html: ['<iframe frameBorder="0" scrolling="no" width = "480" height = "360" src = ""></iframe>'] 
    })); 

下面是小提琴手鍊接

fiddle.sencha.com/#view/editor &小提琴/ 1萬億

+1

能否請您創建小提琴手這一點。在這個小提琴手中,我工作得很好。 https://fiddle.sencha.com/#view/editor&fiddle/1trl – UDID

+0

我試着用小提琴5.1.3版本的代碼,它似乎工作正常。另外它在Ext 6.0.2中的工作。你能提供一個重新創建問題的小提琴嗎? –

+0

@Harshit:我使用的是Sencha touch 2.4,我從我的控制器顯示這個面板。 – Kalashir

回答

1

煎茶觸摸屏沒有任何closable財產像ExtJS的。我們需要創建我們自己的按鈕來實現它。

Ext.application({ 
 
    name: 'Fiddle', 
 

 
    launch: function() { 
 
    Ext.Viewport.add(Ext.create('Ext.Panel', { 
 
      width: '500px', 
 
      left: '5%', 
 
      padding: 10, 
 
      top: '0%', 
 
      title: 'Foo', 
 
      floating: true, 
 
      closable : true, 
 
      layout: 'fit', 
 
      height: '380px', 
 
      items:{ 
 
       xtype:'button', 
 
       right:0, 
 
       top:0, 
 
        ui: 'plain', 
 
       iconCls:'delete', 
 
       handler:function(button){ 
 
        button.up().destroy(); 
 
       } 
 
      }, 
 
      html: [''] 
 
}) 
 
); 
 

 
    } 
 
});
<link rel="stylesheet" href="https://cdn.sencha.com/touch/sencha-touch-2.4.2/resources/css/sencha-touch.css"><script type="text/javascript" src="https://cdn.sencha.com/touch/sencha-touch-2.4.2/sencha-touch-all-debug.js"></script>

+0

是的..這是工作。 –

+0

@HarshitShah 此代碼在Chrome瀏覽器上工作正常,但在Firefox上,它並不是在iframe中打開視頻。任何具體原因? – Kalashir