Extjs Sencha Touch:.x尺寸与x尺寸的课程
在Sencha Touch中,如何在Sencha生成的组件上应用.x-unsized或.x-sized类,以及基于什么 我在sencha-touch.js和Component.js中找到了这个 要查看详细信息,请选中Component.js中的“doRefreshSizeState()”:Extjs Sencha Touch:.x尺寸与x尺寸的课程,extjs,Extjs,在Sencha Touch中,如何在Sencha生成的组件上应用.x-unsized或.x-sized类,以及基于什么 我在sencha-touch.js和Component.js中找到了这个 要查看详细信息,请选中Component.js中的“doRefreshSizeState()”: doRefreshSizeState: function() { var hasWidth = this.getWidth() !== null || this.widthLayoutSized ||
doRefreshSizeState: function() {
var hasWidth = this.getWidth() !== null || this.widthLayoutSized || (this.getLeft() !== null && this.getRight() !== null),
hasHeight = this.getHeight() !== null || this.heightLayoutSized || (this.getTop() !== null && this.getBottom() !== null),
stretched = this.layoutStretched || this.hasCSSMinHeight || (!hasHeight && this.getMinHeight() !== null),
state = hasWidth && hasHeight,
flags = (hasWidth && this.LAYOUT_WIDTH) | (hasHeight && this.LAYOUT_HEIGHT) | (stretched && this.LAYOUT_STRETCHED);
if (!state && stretched) {
state = null;
}
this.setSizeState(state);
this.setSizeFlags(flags);
}
为了摆脱“x-unsized”类,我在按钮上设置了“width”+“height”
{
xtype: 'button',
text: 'Logout',
id: 'logout',
docked: 'right',
width: 100,
height: 10
}