听海 32dbd1ecf9 feat: 暴露语言变化事件 & layout的title支持配置国际化 (#255)
* feat: layout的title支持国际化

* feat: locale插件暴漏onLocaleChange事件

* chore: change docs

* fix: 去掉无用代码

---------

Co-authored-by: winixt <haizekuo@gmail.com>
2024-10-23 18:58:36 +08:00

93 lines
1.9 KiB
JavaScript

import { defineBuildConfig } from '@fesjs/fes';
export default defineBuildConfig({
publicPath: '',
targets: {
chrome: '78',
},
define: {
__DEV__: false,
},
html: {
title: '海贼王',
},
router: {
mode: 'hash',
},
watermark: {
disabled: false,
},
access: {
roles: {
admin: ['*'],
menuTest: ['/', '/menuTest'],
},
},
mock: {
prefix: '/v2',
},
proxy: {
'/v2': {
target: 'https://api.douban.com/',
changeOrigin: true,
},
},
layout: {
title: '$home',
footer: 'Created by MumbleFE',
multiTabs: true,
navigation: 'mixin',
theme: 'dark',
menus: [
{
name: 'index',
icon: '/wine-outline.svg',
match: ['/route/*'],
},
{
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',
},
],
menuProps: {
defaultExpandAll: false,
},
},
devServer: {
port: 8080,
},
enums: {
status: [
['0', '无效的'],
['1', '有效的'],
],
},
dynamicImport: true,
monacoEditor: {
languages: ['javascript', 'typescript', 'html', 'json'],
},
});