mirror of
https://gitee.com/ThingsGateway/ThingsGateway.git
synced 2025-10-25 04:33:09 +08:00
增加tab右键菜单
This commit is contained in:
@@ -26,6 +26,10 @@
|
||||
height: var(--line-chart-table-height);
|
||||
}
|
||||
|
||||
.wb-control .wb-full {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.dialog-table {
|
||||
height: calc(100vh - 200px);
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<Project>
|
||||
|
||||
<PropertyGroup>
|
||||
<PluginVersion>10.7.50</PluginVersion>
|
||||
<ProPluginVersion>10.7.50</ProPluginVersion>
|
||||
<PluginVersion>10.7.51</PluginVersion>
|
||||
<ProPluginVersion>10.7.51</ProPluginVersion>
|
||||
<AuthenticationVersion>2.5.0</AuthenticationVersion>
|
||||
<NET8Version>8.0.17</NET8Version>
|
||||
<NET9Version>9.0.6</NET9Version>
|
||||
|
||||
@@ -104,9 +104,10 @@ public partial class PluginDebugPage
|
||||
{
|
||||
Title = pluginInfo.Name,
|
||||
ContentTemplate = debugRender,
|
||||
Width = "1200px",
|
||||
Height = "800px",
|
||||
Top = "100px",
|
||||
Max = false,
|
||||
Width = "1440px",
|
||||
Height = "810px",
|
||||
Top = "70px",
|
||||
Left = "220px",
|
||||
Background = "var(--bb-primary-color)",
|
||||
};
|
||||
|
||||
@@ -86,12 +86,18 @@
|
||||
</div>
|
||||
</Side>
|
||||
<Main>
|
||||
<Tab @ref=_tab ClickTabToNavigation="true" ShowToolbar="true" ShowContextMenu="true" ShowContextMenuFullScreen="true" ShowExtendButtons="false" ShowClose="true" AllowDrag=true
|
||||
<Tab @ref=_tab ClickTabToNavigation="true" ShowToolbar="true" ShowContextMenu="true" ShowContextMenuFullScreen="true" ShowExtendButtons="false" ShowClose="true" AllowDrag=true
|
||||
AdditionalAssemblies="@App.RazorAssemblies" Menus="@MenuService.AllOwnMenuItems"
|
||||
DefaultUrl=@("/") Body=@(Body!) OnCloseTabItemAsync=@((a)=>
|
||||
{
|
||||
return Task.FromResult(!(a.Url=="/"||a.Url.IsNullOrEmpty()));
|
||||
})>
|
||||
<BeforeContextMenuTemplate>
|
||||
|
||||
<ContextMenuItem Icon="fa fa-window-restore" Text="@Localizer["WindowRestore"]" OnClick="WinboxRender"></ContextMenuItem>
|
||||
<ContextMenuDivider></ContextMenuDivider>
|
||||
|
||||
</BeforeContextMenuTemplate>
|
||||
</Tab>
|
||||
</Main>
|
||||
<NotAuthorized>
|
||||
|
||||
@@ -124,6 +124,39 @@ public partial class MainLayout : IDisposable
|
||||
|
||||
#endregion 注销
|
||||
|
||||
|
||||
private async Task WinboxRender(ContextMenuItem item, object? context)
|
||||
{
|
||||
if (context is TabItem tabItem)
|
||||
{
|
||||
await WinboxRender(tabItem.ChildContent, tabItem.Text);
|
||||
await _tab.RemoveTab(tabItem);
|
||||
}
|
||||
}
|
||||
[Inject]
|
||||
[NotNull]
|
||||
private WinBoxService? WinBoxService { get; set; }
|
||||
|
||||
private async Task WinboxRender(RenderFragment item, string title)
|
||||
{
|
||||
if (item != null)
|
||||
{
|
||||
var option = new WinBoxOption()
|
||||
{
|
||||
Title = title,
|
||||
ContentTemplate = item,
|
||||
Max = false,
|
||||
Width = "1440px",
|
||||
Height = "810px",
|
||||
Top = "70px",
|
||||
Left = "220px",
|
||||
Background = "var(--bb-primary-color)",
|
||||
};
|
||||
await WinBoxService.Show(option);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private string _versionString = string.Empty;
|
||||
[Inject]
|
||||
[NotNull]
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
::deep .avatar {
|
||||
|
||||
.mainlayout ::deep .menu-icon {
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
|
||||
::deep .avatar {
|
||||
border-radius: 1.5rem;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
"Welcome": "Welcome"
|
||||
},
|
||||
"ThingsGateway.Server.MainLayout": {
|
||||
"WindowRestore": "FloatingWindow",
|
||||
"变量管理": "Variable",
|
||||
"采集设备": "CollectionDevices",
|
||||
"菜单管理": "Menu",
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
"Welcome": "欢迎使用"
|
||||
},
|
||||
"ThingsGateway.Server.MainLayout": {
|
||||
"WindowRestore": "浮动小窗",
|
||||
"变量管理": "变量管理",
|
||||
"采集设备": "采集设备",
|
||||
"菜单管理": "菜单管理",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<Version>10.7.50</Version>
|
||||
<Version>10.7.51</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user