|
|
@@ -0,0 +1,92 @@
|
|
|
+<template>
|
|
|
+ <div class="sidebar-wrapper">
|
|
|
+ <a href="https://p.seec.seecoder.cn/" target="view_window">
|
|
|
+ <img alt="Seecoder logo" src="../../assets/seec-logo--full.png" class="logo">
|
|
|
+ </a>
|
|
|
+ <el-menu
|
|
|
+ default-active="completion"
|
|
|
+ class="el-menu-vertical-demo"
|
|
|
+ @select="handleSelect"
|
|
|
+ @open="handleOpen"
|
|
|
+ @close="handleClose">
|
|
|
+ <el-menu-item index="questionSearch">
|
|
|
+ <i class="el-icon-search"></i>
|
|
|
+ <template #title>搜索</template>
|
|
|
+ </el-menu-item>
|
|
|
+ <el-menu-item index="questionRepository">
|
|
|
+ <i class="el-icon-menu"></i>
|
|
|
+ <template #title>题库</template>
|
|
|
+ </el-menu-item>
|
|
|
+ <el-menu-item index="completion">
|
|
|
+ <i class="el-icon-notebook-1"></i>
|
|
|
+ <template #title>已做</template>
|
|
|
+ </el-menu-item>
|
|
|
+ <el-menu-item index="collection">
|
|
|
+ <i class="el-icon-collection"></i>
|
|
|
+ <template #title>收藏</template>
|
|
|
+ </el-menu-item>
|
|
|
+ <el-menu-item index="setting">
|
|
|
+ <i class="el-icon-setting"></i>
|
|
|
+ <template #title>设置</template>
|
|
|
+ </el-menu-item>
|
|
|
+ </el-menu>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+export default {
|
|
|
+ name: "SideBar",
|
|
|
+ methods: {
|
|
|
+ handleOpen(key, keyPath) {
|
|
|
+ console.log(key, keyPath);
|
|
|
+ },
|
|
|
+ handleClose(key, keyPath) {
|
|
|
+ console.log(key, keyPath);
|
|
|
+ },
|
|
|
+
|
|
|
+ // bok主页,侧边栏选择
|
|
|
+ handleSelect(index){
|
|
|
+ this.$router.push('/' + index)
|
|
|
+ },
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+@import "../../style/variables";
|
|
|
+
|
|
|
+.sidebar-wrapper {
|
|
|
+ position: relative;
|
|
|
+ width: $sideBarWidth;
|
|
|
+ height: 100%;
|
|
|
+ /*margin: 0px;*/
|
|
|
+ float: left;
|
|
|
+ background-color: #ecf5ff;
|
|
|
+}
|
|
|
+
|
|
|
+.el-menu {
|
|
|
+ --el-menu-background-color: #ecf5ff;
|
|
|
+ --el-menu-item-hover-fill: #ffffff;
|
|
|
+}
|
|
|
+
|
|
|
+.el-menu-vertical-demo {
|
|
|
+ border-right: unset;
|
|
|
+}
|
|
|
+
|
|
|
+.el-menu-item {
|
|
|
+ font-size: 16px;
|
|
|
+}
|
|
|
+
|
|
|
+li.el-menu-item.is-active {
|
|
|
+ background-color: #ffffff;
|
|
|
+}
|
|
|
+
|
|
|
+.logo {
|
|
|
+ margin-top: 9px;
|
|
|
+ margin-bottom: 9px;
|
|
|
+ height: 30px;
|
|
|
+ //position: absolute;
|
|
|
+ //top: 10px;
|
|
|
+ //right: 10px;
|
|
|
+}
|
|
|
+</style>
|