转自:http://blog.csdn.net/bq_cui/article/details/8544821
- Ext.define('MyApp.view.MyViewport_1', {
- extend: 'Ext.container.Viewport',
- layout: {
- type: 'border'
- },
- initComponent: function() {
- var me = this;
- Ext.applyIf(me, {
- items: [
- {
- xtype: 'panel',
- region: 'center',
- layout: {
- type: 'absolute'
- },
- //设置背景图片
- bodyStyle: {
- //background: '#ffc',
- background: 'url(http://localhost/T0115/app/view/1.jpg) no-repeat #00FFFF',
- padding: '10px'
- },
- title: 'My Panel'
- }
- ]
- });
- me.callParent(arguments);
- }
- });