ext在不同浏览器下效果不同

本次遇到的状况是,firefox正常显示,360浏览器的极速模式下无法弹出窗体,chrome可以正常显示页面。
首先提供各个浏览器的版本信息
_
_
_

我们测试用的代码结构如下
_
文件夹结构如下
_
主要代码如下
viewport也就是入口

Ext.define('MyApp.view.MainVP', {
    extend: 'Ext.container.Viewport',
    alias: 'widget.mainvp',

    requires: [
        'Ext.toolbar.Toolbar',
        'Ext.button.Button',
        'Ext.tree.Panel',
        'Ext.tree.View'
    ],

    layout: 'border',

    initComponent: function() {
        var me = this;

        Ext.applyIf(me, {
            items: [
                {
                    xtype: 'panel',
                    region: 'north',
                    height: 115,
                    itemId: 'topPanel',
                    title: '网站工具栏'
                },
                {
                    xtype: 'container',
                    region: 'west',
                    itemId: 'leftContainer',
                    width: 150,
                    items: [
                        {
                            xtype: 'toolbar',
                            height: 33,
                            itemId: 'leftToolBar',
                            items: [
                                {
                                    xtype: 'button',
                                    itemId: 'productBTN',
                                    text: '产品'
                                },
                                {
                                    xtype: 'button',
                                    itemId: 'systemBTN',
                                    text: '系统'
                                }
                            ]
                        },
                        {
                            xtype: 'treepanel',
                            height: 652,
                            itemId: 'leftTreeMenu',
                            title: '导航栏',
                            store: 'LeftTreeStore',
                            viewConfig: {

                            }
                        }
                    ]
                }
            ]
        });

        me.callParent(arguments);
    }

});

被弹出的窗体

Ext.define('MyApp.view.addNewCar', {
    extend: 'Ext.window.Window',
    alias: 'widget.addnewcar',

    requires: [
        'Ext.form.field.Text',
        'Ext.panel.Panel'
    ],

    height: 610,
    itemId: 'newCar',
    width: 628,
    title: '新增车型',

    initComponent: function() {
        var me = this;

        Ext.applyIf(me, {
            items: [
                {
                    xtype: 'textfield',
                    fieldLabel: '产品',
                    emptyText: 'JSB_TESTLIB'
                },
                {
                    xtype: 'panel',
                    frame: true,
                    resizable: true,
                    collapsible: true,
                    title: '属性'
                }
            ]
        });

        me.callParent(arguments);
    }

});

左侧树形tab的数据来源store

Ext.define('MyApp.store.LeftTreeStore', {
    extend: 'Ext.data.TreeStore',

    requires: [
        'Ext.data.Field'
    ],

    constructor: function(cfg) {
        var me = this;
        cfg = cfg || {};
        me.callParent([Ext.apply({
            storeId: 'LeftTreeStore',
            root: {
                text: '产品',
                expanded: true,
                children: [
                    {
                        text: 'Honda',
                        expanded: true,
                        children: [
                            {
                                text: '雅阁',
                                leaf: true
                            },
                            {
                                text: '思域',
                                leaf: true
                            }
                        ]
                    },
                    {
                        text: 'Benz',
                        expanded: true,
                        children: [
                            {
                                text: 'S系列',
                                leaf: true
                            },
                            {
                                text: 'C系列',
                                leaf: true
                            }
                        ]
                    }
                ]
            },
            fields: [
                {
                    name: 'text'
                }
            ]
        }, cfg)]);
    }
});

主页面对应的controller

Ext.define('MyApp.controller.LeftController', {
    extend: 'Ext.app.Controller',

    productBTNFunction: function(target) {
        //Ext.Msg.alert("1");
        var carabc = Ext.create("widget.addnewcar");
        //Ext.Msg.alert("2");
        carabc.show();
        //Ext.Msg.alert("3");
    },

    init: function(application) {
        this.control({
            "mainvp #productBTN": {
                click: this.productBTNFunction
            }
        });
    }

});

下面我们看看不同浏览器的效果
chrome正常显示
_
firefox正常显示
_
妈蛋360的极速模式和兼容模式居然全都可以正常显示
_
难道是我之前测试的时候360浏览器用多了,缓存中保存了错误的与预期不相符合的数据吗?
反正现在正常了,妈蛋

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值