feat: 增加 lgbinfo 组件
#Comment 网站设置 Blazor 开关更新为 lgbinfo 组件
This commit is contained in:
parent
be80b0c629
commit
98b8eac888
|
@ -177,7 +177,7 @@
|
||||||
<div class="form-inline">
|
<div class="form-inline">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-6">
|
<div class="form-group col-6">
|
||||||
<label class="control-label" for="blazor">Blazor</label>
|
<label class="control-label" for="blazor">MVC 切换</label>
|
||||||
<Toggle @bind-Value="@Model.EnableBlazor" OnText="开启" OffText="关闭"></Toggle>
|
<Toggle @bind-Value="@Model.EnableBlazor" OnText="开启" OffText="关闭"></Toggle>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -169,13 +169,10 @@
|
||||||
<div class="card" asp-auth="blazor">
|
<div class="card" asp-auth="blazor">
|
||||||
<div class="card-header">网站设置</div>
|
<div class="card-header">网站设置</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="alert alert-info" role="alert">
|
|
||||||
<span>开启此功能网站增加 Blazor 与 MVC 切换挂件</span>
|
|
||||||
</div>
|
|
||||||
<div class="form-inline">
|
<div class="form-inline">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-6">
|
<div class="form-group col-6">
|
||||||
<label class="control-label" for="blazor">Blazor</label>
|
<label class="control-label" data-toggle="lgbinfo" data-content="开启此功能网站增加 Blazor 与 MVC 切换挂件" for="blazor">Blazor 切换</label>
|
||||||
<input id="blazor" hidden type="checkbox" data-default-val="@Model.EnableBlazor" data-toggle="toggle" data-width="120" data-onstyle="success" data-on="开启" data-off="关闭" />
|
<input id="blazor" hidden type="checkbox" data-default-val="@Model.EnableBlazor" data-toggle="toggle" data-width="120" data-onstyle="success" data-on="开启" data-off="关闭" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -622,15 +622,21 @@
|
||||||
lgbInfo: function (option) {
|
lgbInfo: function (option) {
|
||||||
this.each(function () {
|
this.each(function () {
|
||||||
var $element = $(this);
|
var $element = $(this);
|
||||||
$element.append($.format('<a href="#" tabindex="-1" role="button" data-toggle="popover"><i class="fa fa-question-circle"></i></a>'));
|
$element.append($('<a href="#" tabindex="-1" role="button" data-toggle="popover"><i class="fa fa-question-circle"></i></a>'));
|
||||||
});
|
});
|
||||||
var container = this.attr('data-container') || '#dialogNew';
|
var container = this.attr('data-container') || 'body';
|
||||||
this.find('[data-toggle="popover"]').popover($.extend({
|
this.find('[data-toggle="popover"]').popover($.extend({
|
||||||
title: function () {
|
title: function () {
|
||||||
return $(this).parent().text();
|
return $(this).parent().text();
|
||||||
}, content: function () {
|
},
|
||||||
|
content: function () {
|
||||||
return $(this).parent().attr('data-content');
|
return $(this).parent().attr('data-content');
|
||||||
}, trigger: 'focus', html: true, container: container, placement: function () {
|
},
|
||||||
|
trigger: 'focus',
|
||||||
|
html: false,
|
||||||
|
sanitize: true,
|
||||||
|
container: container,
|
||||||
|
placement: function () {
|
||||||
return $(this.element).parent().attr('data-placement') || 'auto';
|
return $(this.element).parent().attr('data-placement') || 'auto';
|
||||||
}
|
}
|
||||||
}, option));
|
}, option));
|
||||||
|
|
Loading…
Reference in New Issue