mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2026-06-07 12:38:11 +08:00
fix: 兼容 JQuerySize用法
This commit is contained in:
parent
460e06bdf2
commit
a3d3c11505
@ -24,6 +24,7 @@ window.form = layui.form, window.layer = layui.layer;
|
||||
window.laytpl = layui.laytpl, window.laydate = layui.laydate;
|
||||
window.jQuery = window.$ = window.jQuery || window.$ || layui.$;
|
||||
window.jQuery.ajaxSetup({xhrFields: {withCredentials: true}});
|
||||
window.jQuery.fn.size || (window.jQuery.fn.size = () => this.length);
|
||||
|
||||
/*! 配置 require 参数 */
|
||||
require.config({
|
||||
|
||||
@ -81,12 +81,13 @@ define(function () {
|
||||
};
|
||||
this.insertError = function ($el) {
|
||||
return (function ($icon) {
|
||||
console.log($icon)
|
||||
return $el.data('vali-tags').css({
|
||||
top: $el.position().top + 'px', right: (($icon ? $icon.width() + parseFloat($icon.css('right') || 0) : 0) + 10) + 'px',
|
||||
paddingTop: $el.css('marginTop'), lineHeight: ($el.get(0).nodeName || '') === 'TEXTAREA' ? '32px' : $el.css('height'),
|
||||
});
|
||||
})($el.nextAll('.input-right-icon'), $el.data('vali-tags') || function () {
|
||||
let css = 'display:block;position:absolute;text-align:center;color:#c44;font-size:12px;z-index:2';
|
||||
let css = 'display:block;position:absolute;text-align:center;color:#c44;font-size:12px;z-index:2;right:8px';
|
||||
$el.data('vali-tags', $('<span class="layui-anim notselect" style="' + css + '"></span>').insertAfter($el));
|
||||
}());
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user