fix: 正则一处 jQuery 对象判断

This commit is contained in:
邹景立 2025-03-28 23:21:29 +08:00
parent 271d3a50e3
commit e16f0c4294

View File

@ -81,9 +81,8 @@ define(function () {
}; };
this.insertError = function ($el) { this.insertError = function ($el) {
return (function ($icon) { return (function ($icon) {
console.log($icon)
return $el.data('vali-tags').css({ return $el.data('vali-tags').css({
top: $el.position().top + 'px', right: (($icon ? $icon.width() + parseFloat($icon.css('right') || 0) : 0) + 10) + 'px', top: $el.position().top + 'px', right: (($icon.length > 0 ? $icon.width() + parseFloat($icon.css('right') || 0) : 0) + 10) + 'px',
paddingTop: $el.css('marginTop'), lineHeight: ($el.get(0).nodeName || '') === 'TEXTAREA' ? '32px' : $el.css('height'), paddingTop: $el.css('marginTop'), lineHeight: ($el.get(0).nodeName || '') === 'TEXTAREA' ? '32px' : $el.css('height'),
}); });
})($el.nextAll('.input-right-icon'), $el.data('vali-tags') || function () { })($el.nextAll('.input-right-icon'), $el.data('vali-tags') || function () {