no message
Former-commit-id: 38ca42b46ecaaf5b257dffebe3e91c4bda0c5288 [formerly 38ca42b46ecaaf5b257dffebe3e91c4bda0c5288 [formerly 38ca42b46ecaaf5b257dffebe3e91c4bda0c5288 [formerly 38ca42b46ecaaf5b257dffebe3e91c4bda0c5288 [formerly 3df6dd6457578aabef949922d7dee1f11618566d [formerly 97fd07908ab7622162244f7477aae3b29092835e]]]]] Former-commit-id: e3b49b297ed21b78760b9dcf879c74157f4f5c5d Former-commit-id: 7b994f591f6081c12ccf8f3cc1beeda80b9ee690 Former-commit-id: 8fd78861ca11f6cf469a3ae3893ca5e8a188adad [formerly bcde3452b01f4715fcae160393d44d51963ccd6b] Former-commit-id: 5dcc0f3d8869743f5a1bad2ed5b896bf4cf1e346 Former-commit-id: 2f30c00a1b8bd18231301b81d74368bbf44f7b5c Former-commit-id: a78a02403cf5bcf5c552eacd37601f93b03a8349 Former-commit-id: fe5c4011b978fd514160d5f6d9033ecc5bdf6827 Former-commit-id: 44e894592461f08d5befe535e142f570fe0ca08c
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
<template>
|
||||
<el-menu
|
||||
mode="horizontal"
|
||||
:router="true">
|
||||
<el-menu mode="horizontal" @select="handleMenuSelect">
|
||||
<template v-for="(menu, menuIndex) in menus">
|
||||
<d2-layout-main-menu-item v-if="menu.children === undefined" :menu="menu" :key="menuIndex"/>
|
||||
<d2-layout-main-menu-sub v-else :menu="menu" :key="menuIndex"/>
|
||||
@@ -11,8 +9,12 @@
|
||||
|
||||
<script>
|
||||
import menus from '@/menu/index.js'
|
||||
import menuMixin from '../mixin/menu'
|
||||
export default {
|
||||
name: 'd2-layout-main-menu-header',
|
||||
mixins: [
|
||||
menuMixin
|
||||
],
|
||||
components: {
|
||||
'd2-layout-main-menu-item': () => import('../-menu-item/index.vue'),
|
||||
'd2-layout-main-menu-sub': () => import('../-menu-sub/index.vue')
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<el-menu
|
||||
:collapse="collapse"
|
||||
:unique-opened="true"
|
||||
:router="true">
|
||||
@select="handleMenuSelect">
|
||||
<template v-for="(menu, menuIndex) in menus">
|
||||
<d2-layout-main-menu-item v-if="menu.children === undefined" :menu="menu" :key="menuIndex"/>
|
||||
<d2-layout-main-menu-sub v-else :menu="menu" :key="menuIndex"/>
|
||||
@@ -18,8 +18,12 @@
|
||||
|
||||
<script>
|
||||
import { side } from '@/menu/index.js'
|
||||
import menuMixin from '../mixin/menu'
|
||||
export default {
|
||||
name: 'd2-layout-main-menu-side',
|
||||
mixins: [
|
||||
menuMixin
|
||||
],
|
||||
props: {
|
||||
collapse: {
|
||||
type: Boolean,
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
export default {
|
||||
methods: {
|
||||
handleMenuSelect (index, indexPath) {
|
||||
if (/^d2-menu-empty-\d+$/.test(index)) {
|
||||
this.$message('功能正在开发')
|
||||
} else {
|
||||
this.$router.push(index)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user