我一直在使用 sencha touch 2 开发应用程序。
我在顶部有一个工具栏,其中包含一个按钮。
当我单击此按钮时,我将有一个面板覆盖。在这个面板中,我想要两个项目:
var shareButton = {
xtype : 'button',
ui: 'action',
width:'36px',
height:'36px',
handler : function(){
var panel=Ext.create('Ext.Panel',{
right: 0,
top: 20,
modal: true,
hideOnMaskTap: true,
hidden: true,
width: 260,
height:'70%' ,
styleHtmlContent: true,
scrollable: true,
items: [
{html:'<a href="https://twitter.com/share" class="twitter-share-button" data-url="https://www.google.com" data-lang="en">Tweet</a></body>',},
{html:'<div ><class="fb-like" data-href="http://test.com" data-send="false" data-layout="button_count" data-width="4" data-show-faces="false"></div>'}]});
Ext.Viewport.add(panel);
panel.show();}};
但这不起作用。
事实上,我希望第一个引导我到 twitter 分享 URL (www.google.com)。
第二个到 facebook 分享“test.com”。
不幸的是,面板中没有显示任何内容。
谢谢你。