qianlishi 3 years ago
parent f6364315fc
commit 5d531557c7

@ -3,36 +3,47 @@
<div class="admin-title" @click="goBigScreen">
<img src="../../../../../static/logo-dp.png" width="50" class="mt10" />
</div>
<el-menu :show-timeout="200" :default-active="$route.path" :collapse="isCollapse" mode="vertical">
<sidebar-item v-for="route in routes" :key="route.path" :item="route" :base-path="route.path" />
<el-menu
:show-timeout="200"
:default-active="$route.path"
:collapse="isCollapse"
mode="vertical"
>
<sidebar-item
v-for="route in routes"
:key="route.path"
:item="route"
:base-path="route.path"
/>
</el-menu>
<div class="version">V0.9.5</div>
</el-scrollbar>
</template>
<script>
import { mapGetters } from 'vuex'
import SidebarItem from './SidebarItem'
import { mapGetters } from "vuex";
import SidebarItem from "./SidebarItem";
export default {
components: { SidebarItem },
computed: {
...mapGetters(['sidebar']),
...mapGetters(["sidebar"]),
routes() {
return this.$router.options.routes
return this.$router.options.routes;
},
isCollapse() {
return !this.sidebar.opened
},
return !this.sidebar.opened;
}
},
methods: {
goBigScreen() {
let routeUrl = this.$router.resolve({
path: '/report/bigScreen',
})
window.open(routeUrl.href, '_blank')
},
},
}
path: "/report/bigScreen"
});
window.open(routeUrl.href, "_blank");
}
}
};
</script>
<style lang="scss" scoped>
@ -49,4 +60,11 @@ export default {
.admin-title:hover {
cursor: pointer;
}
.version {
color: #999;
position: absolute;
bottom: 10px;
font-size: 16px;
margin-left: 10px;
}
</style>

Loading…
Cancel
Save