diff --git a/.stylelintrc.json b/.stylelintrc.json index 215bf08119eadd5005ddbef70291a652520e697b..d366a141fc2871a83411e356dad32b3c6dbd8c31 100644 --- a/.stylelintrc.json +++ b/.stylelintrc.json @@ -5,9 +5,12 @@ "stylelint-config-rational-order", "stylelint-config-prettier" ], - "plugins": ["stylelint-order", "stylelint-declaration-block-no-ignored-properties"], + "plugins": [ + "stylelint-order", + "stylelint-declaration-block-no-ignored-properties" + ], "rules": { "no-descending-specificity": null, "plugin/declaration-block-no-ignored-properties": true } -} +} \ No newline at end of file diff --git a/config/plugin.config.ts b/config/plugin.config.ts index 59ce550f422072f454a634ec5725b0cd1f39de35..d9d150bc00cf6ee07e40baf3a86ab7fbc8073dbd 100644 --- a/config/plugin.config.ts +++ b/config/plugin.config.ts @@ -4,7 +4,7 @@ import MergeLessPlugin from 'antd-pro-merge-less'; import AntDesignThemePlugin from 'antd-theme-webpack-plugin'; import path from 'path'; -function getModulePackageName(module) { +function getModulePackageName(module: { context: string }) { if (!module.context) return null; const nodeModulesPath = path.join(__dirname, '../node_modules/'); @@ -14,16 +14,16 @@ function getModulePackageName(module) { const moduleRelativePath = module.context.substring(nodeModulesPath.length); const [moduleDirName] = moduleRelativePath.split(path.sep); - let packageName = moduleDirName; + let packageName: string | null = moduleDirName; // handle tree shaking - if (packageName.match('^_')) { + if (packageName && packageName.match('^_')) { // eslint-disable-next-line prefer-destructuring - packageName = packageName.match(/^_(@?[^@]+)/)[1]; + packageName = packageName.match(/^_(@?[^@]+)/)![1]; } return packageName; } -export default config => { +export default (config: any) => { // preview.pro.ant.design only do not use in your production ; preview.pro.ant.design 专用环境变量,请不要在你的项目中使用它。 if ( process.env.ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION === 'site' || @@ -62,18 +62,19 @@ export default config => { minSize: 0, cacheGroups: { vendors: { - test: module => { + test: (module: { context: string }) => { const packageName = getModulePackageName(module); if (packageName) { return ['bizcharts', '@antv_data-set'].indexOf(packageName) >= 0; } return false; }, - name(module) { + name(module: { context: string }) { const packageName = getModulePackageName(module); - - if (['bizcharts', '@antv_data-set'].indexOf(packageName) >= 0) { - return 'viz'; // visualization package + if (packageName) { + if (['bizcharts', '@antv_data-set'].indexOf(packageName) >= 0) { + return 'viz'; // visualization package + } } return 'misc'; }, diff --git a/package.json b/package.json index a95f55be85069b1507176bc4c6dd742765a5792d..be4b875a6924748a303592554b0237411eff75e0 100644 --- a/package.json +++ b/package.json @@ -77,7 +77,8 @@ "react-dom": "^16.7.0", "react-fittext": "^1.0.0", "react-media": "^1.9.2", - "react-media-hook2": "^1.0.2" + "react-media-hook2": "^1.0.2", + "umi-request": "^1.0.7" }, "devDependencies": { "@types/classnames": "^2.2.7", diff --git a/router.config.js b/router.config.js new file mode 100644 index 0000000000000000000000000000000000000000..cdff38e0b807f5dd649f29d81700a9701fe48851 --- /dev/null +++ b/router.config.js @@ -0,0 +1,297 @@ +export default [ + // user + { + path: '/user', + component: '../layouts/UserLayout', + routes: [ + { path: '/user', redirect: '/user/login' }, + { path: '/user/login', name: 'login', component: './User/Login' }, + { path: '/user/register', name: 'register', component: './User/Register' }, + { + path: '/user/register-result', + name: 'register.result', + component: './User/RegisterResult', + }, + { + component: '404', + }, + ], + }, + // app + { + path: '/', + component: '../layouts/BasicLayout', + Routes: ['src/pages/Authorized'], + routes: [ + // dashboard + { path: '/', redirect: '/dashboard/analysis', authority: ['admin', 'user'] }, + { + path: '/dashboard', + name: 'dashboard', + icon: 'dashboard', + routes: [ + { + path: '/dashboard/analysis', + name: 'analysis', + component: './Dashboard/Analysis', + }, + { + path: '/dashboard/monitor', + name: 'monitor', + component: './Dashboard/Monitor', + }, + { + path: '/dashboard/workplace', + name: 'workplace', + component: './Dashboard/Workplace', + }, + ], + }, + // forms + { + path: '/form', + icon: 'form', + name: 'form', + routes: [ + { + path: '/form/basic-form', + name: 'basicform', + component: './Forms/BasicForm', + }, + { + path: '/form/step-form', + name: 'stepform', + component: './Forms/StepForm', + hideChildrenInMenu: true, + routes: [ + { + path: '/form/step-form', + redirect: '/form/step-form/info', + }, + { + path: '/form/step-form/info', + name: 'info', + component: './Forms/StepForm/Step1', + }, + { + path: '/form/step-form/confirm', + name: 'confirm', + component: './Forms/StepForm/Step2', + }, + { + path: '/form/step-form/result', + name: 'result', + component: './Forms/StepForm/Step3', + }, + ], + }, + { + path: '/form/advanced-form', + name: 'advancedform', + authority: ['admin'], + component: './Forms/AdvancedForm', + }, + ], + }, + // list + { + path: '/list', + icon: 'table', + name: 'list', + routes: [ + { + path: '/list/table-list', + name: 'searchtable', + component: './List/TableList', + }, + { + path: '/list/basic-list', + name: 'basiclist', + component: './List/BasicList', + }, + { + path: '/list/card-list', + name: 'cardlist', + component: './List/CardList', + }, + { + path: '/list/search', + name: 'searchlist', + component: './List/List', + routes: [ + { + path: '/list/search', + redirect: '/list/search/articles', + }, + { + path: '/list/search/articles', + name: 'articles', + component: './List/Articles', + }, + { + path: '/list/search/projects', + name: 'projects', + component: './List/Projects', + }, + { + path: '/list/search/applications', + name: 'applications', + component: './List/Applications', + }, + ], + }, + ], + }, + { + path: '/profile', + name: 'profile', + icon: 'profile', + routes: [ + // profile + { + path: '/profile/basic', + name: 'basic', + component: './Profile/BasicProfile', + }, + { + path: '/profile/basic/:id', + hideInMenu: true, + component: './Profile/BasicProfile', + }, + { + path: '/profile/advanced', + name: 'advanced', + authority: ['admin'], + component: './Profile/AdvancedProfile', + }, + ], + }, + { + name: 'result', + icon: 'check-circle-o', + path: '/result', + routes: [ + // result + { + path: '/result/success', + name: 'success', + component: './Result/Success', + }, + { path: '/result/fail', name: 'fail', component: './Result/Error' }, + ], + }, + { + name: 'exception', + icon: 'warning', + path: '/exception', + routes: [ + // exception + { + path: '/exception/403', + name: 'not-permission', + component: './Exception/403', + }, + { + path: '/exception/404', + name: 'not-find', + component: './Exception/404', + }, + { + path: '/exception/500', + name: 'server-error', + component: './Exception/500', + }, + { + path: '/exception/trigger', + name: 'trigger', + hideInMenu: true, + component: './Exception/TriggerException', + }, + ], + }, + { + name: 'account', + icon: 'user', + path: '/account', + routes: [ + { + path: '/account/center', + name: 'center', + component: './Account/Center/Center', + routes: [ + { + path: '/account/center', + redirect: '/account/center/articles', + }, + { + path: '/account/center/articles', + component: './Account/Center/Articles', + }, + { + path: '/account/center/applications', + component: './Account/Center/Applications', + }, + { + path: '/account/center/projects', + component: './Account/Center/Projects', + }, + ], + }, + { + path: '/account/settings', + name: 'settings', + component: './Account/Settings/Info', + routes: [ + { + path: '/account/settings', + redirect: '/account/settings/base', + }, + { + path: '/account/settings/base', + component: './Account/Settings/BaseView', + }, + { + path: '/account/settings/security', + component: './Account/Settings/SecurityView', + }, + { + path: '/account/settings/binding', + component: './Account/Settings/BindingView', + }, + { + path: '/account/settings/notification', + component: './Account/Settings/NotificationView', + }, + ], + }, + ], + }, + // editor + { + name: 'editor', + icon: 'highlight', + path: '/editor', + routes: [ + { + path: '/editor/flow', + name: 'flow', + component: './Editor/GGEditor/Flow', + }, + { + path: '/editor/mind', + name: 'mind', + component: './Editor/GGEditor/Mind', + }, + { + path: '/editor/koni', + name: 'koni', + component: './Editor/GGEditor/Koni', + }, + ], + }, + { + component: '404', + }, + ], + }, +]; diff --git a/scripts/fetch-block.js b/scripts/fetch-block.js new file mode 100644 index 0000000000000000000000000000000000000000..43cbf9cdcb4e3016e9aa8bc361b236fe56cf3065 --- /dev/null +++ b/scripts/fetch-block.js @@ -0,0 +1,145 @@ +const parser = require('@babel/parser'); +const traverse = require('@babel/traverse'); +const generate = require('@babel/generator'); +const t = require('@babel/types'); +const path = require('path'); +const fs = require('fs'); +const exec = require('child_process').exec; + +const prettier = require('prettier'); + +const router = require('./router.config'); + +const getNewRouteCode = (configPath, newRoute, absSrcPath) => { + const ast = parser.parse(fs.readFileSync(configPath, 'utf-8'), { + sourceType: 'module', + plugins: ['typescript'], + }); + let routesNode = null; + const importModules = []; + // 查询当前配置文件是否导出 routes 属性 + traverse.default(ast, { + Program({ node }) { + // find import + const { body } = node; + body.forEach(item => { + if (t.isImportDeclaration(item)) { + const { specifiers } = item; + const defaultEpecifier = specifiers.find(s => { + return t.isImportDefaultSpecifier(s) && t.isIdentifier(s.local); + }); + if (defaultEpecifier && t.isStringLiteral(item.source)) { + importModules.push({ + identifierName: defaultEpecifier.local.name, + modulePath: item.source.value, + }); + } + } + }); + }, + ObjectExpression({ node, parent }) { + // find routes on object, like { routes: [] } + if (t.isArrayExpression(parent)) { + // children routes + return; + } + const { properties } = node; + properties.forEach(p => { + const { key, value } = p; + if (t.isObjectProperty(p) && t.isIdentifier(key) && key.name === 'routes') { + if (value) { + // find json file program expression + (p.value = parser.parse(JSON.stringify(newRoute)).program.body[0].expression), + (routesNode = value); + } + } + }); + }, + }); + if (routesNode) { + const code = generateCode(ast); + return { code, routesPath: configPath }; + } else { + throw new Error('route array config not found.'); + } +}; + +/** + * 生成代码 + * @param {*} ast + */ +function generateCode(ast) { + const newCode = generate.default(ast, {}).code; + return prettier.format(newCode, { + // format same as ant-design-pro + singleQuote: true, + trailingComma: 'es5', + printWidth: 100, + parser: 'typescript', + }); +} + +const relativePath = path.join(__dirname, '../config/config.ts'); + +const filterParentRouter = router => { + return [...router] + .map(item => { + if (item.routes) { + return { ...item, routes: filterParentRouter(item.routes) }; + } + return null; + }) + .filter(item => item); +}; +const parentRouter = filterParentRouter(router); +const { routesPath, code } = getNewRouteCode(relativePath, parentRouter); +// write ParentRouter +fs.writeFileSync(routesPath, code); + +const findAllInstallRouter = router => { + let routers = []; + router.forEach(item => { + if (item.routes) { + routers = routers.concat(findAllInstallRouter(item.routes)); + } + if (item.component && item.path) { + if (item.path === '/user' || item.path === '/') { + return; + } + routers.push({ + ...item, + routes: '', + }); + } + return null; + }); + return routers; +}; + +const installRouters = findAllInstallRouter(router); +let i = 0; +const firstUpperCase = pathString => { + return pathString + .split(/\/|\-/) + .map(s => s.toLowerCase().replace(/( |^)[a-z]/g, L => L.toUpperCase())) + .filter(s => s) + .join(''); +}; +const installBlock = () => { + const item = installRouters[i]; + + if (!item || !item.path) { + return; + } + console.log('install ' + item.name + ' to: ' + item.component); + + const cmd = `umi block add https://github.com/ant-design/pro-blocks/tree/master/${firstUpperCase( + item.path, + )} --npm-client=cnpm --path=${item.path}`; + exec(cmd, { encoding: 'utf8' }, (error, statusbar) => { + if (error) console.log(error); + i += 1; + installBlock(); + }); +}; +installBlock(); diff --git a/scripts/router.config.js b/scripts/router.config.js new file mode 100644 index 0000000000000000000000000000000000000000..5ab3a325e96e7f7d73cc9a71af9459247012ee60 --- /dev/null +++ b/scripts/router.config.js @@ -0,0 +1,298 @@ +module.exports = [ + // user + { + path: '/user', + component: '../layouts/UserLayout', + routes: [ + { path: '/user', redirect: '/user/login' }, + { path: '/user/login', name: 'login', component: './User/Login' }, + { path: '/user/register', name: 'register', component: './User/Register' }, + { + path: '/user/register-result', + name: 'register.result', + component: './User/RegisterResult', + }, + { + component: '404', + }, + ], + }, + // app + { + path: '/', + component: '../layouts/BasicLayout', + Routes: ['src/pages/Authorized'], + authority: ['admin', 'user'], + routes: [ + // dashboard + { path: '/', redirect: '/dashboard/analysis', authority: ['admin', 'user'] }, + { + path: '/dashboard', + name: 'dashboard', + icon: 'dashboard', + routes: [ + { + path: '/dashboard/analysis', + name: 'analysis', + component: './Dashboard/Analysis', + }, + { + path: '/dashboard/monitor', + name: 'monitor', + component: './Dashboard/Monitor', + }, + { + path: '/dashboard/workplace', + name: 'workplace', + component: './Dashboard/Workplace', + }, + ], + }, + // forms + { + path: '/form', + icon: 'form', + name: 'form', + routes: [ + { + path: '/form/basic-form', + name: 'basicform', + component: './Forms/BasicForm', + }, + { + path: '/form/step-form', + name: 'stepform', + component: './Forms/StepForm', + hideChildrenInMenu: true, + routes: [ + { + path: '/form/step-form', + redirect: '/form/step-form/info', + }, + { + path: '/form/step-form/info', + name: 'info', + component: './Forms/StepForm/Step1', + }, + { + path: '/form/step-form/confirm', + name: 'confirm', + component: './Forms/StepForm/Step2', + }, + { + path: '/form/step-form/result', + name: 'result', + component: './Forms/StepForm/Step3', + }, + ], + }, + { + path: '/form/advanced-form', + name: 'advancedform', + authority: ['admin'], + component: './Forms/AdvancedForm', + }, + ], + }, + // list + { + path: '/list', + icon: 'table', + name: 'list', + routes: [ + { + path: '/list/table-list', + name: 'searchtable', + component: './List/TableList', + }, + { + path: '/list/basic-list', + name: 'basiclist', + component: './List/BasicList', + }, + { + path: '/list/card-list', + name: 'cardlist', + component: './List/CardList', + }, + { + path: '/list/search', + name: 'searchlist', + component: './List/List', + routes: [ + { + path: '/list/search', + redirect: '/list/search/articles', + }, + { + path: '/list/search/articles', + name: 'articles', + component: './List/Articles', + }, + { + path: '/list/search/projects', + name: 'projects', + component: './List/Projects', + }, + { + path: '/list/search/applications', + name: 'applications', + component: './List/Applications', + }, + ], + }, + ], + }, + { + path: '/profile', + name: 'profile', + icon: 'profile', + routes: [ + // profile + { + path: '/profile/basic', + name: 'basic', + component: './Profile/BasicProfile', + }, + { + path: '/profile/basic/:id', + hideInMenu: true, + component: './Profile/BasicProfile', + }, + { + path: '/profile/advanced', + name: 'advanced', + authority: ['admin'], + component: './Profile/AdvancedProfile', + }, + ], + }, + { + name: 'result', + icon: 'check-circle-o', + path: '/result', + routes: [ + // result + { + path: '/result/success', + name: 'success', + component: './Result/Success', + }, + { path: '/result/fail', name: 'fail', component: './Result/Error' }, + ], + }, + { + name: 'exception', + icon: 'warning', + path: '/exception', + routes: [ + // exception + { + path: '/exception/403', + name: 'not-permission', + component: './Exception/403', + }, + { + path: '/exception/404', + name: 'not-find', + component: './Exception/404', + }, + { + path: '/exception/500', + name: 'server-error', + component: './Exception/500', + }, + { + path: '/exception/trigger', + name: 'trigger', + hideInMenu: true, + component: './Exception/TriggerException', + }, + ], + }, + { + name: 'account', + icon: 'user', + path: '/account', + routes: [ + { + path: '/account/center', + name: 'center', + component: './Account/Center/Center', + routes: [ + { + path: '/account/center', + redirect: '/account/center/articles', + }, + { + path: '/account/center/articles', + component: './Account/Center/Articles', + }, + { + path: '/account/center/applications', + component: './Account/Center/Applications', + }, + { + path: '/account/center/projects', + component: './Account/Center/Projects', + }, + ], + }, + { + path: '/account/settings', + name: 'settings', + component: './Account/Settings/Info', + routes: [ + { + path: '/account/settings', + redirect: '/account/settings/base', + }, + { + path: '/account/settings/base', + component: './Account/Settings/BaseView', + }, + { + path: '/account/settings/security', + component: './Account/Settings/SecurityView', + }, + { + path: '/account/settings/binding', + component: './Account/Settings/BindingView', + }, + { + path: '/account/settings/notification', + component: './Account/Settings/NotificationView', + }, + ], + }, + ], + }, + // editor + { + name: 'editor', + icon: 'highlight', + path: '/editor', + routes: [ + { + path: '/editor/flow', + name: 'flow', + component: './Editor/GGEditor/Flow', + }, + { + path: '/editor/mind', + name: 'mind', + component: './Editor/GGEditor/Mind', + }, + { + path: '/editor/koni', + name: 'koni', + component: './Editor/GGEditor/Koni', + }, + ], + }, + { + component: '404', + }, + ], + }, +]; diff --git a/src/layouts/BasicLayout.tsx b/src/layouts/BasicLayout.tsx index cec925e678dfa9c5e1bb07df0fcdbe59f82405e4..29ac49c93c95b8aaab74eac014fe08717f16d64c 100644 --- a/src/layouts/BasicLayout.tsx +++ b/src/layouts/BasicLayout.tsx @@ -31,7 +31,9 @@ const filterMenuData = (menuList: MenuDataItem[], locale: boolean) => { const localItem = { ...item, name: item.locale && locale ? formatMessage({ id: item.locale }) : item.name, + children: item.children ? filterMenuData(item.children, locale) : [], }; + return Authorized.check(item.authority, localItem, null) as MenuDataItem; }); }; diff --git a/src/locales/en-US/menu.ts b/src/locales/en-US/menu.ts index 7a651780336da81445cb23cda8da4b6279690ccb..27b07feeff92f1d2b99832841bb85ff75975e4a5 100644 --- a/src/locales/en-US/menu.ts +++ b/src/locales/en-US/menu.ts @@ -1,9 +1,47 @@ export default { 'menu.welcome': 'Welcome', 'menu.more-blocks': 'More Blocks', - + 'menu.home': 'Home', + 'menu.login': 'Login', + 'menu.register': 'Register', + 'menu.register.result': 'Register Result', + 'menu.dashboard': 'Dashboard', + 'menu.dashboard.analysis': 'Analysis', + 'menu.dashboard.monitor': 'Monitor', + 'menu.dashboard.workplace': 'Workplace', + 'menu.form': 'Form', + 'menu.form.basic-form': 'Basic Form', + 'menu.form.step-form': 'Step Form', + 'menu.form.step-form.info': 'Step Form(write transfer information)', + 'menu.form.step-form.confirm': 'Step Form(confirm transfer information)', + 'menu.form.step-form.result': 'Step Form(finished)', + 'menu.form.advanced-form': 'Advanced Form', + 'menu.list': 'List', + 'menu.list.search-table': 'Search Table', + 'menu.list.basic-list': 'Basic List', + 'menu.list.card-list': 'Card List', + 'menu.list.search-list': 'Search List', + 'menu.list.search-list.articles': 'Search List(articles)', + 'menu.list.search-list.projects': 'Search List(projects)', + 'menu.list.search-list.applications': 'Search List(applications)', + 'menu.profile': 'Profile', + 'menu.profile.basic': 'Basic Profile', + 'menu.profile.advanced': 'Advanced Profile', + 'menu.result': 'Result', + 'menu.result.success': 'Success', + 'menu.result.fail': 'Fail', + 'menu.exception': 'Exception', + 'menu.exception.not-permission': '403', + 'menu.exception.not-find': '404', + 'menu.exception.server-error': '500', + 'menu.exception.trigger': 'Trigger', + 'menu.account': 'Account', 'menu.account.center': 'Account Center', 'menu.account.settings': 'Account Settings', 'menu.account.trigger': 'Trigger Error', 'menu.account.logout': 'Logout', + 'menu.editor': 'Graphic Editor', + 'menu.editor.flow': 'Flow Editor', + 'menu.editor.mind': 'Mind Editor', + 'menu.editor.koni': 'Koni Editor', }; diff --git a/src/locales/pt-BR/menu.ts b/src/locales/pt-BR/menu.ts index b4259807aa5eef802e3b979895a5a2ebe06f935d..ced1264d6579cad1d914ec1f00dccb6e5087a602 100644 --- a/src/locales/pt-BR/menu.ts +++ b/src/locales/pt-BR/menu.ts @@ -1,9 +1,47 @@ export default { 'menu.welcome': 'Welcome', 'menu.more-blocks': 'More Blocks', - + 'menu.home': 'Início', + 'menu.login': 'Login', + 'menu.register': 'Registro', + 'menu.register.result': 'Resultado de registro', + 'menu.dashboard': 'Dashboard', + 'menu.dashboard.analysis': 'Análise', + 'menu.dashboard.monitor': 'Monitor', + 'menu.dashboard.workplace': 'Ambiente de Trabalho', + 'menu.form': 'Formulário', + 'menu.form.basic-form': 'Formulário Básico', + 'menu.form.step-form': 'Formulário Assistido', + 'menu.form.step-form.info': 'Formulário Assistido(gravar informações de transferência)', + 'menu.form.step-form.confirm': 'Formulário Assistido(confirmar informações de transferência)', + 'menu.form.step-form.result': 'Formulário Assistido(finalizado)', + 'menu.form.advanced-form': 'Formulário Avançado', + 'menu.list': 'Lista', + 'menu.list.search-table': 'Tabela de Busca', + 'menu.list.basic-list': 'Lista Básica', + 'menu.list.card-list': 'Lista de Card', + 'menu.list.search-list': 'Lista de Busca', + 'menu.list.search-list.articles': 'Lista de Busca(artigos)', + 'menu.list.search-list.projects': 'Lista de Busca(projetos)', + 'menu.list.search-list.applications': 'Lista de Busca(aplicações)', + 'menu.profile': 'Perfil', + 'menu.profile.basic': 'Perfil Básico', + 'menu.profile.advanced': 'Perfil Avançado', + 'menu.result': 'Resultado', + 'menu.result.success': 'Sucesso', + 'menu.result.fail': 'Falha', + 'menu.exception': 'Exceção', + 'menu.exception.not-permission': '403', + 'menu.exception.not-find': '404', + 'menu.exception.server-error': '500', + 'menu.exception.trigger': 'Disparar', + 'menu.account': 'Conta', 'menu.account.center': 'Central da Conta', 'menu.account.settings': 'Configurar Conta', 'menu.account.trigger': 'Disparar Erro', 'menu.account.logout': 'Sair', + 'menu.editor': 'Graphic Editor', + 'menu.editor.flow': 'Flow Editor', + 'menu.editor.mind': 'Mind Editor', + 'menu.editor.koni': 'Koni Editor', }; diff --git a/src/locales/zh-CN/menu.ts b/src/locales/zh-CN/menu.ts index 550dfed14a56b821f21ed81950f38157f45b9666..9462aa33185195c3af2b7438dcc47650a5c531a1 100644 --- a/src/locales/zh-CN/menu.ts +++ b/src/locales/zh-CN/menu.ts @@ -1,8 +1,47 @@ export default { 'menu.welcome': '欢迎', 'menu.more-blocks': '更多区块', + 'menu.home': '首页', + 'menu.login': '登录', + 'menu.register': '注册', + 'menu.register.result': '注册结果', + 'menu.dashboard': 'Dashboard', + 'menu.dashboard.analysis': '分析页', + 'menu.dashboard.monitor': '监控页', + 'menu.dashboard.workplace': '工作台', + 'menu.form': '表单页', + 'menu.form.basic-form': '基础表单', + 'menu.form.step-form': '分步表单', + 'menu.form.step-form.info': '分步表单(填写转账信息)', + 'menu.form.step-form.confirm': '分步表单(确认转账信息)', + 'menu.form.step-form.result': '分步表单(完成)', + 'menu.form.advanced-form': '高级表单', + 'menu.list': '列表页', + 'menu.list.search-table': '查询表格', + 'menu.list.basic-list': '标准列表', + 'menu.list.card-list': '卡片列表', + 'menu.list.search-list': '搜索列表', + 'menu.list.search-list.articles': '搜索列表(文章)', + 'menu.list.search-list.projects': '搜索列表(项目)', + 'menu.list.search-list.applications': '搜索列表(应用)', + 'menu.profile': '详情页', + 'menu.profile.basic': '基础详情页', + 'menu.profile.advanced': '高级详情页', + 'menu.result': '结果页', + 'menu.result.success': '成功页', + 'menu.result.fail': '失败页', + 'menu.exception': '异常页', + 'menu.exception.not-permission': '403', + 'menu.exception.not-find': '404', + 'menu.exception.server-error': '500', + 'menu.exception.trigger': '触发错误', + 'menu.account': '个人页', 'menu.account.center': '个人中心', 'menu.account.settings': '个人设置', 'menu.account.trigger': '触发报错', 'menu.account.logout': '退出登录', + 'menu.editor': '图形编辑器', + 'menu.editor.flow': '流程编辑器', + 'menu.editor.mind': '脑图编辑器', + 'menu.editor.koni': '拓扑编辑器', }; diff --git a/src/locales/zh-TW/menu.ts b/src/locales/zh-TW/menu.ts index 1b87bd0bc8ebd12f0ef127cf0961054e2a8d3df7..8d312c3e4b23e3ce52ca4bea829a049eedbba279 100644 --- a/src/locales/zh-TW/menu.ts +++ b/src/locales/zh-TW/menu.ts @@ -2,8 +2,47 @@ export default { 'menu.welcome': '歡迎', 'menu.more-blocks': '更多區塊', + 'menu.home': '首頁', + 'menu.login': '登錄', + 'menu.register': '註冊', + 'menu.register.resultt': '註冊結果', + 'menu.dashboard': 'Dashboard', + 'menu.dashboard.analysis': '分析頁', + 'menu.dashboard.monitor': '監控頁', + 'menu.dashboard.workplace': '工作臺', + 'menu.form': '表單頁', + 'menu.form.basic-form': '基礎表單', + 'menu.form.step-form': '分步表單', + 'menu.form.step-form.info': '分步表單(填寫轉賬信息)', + 'menu.form.step-form.confirm': '分步表單(確認轉賬信息)', + 'menu.form.step-form.result': '分步表單(完成)', + 'menu.form.advanced-form': '高級表單', + 'menu.list': '列表頁', + 'menu.list.search-table': '查詢表格', + 'menu.list.basic-list': '標淮列表', + 'menu.list.card-list': '卡片列表', + 'menu.list.search-list': '搜索列表', + 'menu.list.search-list.articles': '搜索列表(文章)', + 'menu.list.search-list.projects': '搜索列表(項目)', + 'menu.list.search-list.applications': '搜索列表(應用)', + 'menu.profile': '詳情頁', + 'menu.profile.basic': '基礎詳情頁', + 'menu.profile.advanced': '高級詳情頁', + 'menu.result': '結果頁', + 'menu.result.success': '成功頁', + 'menu.result.fail': '失敗頁', + 'menu.account': '個人頁', 'menu.account.center': '個人中心', 'menu.account.settings': '個人設置', 'menu.account.trigger': '觸發報錯', 'menu.account.logout': '退出登錄', + 'menu.exception': '异常页', + 'menu.exception.not-permission': '403', + 'menu.exception.not-find': '404', + 'menu.exception.server-error': '500', + 'menu.exception.trigger': '触发错误', + 'menu.editor': '圖形編輯器', + 'menu.editor.flow': '流程編輯器', + 'menu.editor.mind': '腦圖編輯器', + 'menu.editor.koni': '拓撲編輯器', };