!2459 fix(#I4V6HA): throw exception when NullSwitch bind property has [Required] attribute

* chore: bump version 6.3.3
* chore: 更新打包文件
* fix: NullSwitch 报错问题
This commit is contained in:
Argo 2022-02-24 14:00:50 +00:00
parent 5190d3976e
commit 1f3c28021c
5 changed files with 30 additions and 25 deletions

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<Version>6.3.3-beta03</Version>
<Version>6.3.3</Version>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">

View File

@ -2,31 +2,33 @@
$.extend({
bb_tooltip: function (id, method, title, placement, html, trigger) {
var ele = document.getElementById(id);
var instance = bootstrap.Tooltip.getInstance(ele);
if (instance) {
instance.dispose();
}
if (method !== 'dispose') {
var op = { html: html, sanitize: !html, title: title, placement: placement, trigger: trigger };
instance = new bootstrap.Tooltip(ele, op);
var $ele = $(ele);
if (method === 'enable') {
var $ctl = $ele.parents('form').find('.is-invalid:first');
if ($ctl.prop("nodeName") === 'INPUT') {
if ($ctl.prop('readonly')) {
if (ele !== null) {
var instance = bootstrap.Tooltip.getInstance(ele);
if (instance) {
instance.dispose();
}
if (method !== 'dispose') {
var op = { html: html, sanitize: !html, title: title, placement: placement, trigger: trigger };
instance = new bootstrap.Tooltip(ele, op);
var $ele = $(ele);
if (method === 'enable') {
var $ctl = $ele.parents('form').find('.is-invalid:first');
if ($ctl.prop("nodeName") === 'INPUT') {
if ($ctl.prop('readonly')) {
$ctl.trigger('focus');
}
else {
$ctl.focus();
}
}
else if ($ctl.prop("nodeName") === 'DIV') {
$ctl.trigger('focus');
}
else {
$ctl.focus();
}
}
else if ($ctl.prop("nodeName") === 'DIV') {
$ctl.trigger('focus');
else if (method !== '') {
$ele.tooltip(method);
}
}
else if (method !== '') {
$ele.tooltip(method);
}
}
},
});

View File

@ -3,8 +3,11 @@
bb_form: function (id, method) {
var $el = $('#' + id);
$el.find('[aria-describedby]').each(function (index, ele) {
var $ele = $(ele);
$ele.tooltip('dispose');
var tooltip = bootstrap.Tooltip.getInstance(ele);
if (tooltip) {
var $ele = $(ele);
$ele.tooltip('dispose');
}
});
}
});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long