feat: multi-language support

This commit is contained in:
vben
2020-11-26 21:10:21 +08:00
parent 4f8ad976cc
commit 19011296ed
76 changed files with 764 additions and 307 deletions

View File

@@ -1,27 +1,22 @@
import type { MenuModule } from '/@/router/types.d';
const menu: MenuModule = {
orderNo: 10,
menu: {
name: 'Dashboard',
name: 'routes.dashboard.dashboard',
path: '/dashboard',
// tag: {
// dot: true,
// },
children: [
{
path: '/workbench',
name: '工作台',
// tag: {
// content: 'new',
// },
name: 'routes.dashboard.workbench',
},
{
path: '/analysis',
name: '分析页',
name: 'routes.dashboard.analysis',
},
{
path: '/welcome',
name: '首页',
name: 'routes.dashboard.welcome',
},
],
},

View File

@@ -1,13 +1,14 @@
import type { MenuModule } from '/@/router/types.d';
const menu: MenuModule = {
orderNo: 500,
menu: {
name: '图表',
name: 'routes.demo.charts.charts',
path: '/charts',
children: [
{
path: 'apexChart',
name: 'ApexChart',
name: 'routes.demo.charts.apexChart',
},
{
path: 'echarts',
@@ -15,15 +16,15 @@ const menu: MenuModule = {
children: [
{
path: 'map',
name: '地图',
name: 'routes.demo.charts.map',
},
{
path: 'line',
name: '折线图',
name: 'routes.demo.charts.line',
},
{
path: 'pie',
name: '饼图',
name: 'routes.demo.charts.pie',
},
],
},

View File

@@ -1,101 +1,92 @@
import type { MenuModule } from '/@/router/types.d';
const menu: MenuModule = {
orderNo: 30,
menu: {
name: '组件',
name: 'routes.demo.comp.comp',
path: '/comp',
children: [
{
path: 'basic',
name: '基础组件',
name: 'routes.demo.comp.basic',
},
{
path: 'countTo',
name: '数字动画',
name: 'routes.demo.comp.countTo',
},
{
path: 'transition',
name: '动画组件',
name: 'routes.demo.comp.transition',
},
{
path: 'modal',
name: '弹窗扩展',
name: 'routes.demo.comp.modal',
},
{
path: 'drawer',
name: '抽屉扩展',
name: 'routes.demo.comp.drawer',
},
{
path: 'desc',
name: '详情组件',
name: 'routes.demo.comp.desc',
},
{
path: 'qrcode',
name: '二维码组件',
name: 'routes.demo.comp.qrcode',
},
{
path: 'strength-meter',
name: '密码强度组件',
name: 'routes.demo.comp.strength',
},
{
path: 'upload',
name: '上传组件',
name: 'routes.demo.comp.upload',
},
{
path: 'scroll',
name: '滚动组件',
name: 'routes.demo.comp.scroll',
children: [
{
path: 'basic',
name: '基础示例',
name: 'routes.demo.comp.scrollBasic',
},
{
path: 'action',
name: '函数操作示例',
name: 'routes.demo.comp.scrollAction',
},
{
path: 'virtualScroll',
name: '虚拟滚动',
name: 'routes.demo.comp.virtualScroll',
},
],
},
{
path: 'lazy',
name: '懒加载组件',
name: 'routes.demo.comp.lazy',
children: [
{
path: 'basic',
name: '基础示例',
name: 'routes.demo.comp.lazyBasic',
},
{
path: 'transition',
name: '动画效果',
name: 'routes.demo.comp.lazyTransition',
},
],
},
{
path: 'verify',
name: '验证组件',
name: 'routes.demo.comp.verify',
children: [
{
path: 'drag',
name: '拖拽校验',
name: 'routes.demo.comp.verifyDrag',
},
{
path: 'rotate',
name: '图片还原校验',
},
],
},
{
path: '/form',
name: '验证组件',
children: [
{
path: '/base',
name: '拖拽校验',
name: 'routes.demo.comp.verifyRotate',
},
],
},

View File

@@ -1,25 +1,26 @@
import type { MenuModule } from '/@/router/types.d';
const menu: MenuModule = {
orderNo: 500,
menu: {
name: '编辑器',
name: 'routes.demo.editor.editor',
path: '/editor',
children: [
{
path: 'markdown',
name: 'markdown编辑器',
name: 'routes.demo.editor.markdown',
},
{
path: 'tinymce',
name: '富文本',
name: 'routes.demo.editor.tinymce',
children: [
{
path: 'index',
name: '基础使用',
name: 'routes.demo.editor.tinymceBasic',
},
{
path: 'editor',
name: '嵌入form使用',
name: 'routes.demo.editor.tinymceForm',
},
],
},

View File

@@ -1,25 +1,26 @@
import type { MenuModule } from '/@/router/types.d';
const menu: MenuModule = {
orderNo: 500,
menu: {
name: 'Excel',
name: 'routes.demo.excel.excel',
path: '/excel',
children: [
{
path: 'customExport',
name: '选择导出格式',
name: 'routes.demo.excel.customExport',
},
{
path: 'jsonExport',
name: 'JSON数据导出',
name: 'routes.demo.excel.jsonExport',
},
{
path: 'arrayExport',
name: 'Array数据导出',
name: 'routes.demo.excel.arrayExport',
},
{
path: 'importExcel',
name: '导入',
name: 'routes.demo.excel.importExcel',
},
],
},

View File

@@ -1,66 +1,67 @@
import type { MenuModule } from '/@/router/types.d';
const menu: MenuModule = {
orderNo: 19,
menu: {
name: '功能',
name: 'routes.demo.feat.feat',
path: '/feat',
children: [
{
path: 'icon',
name: '图标',
name: 'routes.demo.feat.icon',
},
{
path: 'tabs',
name: '标签页操作',
name: 'routes.demo.feat.tabs',
},
{
path: 'context-menu',
name: '右键菜单',
name: 'routes.demo.feat.contextMenu',
},
{
path: 'download',
name: '文件下载',
name: 'routes.demo.feat.download',
},
{
path: 'click-out-side',
name: 'ClickOutSide',
name: 'routes.demo.feat.clickOutSide',
},
{
path: 'img-preview',
name: '图片预览',
name: 'routes.demo.feat.imgPreview',
},
{
path: 'copy',
name: '剪切板',
name: 'routes.demo.feat.copy',
},
{
path: 'msg',
name: '消息提示',
name: 'routes.demo.feat.msg',
},
{
path: 'watermark',
name: '水印',
name: 'routes.demo.feat.watermark',
},
{
path: 'full-screen',
name: '全屏',
name: 'routes.demo.feat.fullScreen',
},
{
path: 'error-log',
name: '错误日志',
name: 'routes.demo.feat.errorLog',
},
{
path: 'testTab',
name: '带参Tab',
name: 'routes.demo.feat.tab',
children: [
{
path: 'id1',
name: '带参tab1',
name: 'routes.demo.feat.tab1',
},
{
path: 'id2',
name: '带参tab2',
name: 'routes.demo.feat.tab2',
},
],
},

View File

@@ -1,38 +1,39 @@
import type { MenuModule } from '/@/router/types.d';
const menu: MenuModule = {
orderNo: 40,
menu: {
path: '/form',
name: 'Form',
name: 'routes.demo.form.form',
children: [
{
path: 'basic',
name: '基础表单',
name: 'routes.demo.form.basic',
},
{
path: 'useForm',
name: 'useForm',
name: 'routes.demo.form.useForm',
},
{
path: 'refForm',
name: 'RefForm',
name: 'routes.demo.form.refForm',
},
{
path: 'advancedForm',
name: '可收缩表单',
name: 'routes.demo.form.advancedForm',
},
{
path: 'ruleForm',
name: '表单校验',
name: 'routes.demo.form.ruleForm',
},
{
path: 'dynamicForm',
name: '动态表单',
name: 'routes.demo.form.dynamicForm',
},
{
path: 'customerForm',
name: '自定义组件',
name: 'routes.demo.form.customerForm',
},
],
},

View File

@@ -1,21 +1,22 @@
import type { MenuModule } from '/@/router/types.d';
const menu: MenuModule = {
orderNo: 1000,
menu: {
name: '外部页面',
name: 'routes.demo.iframe.frame',
path: '/frame',
children: [
{
path: 'antv',
name: 'antVue文档(内嵌)',
name: 'routes.demo.iframe.antv',
},
{
path: 'doc',
name: '项目文档(内嵌)',
name: 'routes.demo.iframe.doc',
},
{
path: 'docExternal',
name: '项目文档(外链)',
name: 'routes.demo.iframe.docExternal',
},
],
},

View File

@@ -1,8 +1,9 @@
import type { MenuModule } from '/@/router/types.d';
const menu: MenuModule = {
orderNo: 20,
menu: {
name: '页面',
name: 'routes.demo.page.page',
path: '/page-demo',
tag: {
dot: true,
@@ -10,56 +11,56 @@ const menu: MenuModule = {
children: [
{
path: 'form',
name: '表单页',
name: 'routes.demo.page.form',
children: [
{
path: 'basic',
name: '基础表单',
name: 'routes.demo.page.formBasic',
},
{
path: 'step',
name: '分步表单',
name: 'routes.demo.page.formStep',
},
{
path: 'high',
name: '高级表单',
name: 'routes.demo.page.formHigh',
},
],
},
{
path: 'desc',
name: '详情页',
name: 'routes.demo.page.desc',
children: [
{
path: 'basic',
name: '基础详情页',
name: 'routes.demo.page.descBasic',
},
{
path: 'high',
name: '高级详情页',
name: 'routes.demo.page.descHigh',
},
],
},
{
path: 'result',
name: '结果页',
name: 'routes.demo.page.result',
children: [
{
path: 'success',
name: '成功页',
name: 'routes.demo.page.resultSuccess',
},
{
path: 'fail',
name: '失败页',
name: 'routes.demo.page.resultFail',
},
],
},
{
path: 'exception',
name: '异常页',
name: 'routes.demo.page.exception',
children: [
{
path: '403',
@@ -75,38 +76,38 @@ const menu: MenuModule = {
},
{
path: 'net-work-error',
name: '网络错误',
name: 'routes.demo.page.netWorkError',
},
{
path: 'not-data',
name: '无数据',
name: 'routes.demo.page.notData',
},
],
},
{
path: 'account',
name: '个人页',
name: 'routes.demo.page.account',
children: [
{
path: 'center',
name: '个人中心',
name: 'routes.demo.page.accountCenter',
},
{
path: 'setting',
name: '个人设置',
name: 'routes.demo.page.accountSetting',
},
],
},
{
path: 'list',
name: '列表页',
name: 'routes.demo.page.list',
tag: {
content: 'new',
},
children: [
{
path: 'card',
name: '卡片列表',
name: 'routes.demo.page.listCard',
},
],
},

View File

@@ -1,43 +1,44 @@
import type { MenuModule } from '/@/router/types.d';
const menu: MenuModule = {
orderNo: 15,
menu: {
name: '权限管理',
name: 'routes.demo.permission.permission',
path: '/permission',
children: [
{
path: 'front',
name: '基于前端',
name: 'routes.demo.permission.front',
children: [
{
path: 'page',
name: '页面权限',
name: 'routes.demo.permission.frontPage',
},
{
path: 'btn',
name: '按钮权限',
name: 'routes.demo.permission.frontBtn',
},
{
path: 'auth-pageA',
name: '权限测试页A',
name: 'routes.demo.permission.frontTestA',
},
{
path: 'auth-pageB',
name: '权限测试页B',
name: 'routes.demo.permission.frontTestB',
},
],
},
{
path: 'back',
name: '基于后台',
name: 'routes.demo.permission.back',
children: [
{
path: 'page',
name: '页面权限',
name: 'routes.demo.permission.backPage',
},
{
path: 'btn',
name: '按钮权限',
name: 'routes.demo.permission.backBtn',
},
],
},

View File

@@ -1,69 +1,70 @@
import type { MenuModule } from '/@/router/types.d';
const menu: MenuModule = {
orderNo: 30,
menu: {
path: '/table',
name: 'Table',
name: 'routes.demo.table.table',
children: [
{
path: 'basic',
name: '基础表格',
name: 'routes.demo.table.basic',
},
{
path: 'treeTable',
name: '树形表格',
name: 'routes.demo.table.treeTable',
},
{
path: 'fetchTable',
name: '远程加载',
name: 'routes.demo.table.fetchTable',
},
{
path: 'fixedColumn',
name: '固定列',
name: 'routes.demo.table.fixedColumn',
},
{
path: 'customerCell',
name: '自定义列',
name: 'routes.demo.table.customerCell',
},
{
path: 'formTable',
name: '开启搜索区域',
name: 'routes.demo.table.formTable',
},
{
path: 'useTable',
name: 'UseTable',
name: 'routes.demo.table.useTable',
},
{
path: 'refTable',
name: 'RefTable',
name: 'routes.demo.table.refTable',
},
{
path: 'multipleHeader',
name: '多级表头',
name: 'routes.demo.table.multipleHeader',
},
{
path: 'mergeHeader',
name: '合并单元格',
name: 'routes.demo.table.mergeHeader',
},
{
path: 'expandTable',
name: '可展开表格',
name: 'routes.demo.table.expandTable',
},
{
path: 'fixedHeight',
name: '定高/头部自定义',
name: 'routes.demo.table.fixedHeight',
},
{
path: 'footerTable',
name: '表尾行合计',
name: 'routes.demo.table.footerTable',
},
{
path: 'editCellTable',
name: '可编辑单元格',
name: 'routes.demo.table.editCellTable',
},
{
path: 'editRowTable',
name: '可编辑行',
name: 'routes.demo.table.editRowTable',
},
],
},

View File

@@ -1,21 +1,22 @@
import type { MenuModule } from '/@/router/types.d';
const menu: MenuModule = {
orderNo: 50,
menu: {
path: '/tree',
name: 'Tree',
name: 'routes.demo.tree.tree',
children: [
{
path: 'basic',
name: '基础示例',
name: 'routes.demo.tree.basic',
},
{
path: 'editTree',
name: '右键示例',
name: 'routes.demo.tree.editTree',
},
{
path: 'actionTree',
name: '函数操作示例',
name: 'routes.demo.tree.actionTree',
},
],
},