zhaolei
9 days ago 921de2254ff5712a44ed8575ee8efe34252f6603
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
@inherits TabSetBase
 
<nav>
    <div class="d-flex">
        <div class="nav-link-bar" @onclick="MovePrev"><i class="fa fa-chevron-left"></i></div>
        <div id="navBar" class="nav nav-tabs flex-fill flex-nowrap overflow-hidden" role="tablist">
            @foreach (var tab in Tabs)
            {
                <Tab @key="@tab.Id" Active="@tab.Active" Id="@tab.Id" Icon="@tab.Icon" Url="@tab.Url.ToBlazorMenuUrl()" Title="@tab.Title"></Tab>
            }
        </div>
        <div class="nav-link-bar" @onclick="MoveNext"><i class="fa fa-chevron-right"></i></div>
        <div class="dropdown nav-link-bar">
            <div class="nav-link-close dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="fa fa-chevron-down"></i></div>
            <div class="dropdown-menu dropdown-menu-right" aria-labelledby="关闭标签下拉菜单">
                <div class="dropdown-item" @onclick="CloseCurrentTab"><span>关闭当前标签</span></div>
                <div class="dropdown-item" @onclick="CloseOtherTab"><span>关闭其他标签</span></div>
                <div class="dropdown-item" @onclick="CloseAllTab"><span>关闭所有标签</span></div>
            </div>
        </div>
    </div>
</nav>
<div class="tab-content">
    @foreach (var comp in Pages)
    {
        <div id="@string.Format("page_{0}", comp.Id)" class="tab-pane @(comp.Active ? "fade active show" : "fade")" role="tabpanel" aria-labelledby="nav-profile-tab">
            <PageContent @key="comp" Name="@comp.Name"></PageContent>
        </div>
    }
</div>