如何将 Syncfusion Sidebars <span> class 转换为我的自定义设计?

How to transform a Syncfusion Sidebars <span> class to my custom design?

目前我已经在我的 Syncfusion Blazor 项目中添加了一个侧边栏,这个侧边栏有一个侧边栏项目可以将菜单扩展到更宽或将其调整到更小,但是这种设计不是我想要的。我得到的是:

边栏已打开:

边栏已关闭:

现在的问题是侧边栏项目“<菜单”,单击此项目将打开全宽或侧边栏或将其关闭(如果已打开)。我想要达到的是这样的:

上图表示一个侧边栏项目,与“<菜单>相同。我正在尝试将“<菜单”侧边栏项目转换为类似这样的东西,有人知道如何实现吗?

边栏代码:

   <SfSidebar Width="220px" DockSize="72px" EnableDock="true" Position="SidebarPosition.Left" @ref="Sidebar" HtmlAttributes="@HtmlAttribute">
        <ChildContent>
            <div class="dock">
                <ul>
                    <li class="sidebar-item" id="toggle" @onclick="@Toggle">
                        <NavLink class="nav-link" href="">
                            <span class="e-icons expand"></span>
                            <span class="e-text" title="home">Menu</span>
                        </NavLink>
                    </li>
                    <li class="sidebar-item">
                        <NavLink class="nav-link" href="page1" Match="NavLinkMatch.All">
                            <span class="oi oi-dashboard" style="font-size: 30px; margin-right: 15px;"></span>
                            <span class="e-text" title="home">Page 1</span>
                        </NavLink>
                    </li>
                    <li class="sidebar-item">
                        <NavLink class="nav-link" href="page2" Match="NavLinkMatch.All">
                            <span class="oi oi-graph" style="font-size: 30px; margin-right: 15px;"></span>
                            <span class="e-text" title="profile">Page 2</span>
                        </NavLink>
                    </li>
                    <li class="sidebar-item">
                        <NavLink class="nav-link" @onclick="()=>expandShipDetailsSubNav = !expandShipDetailsSubNav">
                            <span class="oi oi-eye" style="font-size: 30px; margin-right: 15px;"></span>
                            <span class="e-text" title="info">Page 3</span>
                        </NavLink>
                        @if (expandShipDetailsSubNav)
                        {
                            <NavLink class="nav-link" href="/page3/1" Match="NavLinkMatch.All">
                                Vessel 1
                            </NavLink>
                            <NavLink class="nav-link" href="/page3/2" Match="NavLinkMatch.Prefix">
                                Vessel 2
                            </NavLink>
                            <NavLink class="nav-link" href="/page3/3" Match="NavLinkMatch.Prefix">
                                Vessel 3
                            </NavLink>
                            <NavLink class="nav-link" href="/page3/4" Match="NavLinkMatch.Prefix">
                                Vessel 4
                            </NavLink>
                            <NavLink class="nav-link" href="/page3/5" Match="NavLinkMatch.Prefix">
                                Vessel 5
                            </NavLink>

                        }
                    </li>
                    <li class="sidebar-item">
                        <NavLink class="nav-link" @onclick="()=>expandReportingSubNav = !expandReportingSubNav">
                            <span class="oi oi-file" style="font-size: 30px; margin-right: 15px;"></span>
                            <span class="e-text" title="info">Page 4</span>
                        </NavLink>
                        @if (expandReportingSubNav)
                        {
                            <NavLink class="nav-link" href="/page4/1" Match="NavLinkMatch.All">
                                EU MRV
                            </NavLink>
                            <NavLink class="nav-link" href="/page4/2" Match="NavLinkMatch.Prefix">
                                IMO DCS
                            </NavLink>
                        }
                    </li>
                    <li class="sidebar-item">
                        <NavLink class="nav-link" href="page 5" Match="NavLinkMatch.All">
                            <span class="oi oi-cog" style="font-size: 30px; margin-right: 15px;"></span>
                            <span class="e-text" title="home">Page 5</span>
                        </NavLink>
                    </li>
                    <li class="sidebar-item" id="li6">
                        <NavLink class="nav-link" href="" @onclick="@OnBtnClick">
                            <span class="oi oi-power-standby" style="font-size: 30px; margin-right: 15px;"></span>
                            <span class="e-text" title="home">Sign Out</span>
                        </NavLink>
                    </li>
                </ul>
            </div>
        </ChildContent>
    </SfSidebar>

CSS:

