web/bundles/topxiaadmin/js/controller/open-course/ProgressBar.js
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
define(function(require, exports, module) {
var Widget = require('widget');
var ProgressBar = Widget.extend({
setProgress: function(progress, text) {
this.$('.progress-bar').css({width: progress + '%'});
this.$('.progress-text').html(text);
if (progress >= 100) {
this.trigger('completed');
}
},
reset: function() {
this.$('.progress-bar').css({width: '0%'});
this.$('.progress-text').html('');
},
show: function() {
this.element.show();
},
hide: function() {
this.element.hide();
},
active: function() {
this.$('.progress').addClass('active');
},
deactive: function() {
this.$('.progress').removeClass('active');
},
text: function(text) {
this.$('.progress-text').html(text);
},
error: function(text) {
this.$('.progress-bar').addClass('progress-bar-danger');
this.$('.progress-text').addClass('text-danger').html(text);
this.deactive();
},
recovery: function() {
this.$('.progress-bar').removeClass('progress-bar-danger');
this.$('.progress-text').removeClass('text-danger').html('');
this.active();
},
hasError: function() {
return this.$('.progress-bar').hasClass('progress-bar-danger');
}
});
module.exports = ProgressBar;
});
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。