how to display list and other labels in single page using sencha touch2(如何使用sencha Touch2在单页中显示列表和其他标签)
本文介绍了如何使用sencha Touch2在单页中显示列表和其他标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是Sencha Touch2的新手。我想在想要显示的列表中显示下面的一些文本标签。所以我已经定义了一些标签,并访问Twitter服务,它将提供数据列表。以下是我的代码。
- 在此代码中,如果我注释扩展:‘Ext.form.Panel’,如果我使用扩展:‘Ext.Navigation.View’,则将显示列表数据,但不会显示定义的标签。
- 如果我注释扩展:‘Ext.Navigation.View’,如果我使用扩展:‘Ext.Form.Panel’,则不会显示列表数据,但它将显示定义的标签。
请告诉我我的代码有什么问题:
编码:
Ext.define("E:SenchaTouch.view.Main", {
extend: 'Ext.form.Panel',
//extend: 'Ext.navigation.View',
xtype: 'companyprofilepage',
id: 'companyprofile',
config: {
items: [
{
xtype: 'toolbar',
docked: 'top',
title: 'My Toolbar'
},
{
xtype: 'titlebar',
title: 'Title name'
},
{
margin: '10',
xtype: 'label',
html: 'Info1'
},
{
margin: '10',
xtype: 'label',
html: 'A company is a business organization. It is an association or collection of individual real '
},
{
xtype: 'list',
itemTpl: '{title}',
store: {
autoLoad: true,
fields: ['from_user', 'text', 'profile_image_url'],
proxy: {
type: 'jsonp',
url: 'http://search.twitter.com/search.json?q=Sencha Touch',
reader: {
type: 'json',
root: 'results'
}
}
},
itemTpl: '<img src="{profile_image_url}" /><h2>{from_user}</h2><p>{text}</p>'
}]
}
});
推荐答案
只创建Ext.Panel({}),您可以在这些面板中放置其他Sencha元素。我希望能帮助你。:)
这篇关于如何使用sencha Touch2在单页中显示列表和其他标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
编程基础网
本文标题为:如何使用sencha Touch2在单页中显示列表和其他标签
基础教程推荐
猜你喜欢
- HTML5 画布调整为父级 2022-01-01
- 最佳动态 JavaScript/JQuery 网格 2022-01-01
- 逻辑运算符 ||在 javascript 中,0 代表 Boolean false? 2022-01-01
- CORS:当凭据标志为真时,无法在 Access-Control-Allow-Origin 中使用通配符 2022-01-01
- 带角度的选项卡:仅使用 $http 在单击时加载选项卡 2022-01-01
- 在 Javascript 中使用 Fetch API 上传文件并显示进度 2022-01-01
- 当木偶师打开Chrome时,不能使用Chrome扩展 2022-01-01
- 即使每次插入第一个输入的值不同,第二个输入仍显示相同的输入值 2022-01-01
- 使用 jQuery 在悬停时交换 DIV 类 2022-01-01
- 从快速中间件中排除路由 2022-01-01
