我尝试将图像添加到面板的背景中.图像来自加载的数据.我尝试了以下代码,但没有用:
var topPanel = new Ext.Panel({
flex:1,
title:'topPanel',
style:'style="background-image: url('+this.jsonData.picURL+');'
});
Run Code Online (Sandbox Code Playgroud)
当我创建一个列表时,它与'itemTpl'配合使用.
我也试过了
style:'background-image: url({picURL});'
Run Code Online (Sandbox Code Playgroud)
和...一起
store: {
fields: ['firstName','lastName', 'picURL'],
data: this.jsondData
}
Run Code Online (Sandbox Code Playgroud)
但后来我收到了消息
[[object Object]]不是'Function.prototype.apply'的有效参数.
任何想法都可以帮助!日Thnx
我是第一次使用Sencha.以前,我一直在使用jquery.以下jquery命令的Sencha等价物是什么?
$('.card').css('background-image', 'url(bg.jpg)');
Run Code Online (Sandbox Code Playgroud)
换句话说,我想找到具有类名的所有元素card,然后我想background-image:url(bg.jpg)向它们添加一个.
如果我设置一个足够长的label任何一种形式的元素,或title的FieldSet,它只是增长水平永远如果我设置labelAlign到right.如何强制这些包裹到下一行而不是创建水平滚动条?
我写了一个有点小的应用程序,但它在IOS和Android设备上运行速度非常慢,在我看来,该设备需要很长时间来渲染GUI.
我确保在发布时需要每个组件,我的应用程序包含5个选项卡面板,每个面板包含一个带有多个面板的导航视图,我已将导航视图的autoDestroy属性设置为true.
我使用了sencha 2.0.0.0和2.0.1.1以及phone gap cordova 1.7.0,cordova 1.8.0
有什么建议?
我已经在sencha touch中实现了我的应用程序
在我的面板中,我有一个导航栏,我想在面板标题上动态设置标题

Ext.define('FleetSyncApp.view.WSMachineTypes', {
extend: 'Ext.Panel',
alias: 'widget.wsmachinetypes',
id: 'myPanel',
config: {
layout: {
type: 'vbox'
},
items: [
{
title: 'Contact information',
xtype: 'list',
----
----
-----
}
],
listeners: [
{
fn: 'initComponent',
event: 'initialize'
}
]
},
Run Code Online (Sandbox Code Playgroud)
并在initcomponent方法实现代码来获取这样的组件
initComponent: function(component, options, wstitle) {
var bar = Ext.getCmp('myPanel');
}
Run Code Online (Sandbox Code Playgroud) 背景:我正在使用senchatouch 2 MVC框架开发一个应用程序.我正在使用带有两个标签的tabpanel的屏幕上工作.
问题:在第一个选项卡中,我想显示titleBar和List.我可以显示titleBar但不能显示选项卡中的列表.当我使用谷歌浏览器检查元素时,列表显示为空.我正在使用sencha网站上的示例列表代码.我可以在另一个面板中显示列表,但是当我将它作为项目放在tabPanel中时,它不会显示.
这是我正在使用的代码:
Ext.define('POC.view.WUHomePage', {
extend: 'Ext.TabPanel',
requires: ['Ext.TitleBar', 'Ext.dataview.List', 'Ext.data.proxy.JsonP'],
alias: 'widget.wuHomePageView',
config: {
fullscreen: true,
tabBarPosition: 'bottom',
cardSwitchAnimation: 'slide',
defaults: {
styleHtmlContent: true
},
items: [{
// This is first tab
title: 'Home',
iconCls: 'home',
items: [{
xtype: 'titlebar',
title: 'Hello',
docked: 'top',
items: [{
xtype: 'button',
text: 'LogOut',
ui: 'action',
itemId: 'newButton',
align: 'right'
}]
}, {
xtype: 'list',
title: 'Sample',
fullscreen: true,
itemTpl: '{title}',
data: [{
title: 'Item 1'
}, {
title: …Run Code Online (Sandbox Code Playgroud) 最近我将sencha框架升级到2.2,面临scss的问题.无法更改应用的基色($ base-color).以下是我在app.scss中的代码
@import 'sencha-touch/default';
@import 'sencha-touch/default/all';
$base-color: #008c99;
Run Code Online (Sandbox Code Playgroud)
颜色变化不会反映在应用程序的任何位置.
这是设置应用程序基本颜色的正确方法,如果没有,请让我知道我在哪里摸索.
提前致谢.
我有一个商店,我想预定几套分拣机.对于第一个,我通过band rank,lastName定义了排序顺序.

{
property: 'rank',
direction: 'ASC'
},
{
property: 'lastName',
direction: 'ASC'
}
Run Code Online (Sandbox Code Playgroud)
对于我的第二个,我希望分拣机是年,乐队,lastName:
{
property: 'year',
direction: 'ASC'
},
{
property: 'band',
direction: 'ASC'
},
{
property: 'lastName',
direction: 'ASC'
}
Run Code Online (Sandbox Code Playgroud)
如何在我的商店换掉第一台分拣机,然后根据需要换回?
这是代码的其余部分:
BandMemberStore.js:
Ext.define('Sencha.store.BandMemberStore', {
extend: 'Ext.data.Store',
requires: [],
config: {
model: 'Sencha.model.BandMember',
autoLoad: true,
defaultRootProperty: 'items',
proxy: {
type: 'ajax',
url: 'bands.json',
reader: {
type: 'json',
rootProperty: 'items'
}
},
sorters : [
{
property: 'rank',
direction: 'ASC'
},
{
property: 'lastName',
direction: 'ASC'
}
] …Run Code Online (Sandbox Code Playgroud) 我正在开发Cordova Android移动应用程序.使用Sencha touch作为UI框架.在应用程序中我正在进行Web服务调用.它曾经与旧版Cordova一起工作,最近将Cordova proj升级到5.0.0,从此无法访问更新版Android设备上的任何Web服务.我在项目中包含了白名单插件.还在index.html中包含了以下元标记
<meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *">
Run Code Online (Sandbox Code Playgroud)
config.xml:
<content src="index.html" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
Run Code Online (Sandbox Code Playgroud)
运行应用程序时会引发以下错误,
"Refused to connect to 'http://my-server-url.ss.yy.com:8080/SomeServ/rest/someapp/appdata?_dc=1433398248330' because it violates the following Content Security Policy directive: "default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-inline' 'unsafe-eval'". Note that 'connect-src' was not explicitly set, so 'default-src' is used as a fallback.
Run Code Online (Sandbox Code Playgroud)
我无法从这里前进.在谷歌上尝试了很多建议,但没有用.请指导我这里缺少什么. …
android sencha-touch content-security-policy cordova-plugins cordova-5.0.0
颜色来了,但我不能选择它们
{
xtype: 'combobox',
anchor: '100%',
fieldLabel: 'Mild Color',
forceSelection: true,
typeAhead : true,
name: 'mildColor',
valueField: 'id',
bind: {
store: '{mildcolor}'
},
tpl: [
'<ul>',
'<tpl for=".">',
'<li style="background-color:{name}">{text}</li>',
'</tpl>',
'</ul>'
],
}
[ https://i.stack.imgur.com/DObF7.png]
请有人帮助我
sencha-touch ×10
extjs ×5
android ×2
coding-style ×1
css ×1
dom ×1
ios ×1
javascript ×1
performance ×1
sass ×1