doc: 同步 admin 脚本到 client 项目
This commit is contained in:
parent
580187475a
commit
33235323a2
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue