1. Hello World 출력하기

 

Ext.define("HelloWorld.view.Main", {

       extend: 'Ext.Panel',

       requires: ['Ext.Panel'],

 

       config: {

             layout: 'card',

             html:'helloworld!',

       }

});

 

 

 

  

2. 기본 패널

  1) 주요keyword

{

   xtype: 'panel',

sytle: '...',

layout: {},

items: [],

html: '...',

}

2)Layout 속성

 

종류

type 속성

align 속성

pack 속성

Value

auto

 

vbox

 

hbox

 

fit

 

card

center

 

end

 

start

 

stretch

 

center

 

end

 

start

 

justify

 

 

 

3) 아이템

. 단일 아이템 생성

    items: {아이템 객체}

. 복수 아이템 생성

items: [{아이템 객체}, {아이템 객체}, ...]  

 

 

3. 실습

1) panel, flex

 

Ext.define("HelloWorld.view.Main", {

    extend: 'Ext.Panel',

  

    config: {

        layout: {

              type: 'vbox',

              align:'stretch',

              pack:'center'

        },

       

        defaults: {

              scrollable:true

        },

       

        items: [

      

      

              {

                     flex:1,

                     xtype: 'panel',

                     style : 'background-color:red',

                     html:'1',

              },

              {

                     flex:2,

                     xtype: 'panel',

                     style : 'background-color:green',

                     html:'2',

              },

              {

                     flex:3,

                     xtype: 'panel',

                     style : 'background-color:blue',

                     html:'3',

              },

              {

                     flex:4,

                     xtype: 'panel',

                     style : 'background-color:yellow',

                     html:'4',

              },

        ],

    }

});

 

 

 

 

 

 

 

워드 파일 :   모바일 웹앱 전문 개발자 과정_0405.docx 

Posted by 꿈을펼쳐라
,