extjs簡單動畫2

來源:互聯網
上載者:User

標籤:

var store = Ext.create(‘Ext.data.Store‘, {                storeId:‘employeeStore‘,                fields:[‘name‘, ‘seniority‘, ‘department‘],                groupField: ‘department‘,                data: {‘employees‘:[                    { "name": "Michael Scott",  "seniority": 7, "department": "Management" },                    { "name": "Dwight Schrute", "seniority": 2, "department": "Sales" },                    { "name": "Jim Halpert",    "seniority": 3, "department": "Sales" },                    { "name": "Kevin Malone",   "seniority": 4, "department": "Accounting" },                    { "name": "Angela Martin",  "seniority": 5, "department": "Accounting" }                ]},                proxy: {                    type: ‘memory‘,                    reader: {                        type: ‘json‘,                        root: ‘employees‘                    }                }            });            var myComponent = Ext.create(‘Ext.grid.Panel‘, {                renderTo: Ext.getBody(),                width: 800,                height: 500,                layout: ‘fit‘,                closable: true,                //hidden: false,                store: Ext.data.StoreManager.lookup(‘employeeStore‘),                columns: [                    { header: ‘Name‘,  dataIndex: ‘name‘,flex:1},                    { header: ‘Email‘, dataIndex: ‘email‘},                    { header: ‘Phone‘, dataIndex: ‘phone‘}                ],                title: ‘測試中‘,                //style: ‘border: 1px solid red;‘,                listeners: {                    beforeclose:function(){                        myComponent.getEl().slideOut("r", {duration: 500});                        // 在這裡延遲5秒關閉                        return false;                    }                }            });            Ext.create(‘Ext.fx.Anim‘, {                target: myComponent,                duration: 1000,                from: {                    width: 1000,                    height: 800 // 開始寬度 400                },                to: {                    left:200                    // width                    // height                },                iterations: 1,   //動畫次數                easing: ‘backOut‘, // 中間值                 alternate: true   // 動畫反轉            });                       Ext.create(‘Ext.fx.Animator‘, {                target: myComponent,                duration: 1000, // 10 seconds                keyframes: {                    0: {                        opacity: 1,                        left: 100                    },                    20: {                        x: 30,                        left: 150                    },                    40: {                        x: 130,                        left: 75                    },                    60: {                        y: 80,                        left: 100                    },                    80: {                        y: 200                    },                    100: {                        opacity: 1,                        backgroundColor: ‘00FF00‘                    }                }            });

 

extjs簡單動畫2

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.