mirror of
https://github.com/WeBankFinTech/fes.js.git
synced 2025-08-07 18:39:45 +08:00
fix(plugin-layout): 修复点击菜单时所有菜单一起关闭的bug
This commit is contained in:
parent
2587f70fdb
commit
dcf2c316b7
@ -7,19 +7,18 @@
|
|||||||
>
|
>
|
||||||
<template v-for="(item, index) in fixedMenus" :key="index">
|
<template v-for="(item, index) in fixedMenus" :key="index">
|
||||||
<template v-if="item.access">
|
<template v-if="item.access">
|
||||||
<a-sub-menu v-if="item.children" :title="item.title">
|
<a-sub-menu v-if="item.children" :key="index" :title="item.title">
|
||||||
<template
|
<template
|
||||||
v-for="(item1, index) in item.children"
|
v-for="(item1, index1) in item.children"
|
||||||
:key="index"
|
|
||||||
>
|
>
|
||||||
<template v-if="item1.access">
|
<template v-if="item1.access">
|
||||||
<a-sub-menu
|
<a-sub-menu
|
||||||
v-if="item1.children"
|
v-if="item1.children"
|
||||||
|
:key="`${index}-${index1}`"
|
||||||
:title="item1.title"
|
:title="item1.title"
|
||||||
>
|
>
|
||||||
<template
|
<template
|
||||||
v-for="(item2, index) in item1.children"
|
v-for="(item2) in item1.children"
|
||||||
:key="index"
|
|
||||||
>
|
>
|
||||||
<a-menu-item
|
<a-menu-item
|
||||||
v-if="item2.access"
|
v-if="item2.access"
|
||||||
|
@ -1,63 +1,82 @@
|
|||||||
// .fes.js 只负责管理编译时配置,只能使用plain Object
|
// .fes.js 只负责管理编译时配置,只能使用plain Object
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
base: '/base/',
|
base: "/base/",
|
||||||
define: {
|
define: {
|
||||||
__DEV__: false
|
__DEV__: false,
|
||||||
},
|
},
|
||||||
html: {
|
html: {
|
||||||
title: '海贼王'
|
title: "海贼王",
|
||||||
},
|
},
|
||||||
router: {
|
router: {
|
||||||
mode: 'history'
|
mode: "history",
|
||||||
},
|
},
|
||||||
access: {
|
access: {
|
||||||
roles: {
|
roles: {
|
||||||
admin: ["/", "/store", "https://www.baidu.com"]
|
admin: ["*"],
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
request: {
|
request: {
|
||||||
dataField: 'result'
|
dataField: "result",
|
||||||
},
|
},
|
||||||
mock: {
|
mock: {
|
||||||
prefix: '/v2'
|
prefix: "/v2",
|
||||||
},
|
},
|
||||||
proxy: {
|
proxy: {
|
||||||
'/v2': {
|
"/v2": {
|
||||||
'target': 'https://api.douban.com/',
|
target: "https://api.douban.com/",
|
||||||
'changeOrigin': true,
|
changeOrigin: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
layout: {
|
layout: {
|
||||||
title: "Fes.js",
|
title: "Fes.js",
|
||||||
footer: 'Created by MumbelFe',
|
footer: "Created by MumbleFe",
|
||||||
multiTabs: false,
|
multiTabs: false,
|
||||||
navigation: 'mixin',
|
navigation: "mixin",
|
||||||
menus: [{
|
menus: [
|
||||||
name: 'index',
|
{
|
||||||
icon: '/wine-outline.svg'
|
name: "index",
|
||||||
}, {
|
icon: "/wine-outline.svg",
|
||||||
name: 'onepiece',
|
},
|
||||||
icon: 'user',
|
{
|
||||||
path: 'https://www.baidu.com'
|
name: "onepiece",
|
||||||
}, {
|
icon: "user",
|
||||||
name: 'store'
|
path: "https://www.baidu.com",
|
||||||
}, {
|
},
|
||||||
name: 'simpleList'
|
{
|
||||||
}]
|
// name: "abcd",
|
||||||
|
title: "abcd",
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
name: "store",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
// name: "setting",
|
||||||
|
title: "setting",
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
name: "test",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
locale: {
|
locale: {
|
||||||
legacy: true
|
legacy: true,
|
||||||
},
|
},
|
||||||
devServer: {
|
devServer: {
|
||||||
port: 8080
|
port: 8080,
|
||||||
},
|
},
|
||||||
enums: {
|
enums: {
|
||||||
status: [['0', '无效的'], ['1', '有效的']]
|
status: [
|
||||||
|
["0", "无效的"],
|
||||||
|
["1", "有效的"],
|
||||||
|
],
|
||||||
},
|
},
|
||||||
vuex: {
|
vuex: {
|
||||||
strict: true
|
strict: true,
|
||||||
},
|
},
|
||||||
dynamicImport: true
|
dynamicImport: true,
|
||||||
};
|
};
|
||||||
|
@ -1,6 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>test</div>
|
<div>test</div>
|
||||||
</template>
|
</template>
|
||||||
|
<config>
|
||||||
|
{
|
||||||
|
"name": "test",
|
||||||
|
"title": "侧事故"
|
||||||
|
}
|
||||||
|
</config>
|
||||||
<script>
|
<script>
|
||||||
import { } from '@fesjs/fes';
|
import { } from '@fesjs/fes';
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user