Js文件:
define(function (require) {
'use strict';
require('widgets-path/abstract/abstractClearablePresenter');
var view = require('widgets-path/abstract/abstractView');
var spinnerTemplate = require('hbs!widgets-path/loading/templates/spinner');
$.widget('els.loading', $.els.abstractClearablePresenter, {
_create: function () {
this.element = $('#loadingWidget');
this.element.html(spinnerTemplate());
this._super(view, {});
this._subscribeOnEvent('allWidgetsLoaded', this._afterLoaded);
this._subscribeOnEvent('showLoading', this._showSpinner);
this._subscribeOnEvent('hideLoading', this._hideSpinner);
},
_afterLoaded: function () {
this.element.addClass('afterLoaded');
},
_showSpinner: function () {
this.element.show();
},
_hideSpinner: function () {
this._view.hide();
}
});
return $.els.loading();
});
HI团队,
我的申请中有一个问题, 场景: 当你的页面加载时,spinner gif即将到来,直到页面加载,在chrome中工作正常。但在IE 10和IE 11中无法正常工作。
他们打电话给hbs和js
<!--[if lte IE 9]>
<img src="./common/img/loading.gif"/>
<![endif]-->
<!--[if (!IE)|(gte IE 10)]>-->
<!--<![endif]-->