ios – Sencha Touch没有初始化

ios – Sencha Touch没有初始化,第1张

概述我的sencha touch应用程序在所有浏览器中运行良好,但是当我将URL保存到iPad主屏幕时.它不会加载,只显示一个空白屏幕.我没有得到JS错误,调试时没有任何内容通过日志.下面是应用程序的示例: script type="text/javascript"> var rootPanel; if (navigator.userAgent.match(/iPad/i)) { 我的sencha touch应用程序在所有浏览器中运行良好,但是当我将URL保存到iPad主屏幕时.它不会加载,只显示一个空白屏幕.我没有得到Js错误,调试时没有任何内容通过日志.下面是应用程序的示例:

script type="text/JavaScript">    var rootPanel;    if (navigator.userAgent.match(/iPad/i)) {        vIEwport = document.querySelector("Meta[name=vIEwport]");        vIEwport.setAttribute('content','wIDth=980');    }    Ext.application({        launch: function () {            var contactForm = Ext.create('Ext.form.FormPanel',{                standardsubmit: true,fullscreen: true,items: [{                    xtype: 'Titlebar',Title: 'My App',docked: 'top'                },{                    xtype: 'fIEldset',items: [{                        xtype: 'textfIEld',name: 'Loginname',label: 'Login name:'                    },{                        xtype: 'passwordfIEld',name: 'Password',label: 'Password:'                    },{                        xtype: 'hIDdenfIEld',name: 'ReturnUrl',value: '/returnUser.HTML'                    }] // items                },{                    xtype: 'toolbar',layout: {                        pack: 'center'                    },// layout                    ui: 'plain',items: [{                        xtype: 'button',text: 'reset',ui: 'decline',handler: function (btn,evt) {                            Ext.Msg.confirm('','Are you sure you want to reset this form?',function (btn) {                                if (btn === 'yes') {                                    contactForm.setValues({                                        Loginname: '',Password: ''                                    }); // contactForm()                                } // switch                            }); // confirm()                        }                    },{                        xtype: 'button',text: 'submit',ui: 'confirm',evt) {                            var values = contactForm.getValues();                            contactForm.submit({                                url: 'Login',method: 'POST',waitTitle: 'Connecting',waitMsg: 'Sending data...',success: function (form,result) {                                    Ext.Msg.alert('Login succeeded!',result.response.reason);                                },failure: function (form,result) {                                    Ext.Msg.alert('Login Failed!',result.response.reason);                                }                            });                        } // handler                    }] // items (toolbar)                }] // items (formpanel)            }); // create()        } // launch    }); // application()    $(document).ready(function () {    });

我在Ext.Application的启动方法中发出警报但它没有显示.当我在document.ready函数中发出警告时,它确实显示了.我还应该注意它在ipad浏览器上工作,而不是从主屏幕上的图标启动时.

解决方法 我在androID中面临类似的问题实际上在我的情况下问题是因为Ext.Loader未启用我看到你还没有包括它.在Ext.application&之前包含此脚本看看它是否有效

Ext.Loader.setConfig({    enabled:true});Ext.application({...});
总结

以上是内存溢出为你收集整理的ios – Sencha Touch没有初始化全部内容,希望文章能够帮你解决ios – Sencha Touch没有初始化所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1081951.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-27
下一篇 2022-05-27

发表评论

登录后才能评论

评论列表(0条)

保存