ext图片显示

来源:互联网 发布:c语言for循环 编辑:程序博客网 时间:2024/06/05 03:18

this.projectstore = new Ext.data.JsonStore({
            proxy: new Ext.data.HttpProxy({
                url: 'services.do'
            }),
            autoLoad: true,
            root: 'images',
            fields: ['hse_name', 'hse_plan'],
            baseParams: {
                method: 'loadSalesHouseinfos',
                moduleId: 'sales-admin',
                node: menu_id
            },
        });

        var tpl = new Ext.XTemplate('<tpl for=".">', '<div style="float:left;padding-left:10px;"><img src="{hse_plan}" width="200px" height="150px"></div>', '</tpl>');

        this.houseTypePanel = new Ext.FormPanel({
            region: 'center',
            border: false,
            title: '户型信息',
            autoScroll: true,
            url: this.ownerModule.app.connection,
            bodyStyle: 'padding:15px',
            items: [{
                layout: 'column',
                border: false,
                items: new Ext.DataView({
                    store: this.projectstore,
                    tpl: tpl
                })

            }]
        });

 

json{"images":[{"hse_plan":".//modules//sales//admin//client//lib//images//room4.jpg"}]}

原创粉丝点击