<template>

    <div class="sidebar">
    <div class="logo_details">
            <i class="iconfont">&#xe6fd;</i>
            <span class="logo_name">天堂岛医院管理系统</span>
    </div>
    <ul class="nav-links">
        <li>
            <a href="#">
                <i class="iconfont">&#xe619;</i>
                <span class="link_name">所有患者信息</span>
            </a>
        </li>
        <li>
            <div class="icon-link">
                <a href="#">
                    <i class="iconfont">&#xe634;</i>
                    <span class="link_name">患者健康状态数据</span>
                </a>
            </div>
        </li>
        <li>
            <div class="icon-link">
                <a href="#">
                    <i class="iconfont">&#xe7ad;</i>
                    <span class="link_name">所有医生信息</span>
                </a>
            </div>
        </li>
        <li>
            <a href="#">
                <i class="iconfont">&#xe600;</i>
                <span class="link_name">医生工作时间排班</span>
            </a>
        </li>
        <li>
            <a href="#">
                <i class="iconfont">&#xe917;</i>
                <span class="link_name">消息中心</span>
            </a>
        </li>
        <li>
            <a href="#">
                <i class="iconfont">&#xe62b;</i>
                <span class="link_name">设置</span>
            </a>
        </li>
    </ul>

</div>

</template>

<script>

    let arrow = document.querySelectorAll(".arrow");
    for (var i = 0; i < arrow.length; i++) {
        arrow[i].addEventListener("click", (e)=>{
            let arrowParent = e.target.parentElement.parentElement;
            arrowParent.classList.toggle("showMenu");
        });
    }

    let sidebar = document.querySelector(".sidebar");
    let sidebarBtn = document.querySelector(".icon-menu1");
    console.log(sidebarBtn);
    sidebarBtn.addEventListener("click", ()=>{
        sidebar.classList.toggle("close");
    });
</script>


<style scoped>
    @import '../static/bootstrap/bootstrap/css/bootstrap.min.css';
    @import '../static/iconfont/iconfont.css';
    @import '../static/css/Style.css';
</style>