<style>
.title {
    text-align: center;
    font-size: 20px;
    padding: 15px;
}

.sub-title {
    text-align: center;
    font-size: 16px;
    padding: 10px;
}

#wrapper .sub-title .column {
    display: inline-block;
    padding: 10px;
}
/* custom code start */
.center {
    text-align: center;
    display: none;
    font-size: 13px;
    font-weight: 400;
    margin-top: 20px;
}

.sb-content-tab .center {
    display: block;
}
/* custom code end */
/* end of content area styles */
/* Sidebar styles */
.dockSidebar.e-sidebar.e-right.e-close {
    visibility: visible;
    transform: translateX(0%);
}

.dockSidebar .e-icons::before {
    font-size: 25px;
}
/* dockbar icon Style */
.dockSidebar .home::before {
    content: '\e102';
}

.dockSidebar .profile::before {
    content: '\e10c';
}

.dockSidebar .info::before {
    content: '\e11b';
}

.dockSidebar .settings::before {
    content: '\e10b';
}

.e-sidebar .expand::before,
.e-sidebar.e-right.e-open .expand::before {
    content: '\e10f';
}

.e-sidebar.e-open .expand::before,
.e-sidebar.e-right .expand::before {
    content: '\e10e';
}
/* end of dockbar icon Style */
.dockSidebar.e-close .sidebar-item {
    /*padding: 5px 20px;*/
}

.dockSidebar.e-dock.e-close span.e-text {
    display: none;
}

.dockSidebar.e-dock.e-open span.e-text {
    display: inline-block;
}

.dockSidebar li {
    list-style-type: none;
    cursor: pointer;
}

.dockSidebar ul {
    padding: 0px;
}

.dockSidebar.e-sidebar ul li:hover span {
    /*color: white;*/
}

.dockSidebar span.e-icons {
    color: #c0c2c5;
    line-height: 2
}

.e-open .e-icons {
    margin-right: 16px;
}

.e-open .e-text {
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 23px;
    font-size: 15px;
}

.sidebar-item {
    text-align: center;
    border-bottom: 1px #e5e5e58a solid;
}

.e-sidebar.e-open .sidebar-item {
    text-align: left;
    /*padding-left: 15px;*/
    color: #c0c2c5;
}

.dockSidebar.e-sidebar {
    background: #2d323e;
    overflow: hidden;
}
/* custom generated icons styles */
@@font-face {
    font-family: 'e-icons';
    src: url(data:application/x-font-ttf;charset=utf-8;base64,AAEAAAAKAIAAAwAgT1MvMjciQ6oAAAEoAAAAVmNtYXBH1Ec8AAABsAAAAHJnbHlmKcXfOQAAAkAAAAg4aGVhZBLt+DYAAADQAAAANmhoZWEHogNsAAAArAAAACRobXR4LvgAAAAAAYAAAAAwbG9jYQukCgIAAAIkAAAAGm1heHABGQEOAAABCAAAACBuYW1lR4040wAACngAAAJtcG9zdEFgIbwAAAzoAAAArAABAAADUv9qAFoEAAAA//UD8wABAAAAAAAAAAAAAAAAAAAADAABAAAAAQAAlbrm7l8PPPUACwPoAAAAANfuWa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G9wAAA=) format('truetype');
    font-weight: normal;
    font-style: normal;
}
/* end of custom generated icons styles */
/* custom code start */
.sf-new .sb-header,
.sf-new .sb-bread-crumb,
.sf-new #action-description,
.sf-new .sb-action-description,
.sf-new .e-tab-header,
.sf-new .description-section,
.sf-new #description-section,
.sf-new #description,
.sf-new #navigation-btn,
.sf-new .sb-toolbar-splitter,
.sf-new .sb-footer, .sf-new #left-sidebar, .sb-component-name {
    display: none
}

.sf-new .sb-right-pane.e-view {
    margin-left: 0px !important;
}

.sb-action-description.sb-rightpane-padding {
    padding-bottom: 0;
}

.description-section {
    padding-top: 0;
}

#sb-content-header {
    display: none
}

#content-tab.sb-content-tab {
    height: 100% !important;
}

.sf-new .container-fluid,
.sf-new .container-fluid .control-section,
#sidebar-section, description-section sb-rightpane-padding {
    padding: 0;
}

.sb-component-name.sb-rightpane-padding {
    margin-top: -56px;
}

.sb-right-pane.e-view {
    left: 0;
    padding-left: 0;
    padding-right: 0;
    top: 0;
    overflow-y: hidden;
}

