|
@@ -0,0 +1,70 @@
|
|
|
+<template>
|
|
|
+ <div id="serviceLeft">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24" class="main">
|
|
|
+ <!-- <el-menu :default-active="path" class="el-menu-vertical-demo" :router="true">
|
|
|
+ <template v-for="(item, index) in subMenu">
|
|
|
+ <template v-if="item.children&&item.children.length>0">
|
|
|
+ <template v-for="(sec) in item.children">
|
|
|
+ <el-menu-item :index="sec.path" :key="sec.id" v-if="sec.type !== 'url'">{{ sec.title }}</el-menu-item>
|
|
|
+ <el-menu-item :index="``" :key="sec.id" @click="turnTo(sec.url)" v-else> {{ sec.title }}</el-menu-item>
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+ <el-menu-item :index="item.path" :key="index" v-else-if="item.type === 'content'||item.type==='column'">{{ item.title }}</el-menu-item>
|
|
|
+ <el-menu-item :index="`${index}-${subIndex}`" :key="index" @click="turnTo(item.url)" v-else> {{ item.title }}</el-menu-item>
|
|
|
+ </template>
|
|
|
+ </el-menu> -->
|
|
|
+ <el-menu default-active="1" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose">
|
|
|
+ <el-menu-item index="1">
|
|
|
+ <span slot="title">需求发布</span>
|
|
|
+ </el-menu-item>
|
|
|
+ </el-menu>
|
|
|
+ <el-col :span="24" class="button">
|
|
|
+ <el-button type="primary" plain>我要发布</el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { mapActions, mapState, mapMutations } from 'vuex';
|
|
|
+export default {
|
|
|
+ name: 'serviceLeft',
|
|
|
+ props: {},
|
|
|
+ components: {},
|
|
|
+ created() { this.getSubMenu() },
|
|
|
+ watch: {
|
|
|
+ path: 'getSubMenu',
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapState(['subMenu']),
|
|
|
+ path() {
|
|
|
+ return this.$route.path;
|
|
|
+ },
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ ...mapMutations(['setSubMenu']),
|
|
|
+ getSubMenu() {
|
|
|
+ this.setSubMenu(this.path);
|
|
|
+ },
|
|
|
+ handleOpen(key, keyPath) {
|
|
|
+ console.log(key, keyPath);
|
|
|
+ },
|
|
|
+ handleClose(key, keyPath) {
|
|
|
+ console.log(key, keyPath);
|
|
|
+ }
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less" scoped>
|
|
|
+.main {
|
|
|
+ min-height: 500px;
|
|
|
+ background-color: rgba(255, 255, 255, 0.8);
|
|
|
+}
|
|
|
+.button {
|
|
|
+ text-align: right;
|
|
|
+ padding: 10px;
|
|
|
+}
|
|
|
+</style>
|