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浏览器用多了,缓存中保存了错误的与预期不相符合的数据吗?
反正现在正常了,妈蛋

目录
相关文章
|
JavaScript 前端开发
浏览器行为
浏览器行为
68 0
|
Web App开发 前端开发 安全
一文带你详细了解浏览器安全
1.同源策略 浏览器的同源策略,限制了来自不同源的“document”或脚本,对当前“document”读取或设置某些属性。 为了不让浏览器的页面行为发生混乱,浏览器提出了“Origin”(源)这一概念,来自不同Origin的对象无法互相干扰。 对于JavaScript来说,以下情况被认为是同源与不同源的:
115 3
一文带你详细了解浏览器安全
|
JavaScript
Win7系统里IE11浏览器里的vue-router返回不生效?
Win7系统里IE11浏览器里的vue-router返回不生效?
115 0
|
存储 Web App开发 缓存
浏览器相关总结
浏览器相关总结
|
Web App开发
浏览器突然好用多了。。。
我一向不掩饰对对浏览器插件的推崇。 首先,浏览器是日常工作中频繁接触的工具,借助浏览器这个平台,让插件触手可及,使用更加方便。 其次,插件普遍在几十KB或者上百KB,对比于动辄几十上百MB的桌面应用要轻量很多。
浏览器突然好用多了。。。
|
Web App开发 缓存 前端开发
浏览器端Less
浏览器端Less
|
Web App开发 缓存 移动开发
[Chrome,Flash,浏览器,BLOB,DNS]Chrome浏览器内部协议Chrome://收集
  Chromium 采用 Chrome:// 协议开头的形式, 规定了一系列的内部协议, 有的用来显示数据, 有的用来实现一些功能, 但对普通用户进行了屏蔽。在Chrome浏览器地址栏直接访问就好了!   chrome://bookmarks   收藏管理器
298 0
|
Web App开发 测试技术
在 .NET 中开发基于 Chrome 内核的浏览器-创建一个简单浏览器
首先在 http://www.cftea.com/tools/downloads/Cef.zip 下载文件包。 一、将文件解压拖入到 Visual Studio 对应的 WinForm 项目中。 二、在解决方案中,在这些文件上右键,选择属性,在“复制到输出目录”中选择“始终复制”(不要忘了 locales 中的文件也要这样操作)。
1203 0
|
Web App开发 移动开发 测试技术
IE9是最佳浏览器?
据CNET科技资讯网11月10日国际报道,一开始只是个意外—一个专为宣传用的博客贴出了微软最新版的Internet Explorer 9 (IE9)。但不到一个星期内,错误的信息就马上传遍了整个软件市场。
1031 0
|
Web App开发 安全 前端开发