doc: 同步 admin 脚本到 client 项目

This commit is contained in:
Argo Zhang 2019-08-23 23:06:45 +08:00
parent 580187475a
commit 33235323a2
2 changed files with 6 additions and 2 deletions

View File

@ -149,15 +149,17 @@
// see https://gitee.com/LongbowEnterprise/longbow-select/issues/IZ3BR?from=project-issue
this.$input.attr('value', '').removeClass('is-valid is-invalid');
this.$menus.html('');
var $activeItem = null;
$.each(value, function (index) {
var $item = $('<a class="dropdown-item" href="#" data-val="' + this.value + '">' + this.text + '</a>');
that.$menus.append($item);
if (this.selected === true || this.value === oldValue || index === 0 || this.value === that.$element.attr('data-default-val')) {
that.$input.attr('value', this.text);
that.$element.val(this.value).attr('data-text', this.text);
$item.addClass('active');
$activeItem = $item;
}
});
if ($activeItem !== null) $activeItem.addClass('active');
this.source = value;
};

View File

@ -238,7 +238,9 @@
footer: function (options) {
var op = $.extend({ header: "header", content: "body > section:first", ele: 'footer' }, options);
var $ele = $(op.ele);
return $(op.header).outerHeight() + $(op.content).outerHeight() + $ele.outerHeight() > $(window).height() ? $ele.removeClass('position-fixed') : $ele.addClass('position-fixed');
// 增加 1px 修复 IE11 下由于小数点导致页脚消失bug
return $(op.header).outerHeight() + $(op.content).outerHeight() + $ele.outerHeight() > $(window).height() + 1 ? $ele.removeClass('position-fixed') : $ele.addClass('position-fixed');
},
formatUrl: function (url) {
if (!url) return url;