.sb-desktop-wrapper {
    height: 100%;
}

.sb-component-name h1 {
    padding-top: 0;
}

.sf-new .sb-content.e-view {
    top: 0;
}
/* end of newTab support */
/* custom code end */
/* end of sidebar styles */

/* Custom css*/

.sidebar-item {
    color: #BBBBBB !important;
}

a {
    color: #BBBBBB !important;
}


.sidebar-item:hover {
    color: white !important;
}

a:hover {
    color: white !important;
}

/* Custom button */
.e-custom {
    border-radius: 15px;
    height: 30px;
    width: 150px;
}

    .e-custom, .e-custom:hover, .e-custom:focus, .e-custom:active {
        background-color: #ff6e40;
        color: #fff;
    }

#button-control {
    width: 100%;
    margin: 8% 0;
    text-align: center;
}

@@media only screen and (max-width: 500px) {
    #button-control {
        margin-left: -3%;
    }
}

.button-section {
    width: 100%;
    margin: auto;
}

#button-control .col-xs-12 {
    margin: 15px 0;
}

@@font-face {
    font-family: 'button-icons';
    src: url(data:application/x-font-ttf;charset=utf-8;base64,AAEAAAAKAIAAAwAgT1MvMj1uSf8AAAEoAAA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AGkAbwBuACAATQBlAHQAcgBvACAAUwB0AHUAZABpAG8AdwB3AHcALgBzAHkAbgBjAGYAdQBzAGkAbwBuAC4AYwBvAG0AAAAAAgAAAAAAAAAKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANAQIBAwEEAQUBBgEHAQgBCQEKAQsBDAENAQ4ACm1lZGlhLXBsYXkLbWVkaWEtcGF1c2UQLWRvd25sb2FkLTAyLXdmLQltZWRpYS1lbmQHYWRkLW5ldwtuZXctbWFpbC13ZhB1c2VyLWRvd25sb2FkLXdmDGV4cGFuZC0wMy13Zg5kb3dubG9hZC0wMi13ZgphZGQtbmV3XzAxC21lZGlhLWVqZWN0Dm1lZGlhLWVqZWN0LTAxAAA=) format('truetype');
    font-weight: normal;
    font-style: normal;
}

.e-btn-sb-icons {
    font-family: 'button-icons';
    line-height: 1;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.e-play-icon::before {
    content: '\e701';
}

.e-pause-icon::before {
    content: '\e705';
}

.e-open-icon::before {
    content: '\e70d';
}

.e-add-icon::before {
    content: '\e70a';
}

我们已经检查了您对侧边栏组件的要求。当禁用侧边栏的 EnableDock 属性 时,它 expand/collapse 侧边栏基于侧边栏组件的全宽。请参考以下 link 了解更多关于 EnableDock 属性.

https://blazor.syncfusion.com/documentation/sidebar/docking-sidebar/

根据您分享的图片,您希望在单击粘滞按钮时打开边栏。要实现这个需求,需要在SF Sidebar元素中添加sticky button,然后点击sticky button click时可以展开或折叠sidebar组件。

我们准备了一个简单的示例,其中将侧边栏放置在屏幕的左端,并向其添加了粘性按钮,就像您对侧边栏的期望一样。

/* sample-level sticky button styles */  
  .e-sidebar #e-leftSticky { 
        position: relative; 
        cursor: pointer; 
        top: 50%; 
        height: 30px; 
        left: -57px; 
        border-radius: 0px 0px 10px 10px; 
        background: linear-gradient(90deg, #000428, #004e92); 
        text-align: left; 
        font-size: 18px; 
        text-align: center; 
        text-indent: 10px; 
        -ms-transform: rotate(270deg); 
        -webkit-transform: rotate(270deg); 
        transform: rotate(270deg); 
    } 
 
    .e-sidebar.e-close, .e-sidebar.e-open { 
        overflow: initial; 
        visibility: visible !important; 
    } 

参考下面的示例 link。 https://www.syncfusion.com/downloads/support/directtrac/general/ze/Responsive_Sidebar37687257.zip

要了解有关 Sidebar 组件的更多信息,请参阅下面的 links。

UG文档-https://blazor.syncfusion.com/documentation/sidebar/getting-started/

演示 link-https://blazor.syncfusion.com/demos/sidebar/default-functionalities/

API参考-https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor~Syncfusion.Blazor.Navigations.ISidebar_members.html

如果您需要任何进一步的帮助,请告诉我们。

此致,

Sowmiya.P