forked from liweijie/education
1 line
5.8 KiB
JSON
1 line
5.8 KiB
JSON
{"remainingRequest":"C:\\Users\\Admin\\Desktop\\education\\frontend\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!C:\\Users\\Admin\\Desktop\\education\\frontend\\src\\layout\\components\\Sidebar\\index.vue?vue&type=script&lang=js","dependencies":[{"path":"C:\\Users\\Admin\\Desktop\\education\\frontend\\src\\layout\\components\\Sidebar\\index.vue","mtime":1787567993815},{"path":"C:\\Users\\Admin\\Desktop\\education\\frontend\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1787309791955},{"path":"C:\\Users\\Admin\\Desktop\\education\\frontend\\node_modules\\babel-loader\\lib\\index.js","mtime":1787309793142},{"path":"C:\\Users\\Admin\\Desktop\\education\\frontend\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1787309791955},{"path":"C:\\Users\\Admin\\Desktop\\education\\frontend\\node_modules\\vue-loader\\lib\\index.js","mtime":1787309793790}],"contextDependencies":[],"result":[{"type":"Buffer","data":"base64:Ly8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KDQppbXBvcnQgeyBtYXBHZXR0ZXJzLCBtYXBTdGF0ZSB9IGZyb20gInZ1ZXgiDQppbXBvcnQgU2lkZWJhckl0ZW0gZnJvbSAiLi9TaWRlYmFySXRlbSINCmltcG9ydCBIYW1idXJnZXIgZnJvbSAiQC9jb21wb25lbnRzL0hhbWJ1cmdlciINCmltcG9ydCB2YXJpYWJsZXMgZnJvbSAiQC9hc3NldHMvc3R5bGVzL3ZhcmlhYmxlcy5zY3NzIg0KDQpleHBvcnQgZGVmYXVsdCB7DQogICAgY29tcG9uZW50czogeyBTaWRlYmFySXRlbSwgSGFtYnVyZ2VyIH0sDQogICAgY29tcHV0ZWQ6IHsNCiAgICAgICAgLi4ubWFwU3RhdGUoWyJzZXR0aW5ncyJdKSwNCiAgICAgICAgLi4ubWFwR2V0dGVycyhbInNpZGViYXJSb3V0ZXJzIiwgInNpZGViYXIiXSksDQogICAgICAgIGFjdGl2ZU1lbnUoKSB7DQogICAgICAgICAgICBjb25zdCByb3V0ZSA9IHRoaXMuJHJvdXRlDQogICAgICAgICAgICBjb25zdCB7IG1ldGEsIHBhdGggfSA9IHJvdXRlDQogICAgICAgICAgICAvLyBpZiBzZXQgcGF0aCwgdGhlIHNpZGViYXIgd2lsbCBoaWdobGlnaHQgdGhlIHBhdGggeW91IHNldA0KICAgICAgICAgICAgaWYgKG1ldGEuYWN0aXZlTWVudSkgew0KICAgICAgICAgICAgICAgIHJldHVybiBtZXRhLmFjdGl2ZU1lbnUNCiAgICAgICAgICAgIH0NCiAgICAgICAgICAgIHJldHVybiBwYXRoDQogICAgICAgIH0sDQogICAgICAgIHZhcmlhYmxlcygpIHsNCiAgICAgICAgICAgIHJldHVybiB2YXJpYWJsZXMNCiAgICAgICAgfSwNCiAgICAgICAgaXNDb2xsYXBzZSgpIHsNCiAgICAgICAgICAgIHJldHVybiAhdGhpcy5zaWRlYmFyLm9wZW5lZA0KICAgICAgICB9DQogICAgfSwNCiAgICBtZXRob2RzOiB7DQogICAgICAgIHRvZ2dsZVNpZGVCYXIoKSB7DQogICAgICAgICAgICB0aGlzLiRzdG9yZS5kaXNwYXRjaCgnYXBwL3RvZ2dsZVNpZGVCYXInKQ0KICAgICAgICB9DQogICAgfQ0KfQ0K"},{"version":3,"sources":["index.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"index.vue","sourceRoot":"src/layout/components/Sidebar","sourcesContent":["<template>\r\n <div :class=\"['sidebar-theme-wrapper', 'theme-dark']\" :style=\"{ backgroundColor: variables.menuBackground }\">\r\n <el-scrollbar class=\"theme-dark\" wrap-class=\"scrollbar-wrapper\">\r\n <el-menu\r\n :default-active=\"activeMenu\"\r\n :collapse=\"isCollapse\"\r\n :background-color=\"variables.menuBackground\"\r\n :text-color=\"variables.menuColor\"\r\n :unique-opened=\"true\"\r\n :active-text-color=\"'#ffffff'\"\r\n :collapse-transition=\"false\"\r\n mode=\"vertical\"\r\n >\r\n <sidebar-item\r\n v-for=\"(route, index) in sidebarRouters\"\r\n :key=\"route.path + index\"\r\n :item=\"route\"\r\n :base-path=\"route.path\"\r\n />\r\n </el-menu>\r\n </el-scrollbar>\r\n\r\n <!-- 侧边栏底部折叠按钮 -->\r\n <div class=\"sidebar-collapse-bar\" @click=\"toggleSideBar\" :title=\"isCollapse ? '展开菜单' : '收起菜单'\">\r\n <hamburger :is-active=\"sidebar.opened\" class=\"collapse-hamburger\" />\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport { mapGetters, mapState } from \"vuex\"\r\nimport SidebarItem from \"./SidebarItem\"\r\nimport Hamburger from \"@/components/Hamburger\"\r\nimport variables from \"@/assets/styles/variables.scss\"\r\n\r\nexport default {\r\n components: { SidebarItem, Hamburger },\r\n computed: {\r\n ...mapState([\"settings\"]),\r\n ...mapGetters([\"sidebarRouters\", \"sidebar\"]),\r\n activeMenu() {\r\n const route = this.$route\r\n const { meta, path } = route\r\n // if set path, the sidebar will highlight the path you set\r\n if (meta.activeMenu) {\r\n return meta.activeMenu\r\n }\r\n return path\r\n },\r\n variables() {\r\n return variables\r\n },\r\n isCollapse() {\r\n return !this.sidebar.opened\r\n }\r\n },\r\n methods: {\r\n toggleSideBar() {\r\n this.$store.dispatch('app/toggleSideBar')\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style scoped lang=\"scss\">\r\n.sidebar-theme-wrapper {\r\n height: 100%;\r\n display: flex;\r\n flex-direction: column;\r\n\r\n .el-scrollbar {\r\n flex: 1;\r\n min-height: 0;\r\n }\r\n}\r\n\r\n.sidebar-collapse-bar {\r\n flex-shrink: 0;\r\n height: 48px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n cursor: pointer;\r\n color: rgba(255, 255, 255, 0.72);\r\n border-top: 1px solid rgba(255, 255, 255, 0.10);\r\n background: rgba(3, 49, 40, 0.18);\r\n transition: background-color 160ms ease, color 160ms ease;\r\n\r\n &:hover {\r\n color: #ffffff;\r\n background: rgba(255, 255, 255, 0.10);\r\n }\r\n\r\n .collapse-hamburger {\r\n line-height: 48px;\r\n font-size: 18px;\r\n }\r\n}\r\n\r\n.sidebar-theme-wrapper.theme-light .sidebar-collapse-bar {\r\n color: #909399;\r\n}\r\n</style>\r\n"]}]} |