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-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
|
||||
v-for="(item1, index) in item.children"
|
||||
:key="index"
|
||||
v-for="(item1, index1) in item.children"
|
||||
>
|
||||
<template v-if="item1.access">
|
||||
<a-sub-menu
|
||||
v-if="item1.children"
|
||||
:key="`${index}-${index1}`"
|
||||
:title="item1.title"
|
||||
>
|
||||
<template
|
||||
v-for="(item2, index) in item1.children"
|
||||
:key="index"
|
||||
v-for="(item2) in item1.children"
|
||||
>
|
||||
<a-menu-item
|
||||
v-if="item2.access"
|
||||
|
@ -1,63 +1,82 @@
|
||||
// .fes.js 只负责管理编译时配置,只能使用plain Object
|
||||
|
||||
|
||||
export default {
|
||||
base: '/base/',
|
||||
base: "/base/",
|
||||
define: {
|
||||
__DEV__: false
|
||||
__DEV__: false,
|
||||
},
|
||||
html: {
|
||||
title: '海贼王'
|
||||
title: "海贼王",
|
||||
},
|
||||
router: {
|
||||
mode: 'history'
|
||||
mode: "history",
|
||||
},
|
||||
access: {
|
||||
roles: {
|
||||
admin: ["/", "/store", "https://www.baidu.com"]
|
||||
}
|
||||
admin: ["*"],
|
||||
},
|
||||
},
|
||||
request: {
|
||||
dataField: 'result'
|
||||
dataField: "result",
|
||||
},
|
||||
mock: {
|
||||
prefix: '/v2'
|
||||
prefix: "/v2",
|
||||
},
|
||||
proxy: {
|
||||
'/v2': {
|
||||
'target': 'https://api.douban.com/',
|
||||
'changeOrigin': true,
|
||||
"/v2": {
|
||||
target: "https://api.douban.com/",
|
||||
changeOrigin: true,
|
||||
},
|
||||
},
|
||||
layout: {
|
||||
title: "Fes.js",
|
||||
footer: 'Created by MumbelFe',
|
||||
footer: "Created by MumbleFe",
|
||||
multiTabs: false,
|
||||
navigation: 'mixin',
|
||||
menus: [{
|
||||
name: 'index',
|
||||
icon: '/wine-outline.svg'
|
||||
}, {
|
||||
name: 'onepiece',
|
||||
icon: 'user',
|
||||
path: 'https://www.baidu.com'
|
||||
}, {
|
||||
name: 'store'
|
||||
}, {
|
||||
name: 'simpleList'
|
||||
}]
|
||||
navigation: "mixin",
|
||||
menus: [
|
||||
{
|
||||
name: "index",
|
||||
icon: "/wine-outline.svg",
|
||||
},
|
||||
{
|
||||
name: "onepiece",
|
||||
icon: "user",
|
||||
path: "https://www.baidu.com",
|
||||
},
|
||||
{
|
||||
// name: "abcd",
|
||||
title: "abcd",
|
||||
children: [
|
||||
{
|
||||
name: "store",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
// name: "setting",
|
||||
title: "setting",
|
||||
children: [
|
||||
{
|
||||
name: "test",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
locale: {
|
||||
legacy: true
|
||||
legacy: true,
|
||||
},
|
||||
devServer: {
|
||||
port: 8080
|
||||
port: 8080,
|
||||
},
|
||||
enums: {
|
||||
status: [['0', '无效的'], ['1', '有效的']]
|
||||
status: [
|
||||
["0", "无效的"],
|
||||
["1", "有效的"],
|
||||
],
|
||||
},
|
||||
vuex: {
|
||||
strict: true
|
||||
strict: true,
|
||||
},
|
||||
dynamicImport: true
|
||||
dynamicImport: true,
|
||||
};
|
||||
|
@ -1,6 +1,12 @@
|
||||
<template>
|
||||
<div>test</div>
|
||||
</template>
|
||||
<config>
|
||||
{
|
||||
"name": "test",
|
||||
"title": "侧事故"
|
||||
}
|
||||
</config>
|
||||
<script>
|
||||
import { } from '@fesjs/fes';
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user