fes.js/packages/fes-template/.fes.js
harrywan 94c4bb6e4f
* feat(plugin-layout): layout支持运行时配置menus (#113)
* feat(plugin-layout): 支持运行时配置menus

* refactor(plugin-model): 去掉provide

* refactor(plugin-layout): 优化runtimeConfig,重新实现运行时menus配置方式,修复多页时setup执行两次的bug

* feat(plugin-layout): 菜单支持配置默认展开等

* refactor: 优化
2022-04-11 19:40:16 +08:00

100 lines
2.0 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// .fes.js 只负责管理编译时配置只能使用plain Object
export default {
// exportStatic: {},
define: {
__DEV__: false
},
publicPath: './',
html: {
title: '海贼王'
},
router: {
mode: 'hash'
},
access: {
roles: {
admin: ['*'],
menuTest: ['/', '/menuTest']
}
},
request: {
dataField: 'result'
},
mock: {
prefix: '/v2'
},
proxy: {
'/v2': {
target: 'https://api.douban.com/',
changeOrigin: true
}
},
layout: {
title: 'Fes.js',
footer: 'Created by MumbleFE',
multiTabs: false,
navigation: 'side',
theme: 'dark',
menus: [
{
name: 'index',
icon: '/wine-outline.svg',
match: ['/route/*']
},
{
name: 'store'
},
{
name: 'editor',
icon: '/wine-outline.svg'
},
{
title: '$externalLink',
icon: 'UserOutlined',
path: 'https://www.baidu.com'
},
{
name: 'mock'
},
{
title: '菜单权限测试',
children: [
{
title: '子菜单',
path: '/menuTest'
},
]
},
{
name: 'cssModule'
},
{
name: 'pinia'
}
],
menuConfig: {
defaultExpandAll: false
}
},
locale: {
legacy: true
},
devServer: {
port: 8080
},
enums: {
status: [
['0', '无效的'],
['1', '有效的']
]
},
vuex: {
strict: true
},
dynamicImport: true,
monacoEditor: {
languages: ['javascript', 'typescript', 'html', 'json']
}
};