| | |
| | | <div class="menu-list">
|
| | | <div
|
| | | class="item"
|
| | | @click="pickMenu(index)"
|
| | | v-for="(item, index) in menuList"
|
| | | :key="index"
|
| | | :class="index == activeIndex ? 'active-item' : ''"
|
| | | @click="pickMenu(index, item.tab)"
|
| | | >
|
| | | <span class="iconfont"></span>
|
| | | <span class="item-name"> {{ item.name }}</span>
|
| | |
| | | <script>
|
| | | export default {
|
| | | created() {
|
| | | this.userInfo = JSON.parse(sessionStorage.getItem("userInfo"));
|
| | | this.userInfo = JSON.parse(sessionStorage.getItem("userInfo"))
|
| | | if (this.$route.query && this.$route.query.id) {
|
| | | this.activeIndex = this.$route.query.id;
|
| | | this.activeIndex = this.$route.query.id
|
| | | }
|
| | | },
|
| | | data() {
|
| | | return {
|
| | | menuList: [
|
| | | // { name: "账户总览" },
|
| | | { name: "订单管理" },
|
| | | // { name: "订单管理" },
|
| | | // { name: "消息中心" },
|
| | | { name: "基本资料" },
|
| | | { name: "子账户管理" },
|
| | | { name: "基本资料", tab: "baseInfo" },
|
| | | { name: "子账户管理", tab: "subAccount" }
|
| | | ],
|
| | | userInfo: null,
|
| | | activeIndex: 0,
|
| | | };
|
| | | activeIndex: 0
|
| | | }
|
| | | },
|
| | | methods: {
|
| | | pickMenu(i) {
|
| | | this.activeIndex = i;
|
| | | this.$emit("mChange", i);
|
| | | },
|
| | | },
|
| | | };
|
| | | pickMenu(idx, tab) {
|
| | | this.activeIndex = idx
|
| | | this.$emit("mChange", tab)
|
| | | }
|
| | | }
|
| | | }
|
| | | </script>
|
| | |
|
| | | <style scoped lang="scss">
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | </style> |
| | | </style>
|