新增前端vue

This commit is contained in:
2025-11-26 13:55:01 +08:00
parent ae391f1b94
commit ffd5a6ad66
781 changed files with 83348 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
import type { LocaleType } from '@jeesite/types/config';
import { set } from 'lodash-es';
export const loadLocalePool: LocaleType[] = [];
export function setHtmlPageLang(locale: LocaleType) {
document.querySelector('html')?.setAttribute('lang', locale);
}
export function setLoadLocalePool(cb: (loadLocalePool: LocaleType[]) => void) {
cb(loadLocalePool);
}
export function genMessage(langs: Record<string, Record<string, any>>, prefix = 'lang') {
const obj: Recordable = {};
Object.keys(langs).forEach((key) => {
const langFileModule = langs[key].default;
let fileName = key.replace(`./${prefix}/`, '').replace(/^\.\//, '');
const lastIndex = fileName.lastIndexOf('.');
fileName = fileName.substring(0, lastIndex);
const keyList = fileName.split('/');
const moduleName = keyList.shift();
const objKey = keyList.join('.');
if (moduleName) {
if (objKey) {
set(obj, moduleName, obj[moduleName] || {});
set(obj[moduleName], objKey, langFileModule);
} else {
set(obj, moduleName, langFileModule || {});
}
}
});
return obj;
}

View File

@@ -0,0 +1,13 @@
import { genMessage } from '../helper';
import antdLocale from 'ant-design-vue/es/locale/en_US';
const modules = import.meta.glob('./en/**/*.ts', { eager: true });
export default {
message: {
...genMessage(modules as Recordable<Recordable>, 'en'),
antdLocale,
},
dateLocale: null,
dateLocaleName: 'en',
};

View File

@@ -0,0 +1,34 @@
export default {
okText: 'OK',
closeText: 'Close',
cancelText: 'Cancel',
loadingText: 'Loading...',
saveText: 'Save',
delText: 'Delete',
resetText: 'Reset',
modifyText: 'Modify',
submitText: 'Submit',
searchText: 'Search',
queryText: 'Search',
showText: 'Show',
hideText: 'Hide',
inputText: 'Please enter',
chooseText: 'Please choose',
redo: 'Refresh',
back: 'Back',
light: 'Light',
dark: 'Dark',
notYetRealized: 'Not yet realized',
validateError: 'The information you have filled in is incorrect, please correct it according to the prompt.',
settingsSave: 'Your Settings have cached locally',
settingsReset: 'Your Settings have been reset',
comma: ',',
selectedItems: 'Select {0} items',
};

View File

@@ -0,0 +1,139 @@
export default {
app: {
searchNotData: 'No search results yet',
toSearch: 'to search',
toNavigate: 'to navigate',
},
countdown: {
normalText: 'Get SMS code',
sendText: 'Reacquire in {0}s',
},
cropper: {
selectImage: 'Select Image',
uploadSuccess: 'Uploaded success!',
modalTitle: 'Avatar upload',
okText: 'Confirm and upload',
btn_reset: 'Reset',
btn_rotate_left: 'Counterclockwise rotation',
btn_rotate_right: 'Clockwise rotation',
btn_scale_x: 'Flip horizontal',
btn_scale_y: 'Flip vertical',
btn_zoom_in: 'Zoom in',
btn_zoom_out: 'Zoom out',
preview: 'Preivew',
},
drawer: {
loadingText: 'Loading...',
cancelText: 'Close',
okText: 'Confirm',
},
excel: {
exportModalTitle: 'Export data',
fileType: 'File type',
fileName: 'File name',
},
form: {
putAway: 'Put away',
unfold: 'Unfold',
maxTip: 'The number of characters should be less than {0}',
apiSelectNotFound: 'Wait for data loading to complete...',
},
icon: {
placeholder: 'Click the select icon',
search: 'Search icon',
copy: 'Copy icon successfully!',
},
menu: {
search: 'Menu search',
},
modal: {
cancelText: 'Close',
okText: 'Confirm',
close: 'Close',
maximize: 'Maximize',
restore: 'Restore',
},
table: {
settingDens: 'Density',
settingDensDefault: 'Default',
settingDensMiddle: 'Middle',
settingDensSmall: 'Compact',
settingColumn: 'Column settings',
settingColumnShow: 'Display',
settingColumnCustom:
'If there is a personalized modification, the red icon is displayed. Click the "Reset" button to restore the display.',
settingIndexColumnShow: 'Index',
settingSelectColumnShow: 'Checkbox',
settingFixedLeft: 'Fixed Left',
settingFixedRight: 'Fixed Right',
settingFullScreen: 'Full Screen',
index: 'Index',
total: 'total of {total}',
selectionBarTips: '{count} records selected.',
selectionBarClear: 'Clear',
selectionBarEmpty: 'No records selected.',
},
time: {
before: ' ago',
after: ' after',
just: 'just now',
seconds: ' seconds',
minutes: ' minutes',
hours: ' hours',
days: ' days',
},
tree: {
reload: 'Refresh',
selectAll: 'Select All',
unSelectAll: 'Cancel Select',
expandAll: 'Expand All',
unExpandAll: 'Collapse all',
checkStrictly: 'Hierarchical association',
checkUnStrictly: 'Hierarchical independence',
},
upload: {
save: 'OK',
upload: 'Upload',
imgUpload: 'ImageUpload',
uploaded: 'Uploaded',
operating: 'Operating',
del: 'Delete',
delConfirm: 'Confirm deletion?',
download: 'Download',
saveWarn: 'Please wait for the file to upload and save!',
saveError: 'There is no file successfully uploaded and cannot be saved!',
view: 'View',
preview: 'Preview',
choose: 'Select the file',
accept: 'Support {0} format',
acceptUpload: 'Only upload files in {0} format',
maxSize: 'A single file does not exceed {0}MB ',
maxSizeMultiple: 'Only upload files up to {0}MB!',
maxNumber: 'Only upload up to {0} files',
legend: 'Icon',
fileName: 'File name',
fileSize: 'File size',
fileStatue: 'File status',
createDate: 'Upload time',
startUpload: 'Start upload',
uploadSuccess: 'Upload successfully',
uploadError: 'Upload failed',
uploading: 'Uploading',
uploadWait: 'Please wait for the file upload to finish',
reUploadFailed: 'Re-upload failed files',
fileListEmpty: 'No file has been uploaded yet.',
},
verify: {
error: 'verification failed',
time: 'The verification is successful and it takes {time} seconds',
redoTip: 'Click the picture to refresh',
dragText: 'Hold down the slider and drag',
successText: 'Verified',
},
};

View File

@@ -0,0 +1,122 @@
export default {
header: {
// user dropdown
dropdownItemDoc: 'Document',
dropdownItemLoginOut: 'Login Out',
tooltipErrorLog: 'Error log',
tooltipLock: 'Lock screen',
tooltipNotify: 'Notification',
tooltipEntryFull: 'Full Screen',
tooltipExitFull: 'Exit Full Screen',
// lock
lockScreenPassword: 'Lock screen password',
lockScreen: 'Lock screen',
lockScreenBtn: 'Locking',
// sidebar
sidebarOnline: 'Online',
sidebarLogout: 'Logout',
home: 'Home',
},
footer: {
onlinePreview: 'JeeSite',
onlineDocument: 'Document',
},
multipleTab: {
reload: 'Refresh current',
close: 'Close current',
closeLeft: 'Close Left',
closeRight: 'Close Right',
closeOther: 'Close Other',
closeAll: 'Close All',
},
setting: {
// content mode
contentModeFull: 'Full',
contentModeFixed: 'Fixed width',
// topMenu align
topMenuAlignLeft: 'Left',
topMenuAlignRight: 'Center',
topMenuAlignCenter: 'Right',
// menu trigger
menuTriggerNone: 'Not Show',
menuTriggerBottom: 'Bottom',
menuTriggerTop: 'Top',
// menu type
menuTypeSidebar: 'Left menu mode',
menuTypeMixSidebar: 'Left menu mixed mode',
menuTypeMix: 'Top Menu Mix mode',
menuTypeTopMenu: 'Top menu mode',
on: 'On',
off: 'Off',
minute: 'Minute',
operatingTitle: 'Successful!',
operatingContent: 'The copy is successful, please go to projectSetting.ts to modify the configuration!',
resetSuccess: 'Successfully reset!',
copyBtn: 'Copy',
clearBtn: 'Clear cache and reload page',
drawerTitle: 'Configuration',
darkMode: 'Dark mode',
navMode: 'Layout mode',
interfaceFunction: 'Interface function',
interfaceDisplay: 'Interface display',
animation: 'Animation',
splitMenu: 'Split menu',
closeMixSidebarOnChange: 'Switch page to close menu',
sysTheme: 'System theme',
headerTheme: 'Header theme',
sidebarTheme: 'Menu theme',
menuDrag: 'Drag Sidebar',
menuSearch: 'Menu search',
menuAccordion: 'Sidebar accordion',
menuCollapse: 'Collapse menu',
collapseMenuDisplayName: 'Collapse menu display name',
topMenuLayout: 'Top menu layout',
menuCollapseButton: 'Menu collapse button',
contentMode: 'Content area width',
expandedMenuWidth: 'Expanded menu width',
breadcrumb: 'Breadcrumbs',
breadcrumbIcon: 'Breadcrumbs Icon',
tabs: 'Tabs',
tabsHide: 'Not Show',
tabsStyle: 'Style',
tabsQuickBtn: 'Tabs quick button',
tabsRedoBtn: 'Tabs redo button',
tabsFoldBtn: 'Tabs flod button',
sidebar: 'Sidebar',
header: 'Header',
footer: 'Footer',
fullContent: 'Full content',
grayMode: 'Gray mode',
colorWeak: 'Color Weak Mode',
progress: 'Progress',
switchLoading: 'Switch Loading',
switchAnimation: 'Switch animation',
animationType: 'Animation type',
autoScreenLock: 'Auto screen lock',
notAutoScreenLock: 'Not auto lock',
fixedHeader: 'Fixed header',
fixedSideBar: 'Fixed Sidebar',
mixSidebarTrigger: 'Mixed menu trigger',
triggerHover: 'Hover',
triggerClick: 'Click',
mixSidebarFixed: 'Fixed expanded menu',
},
};

View File

@@ -0,0 +1,4 @@
export default {
login: 'Login',
errorLogList: 'Error Log',
};

View File

@@ -0,0 +1,6 @@
export default {
dashboard: 'Dashboard',
about: 'About',
workbench: 'Workbench',
analysis: 'Analysis',
};

View File

@@ -0,0 +1,194 @@
export default {
charts: {
baiduMap: 'Baidu map',
aMap: 'A map',
googleMap: 'Google map',
charts: 'Chart',
map: 'Map',
line: 'Line',
pie: 'Pie',
},
comp: {
comp: 'Component',
basic: 'Basic',
transition: 'Animation',
countTo: 'Count To',
scroll: 'Scroll',
scrollBasic: 'Basic',
scrollAction: 'Scroll Function',
virtualScroll: 'Virtual Scroll',
tree: 'Tree',
treeBasic: 'Basic',
editTree: 'Searchable/toolbar',
actionTree: 'Function operation',
modal: 'Modal',
drawer: 'Drawer',
desc: 'Desc',
lazy: 'Lazy',
lazyBasic: 'Basic',
lazyTransition: 'Animation',
verify: 'Verify',
verifyDrag: 'Drag ',
verifyRotate: 'Picture Restore',
qrcode: 'QR code',
strength: 'Password strength',
upload: 'Upload',
loading: 'Loading',
time: 'Relative Time',
cropperImage: 'Cropper Image',
cardList: 'Card List',
},
editor: {
editor: 'Editor',
jsonEditor: 'Json editor',
markdown: 'Markdown editor',
tinymce: 'Rich text',
tinymceBasic: 'Basic',
tinymceForm: 'embedded form',
},
excel: {
excel: 'Excel',
customExport: 'Select export format',
jsonExport: 'JSON data export',
arrayExport: 'Array data export',
importExcel: 'Import',
},
feat: {
feat: 'Page Function',
icon: 'Icon',
tabs: 'Tabs',
sessionTimeout: 'Session Timeout',
print: 'Print',
contextMenu: 'Context Menu',
download: 'Download',
clickOutSide: 'ClickOutSide',
imgPreview: 'Picture Preview',
copy: 'Clipboard',
msg: 'Message prompt',
watermark: 'Watermark',
ripple: 'Ripple',
fullScreen: 'Full Screen',
errorLog: 'Error Log',
tab: 'Tab with parameters',
tab1: 'Tab with parameter 1',
tab2: 'Tab with parameter 2',
menu: 'Menu with parameters',
menu1: 'Menu with parameters 1',
menu2: 'Menu with parameters 2',
ws: 'Websocket test',
breadcrumb: 'Breadcrumbs',
breadcrumbFlat: 'Flat Mode',
breadcrumbFlatDetail: 'Flat mode details',
breadcrumbChildren: 'Level mode',
breadcrumbChildrenDetail: 'Level mode detail',
},
form: {
form: 'Form',
basic: 'Basic',
useForm: 'useForm',
refForm: 'RefForm',
advancedForm: 'Shrinkable',
ruleForm: 'Form validation',
dynamicForm: 'Dynamic',
customerForm: 'Custom',
appendForm: 'Append',
},
iframe: {
frame: 'External',
antv: 'antVue doc (embedded)',
doc: 'Project doc (embedded)',
docExternal: 'Project doc (external)',
},
level: { level: 'MultiMenu' },
page: {
page: 'Page',
form: 'Form',
formBasic: 'Basic Form',
formStep: 'Step Form',
formHigh: 'Advanced Form',
desc: 'Details',
descBasic: 'Basic Details',
descHigh: 'Advanced Details',
result: 'Result',
resultSuccess: 'Success',
resultFail: 'Failed',
account: 'Personal',
accountCenter: 'Personal Center',
accountSetting: 'Personal Settings',
exception: 'Exception',
netWorkError: 'Network Error',
notData: 'No data',
list: 'List page',
listCard: 'Card list',
basic: 'Basic list',
listBasic: 'Basic list',
listSearch: 'Search list',
},
permission: {
permission: 'Permission',
front: 'front-end',
frontPage: 'Page',
frontBtn: 'Button',
frontTestA: 'Test page A',
frontTestB: 'Test page B',
back: 'background',
backPage: 'Page',
backBtn: 'Button',
},
setup: {
page: 'Intro page',
},
system: {
moduleName: 'System management',
account: 'Account management',
account_detail: 'Account detail',
password: 'Change password',
dept: 'Department management',
menu: 'Menu management',
role: 'Role management',
},
table: {
table: 'Table',
basic: 'Basic',
treeTable: 'Tree',
fetchTable: 'Remote loading',
fixedColumn: 'Fixed column',
customerCell: 'Custom column',
formTable: 'Open search',
useTable: 'UseTable',
refTable: 'RefTable',
multipleHeader: 'MultiLevel header',
mergeHeader: 'Merge cells',
expandTable: 'Expandable table',
fixedHeight: 'Fixed height',
footerTable: 'Footer',
editCellTable: 'Editable cell',
editRowTable: 'Editable row',
authColumn: 'Auth column',
},
};

View File

@@ -0,0 +1,150 @@
export default {
api: {
operationFailed: 'Operation failed',
errorTip: 'System Tip',
errorMessage: 'The operation failed, the system is abnormal!',
timeoutMessage: 'Login timed out, please log in again!',
apiTimeoutMessage: 'The interface request timed out, please refresh the page and try again!',
apiRequestFailed: 'The interface request failed, please try again later!',
networkException: 'network anomaly',
networkExceptionMsg: 'The network is abnormal, please try again later!',
errMsg401: 'The user does not have permission (token, user name, password error)!',
errMsg403: 'The user is authorized, but access is forbidden!',
errMsg404: 'Network request error, the resource was not found!',
errMsg405: 'Network request error, request method not allowed!',
errMsg408: 'Network request timed out!',
errMsg500: 'Server error, please contact the administrator!',
errMsg501: 'The network is not implemented!',
errMsg502: 'Network Error!',
errMsg503: 'The service is unavailable, the server is temporarily overloaded or maintained!',
errMsg504: 'Network timeout!',
errMsg505: 'The http version does not support the request!',
},
message: {
error: 'failure,error',
warning: 'no,not,Not,already exists',
success: 'success,completion',
},
app: {
logoutTip: 'Reminder',
logoutMessage: 'Confirm to exit the system?',
menuLoading: 'Please wait, loading...',
},
errorLog: {
tableTitle: 'Error log list',
tableColumnType: 'Type',
tableColumnDate: 'Time',
tableColumnFile: 'File',
tableColumnMsg: 'Error message',
tableColumnStackMsg: 'Stack info',
tableActionDesc: 'Details',
modalTitle: 'Error details',
fireVueError: 'Fire vue error',
fireResourceError: 'Fire resource error',
fireAjaxError: 'Fire ajax error',
enableMessage: 'Only effective when useErrorHandle is true in `projectSetting.ts`.',
},
exception: {
backLogin: 'Back Login',
backHome: 'Back Home',
subTitle403: "Sorry, you don't have access to this page.",
subTitle404: 'Sorry, the page you visited does not exist.',
subTitle500: 'Sorry, the server is reporting an error.',
noDataTitle: 'No data on the current page.',
networkErrorTitle: 'Network Error',
networkErrorSubTitle: 'SorryYour network connection has been disconnected, please check your network!',
},
lock: {
unlock: 'Click to unlock',
alert: 'Lock screen password error',
backToLogin: 'Back to login',
entry: 'Enter the system',
placeholder: 'Please enter the lock screen password or user password',
},
login: {
backSignIn: 'Back sign in',
mobileSignInFormTitle: 'Mobile sign in',
qrSignInFormTitle: 'Qr code sign in',
signInFormTitle: 'Sign in',
signUpFormTitle: 'Sign up',
forgetFormTitle: 'Reset password',
signInTitle: 'Backstage management system',
signInDesc: 'Enter your personal details and get started!',
policy: 'I agree to the JeeSite Privacy Policy',
scanSign: `scanning the code to complete the login`,
loginButton: 'Sign in',
registerButton: 'Sign up',
rememberMe: 'Remember me',
forgetPassword: 'Forget Password?',
otherSignIn: 'Sign in with',
// notify
loginSuccessTitle: 'Login successful',
loginSuccessDesc: 'Welcome back',
// placeholder
accountPlaceholder: 'Please input username',
passwordPlaceholder: 'Please input password',
smsPlaceholder: 'Please input sms code',
mobilePlaceholder: 'Please input mobile',
emailPlaceholder: 'Please input E-mail',
policyPlaceholder: 'Register after checking',
diffPwd: 'The two passwords are inconsistent',
corpPlaceholder: 'Please selection tenant',
userPlaceholder: 'Please selection account',
userNamePlaceholder: 'Please input nick name',
account: 'Username',
userName: 'Nick name',
password: 'Password',
confirmPassword: 'Confirm Password',
validCode: 'Valid Code',
mobile: 'Mobile',
email: 'Email',
smsCode: 'SMS code',
emailCode: 'Email code',
getPwdQuestion: 'Get question',
pwdQuestion: 'Question',
pwdQuestionAnswer: 'Answer',
},
account: {
center: 'Account Center',
userInfo: 'User Info',
modifyPwd: 'Modify Password',
modifyPwdTip: 'Change the password periodically',
modifyPqa: 'Security Question',
modifyPqaTip: 'Please change the security periodically',
basicTab: 'Basic Setting',
securityTab: 'Security Setting',
bindingTab: 'Account Binding',
userName: 'Nick name',
email: 'Email',
mobile: 'Mobile',
phone: 'Phone',
sign: 'Sign',
changeAvatar: 'Change Avatar',
updateBtn: 'Update Info',
oldPassword: 'Current Password',
newPassword: 'New Password',
confirmNewPassword: 'Password',
newPasswordInputTip: 'Please input new password',
newPasswordNotBlank: 'Password not blank',
newPasswordNotEquals: 'The two password entries are inconsistent',
pwdQuestion: 'Security question',
oldPwdQuestion: 'Old question',
oldPwdQuestionAnswer: 'Old answer',
newPwdQuestion: 'New question',
newPwdQuestionAnswer: 'New answer',
},
};

View File

@@ -0,0 +1,30 @@
export default {
okText: '确认',
closeText: '关闭',
cancelText: '取消',
loadingText: '加载中...',
saveText: '保存',
delText: '删除',
resetText: '重置',
modifyText: '修改',
submitText: '提交',
searchText: '搜索',
queryText: '查询',
showText: '显示',
hideText: '隐藏',
inputText: '请输入',
chooseText: '请选择',
redo: '刷新',
back: '返回',
light: '亮色主题',
dark: '黑暗主题',
notYetRealized: '暂未实现',
validateError: '您填写的信息有误,请根据提示修正。',
selectedItems: '当前已选择 {0} 项',
};

View File

@@ -0,0 +1,141 @@
export default {
app: {
searchNotData: '暂无搜索结果',
toSearch: '确认',
toNavigate: '切换',
},
countdown: {
normalText: '获取验证码',
sendText: '{0}秒后重新获取',
},
cropper: {
selectImage: '选择图片',
uploadSuccess: '上传成功',
modalTitle: '头像上传',
okText: '确认并上传',
btn_reset: '重置',
btn_rotate_left: '逆时针旋转',
btn_rotate_right: '顺时针旋转',
btn_scale_x: '水平翻转',
btn_scale_y: '垂直翻转',
btn_zoom_in: '放大',
btn_zoom_out: '缩小',
preview: '预览',
},
drawer: {
loadingText: '加载中...',
cancelText: '关闭',
okText: '确认',
},
excel: {
exportModalTitle: '导出数据',
fileType: '文件类型',
fileName: '文件名',
},
form: {
putAway: '收起',
unfold: '展开',
maxTip: '字符数应小于{0}位',
apiSelectNotFound: '请等待数据加载完成...',
},
icon: {
placeholder: '点击选择图标',
search: '搜索图标',
copy: '复制图标成功!',
},
menu: {
search: '菜单搜索',
},
modal: {
cancelText: '关闭',
okText: '确认',
close: '关闭',
maximize: '最大化',
restore: '还原',
},
table: {
settingDens: '密度',
settingDensDefault: '默认',
settingDensMiddle: '中等',
settingDensSmall: '紧凑',
settingColumn: '列设置',
settingColumnShow: '列展示',
settingColumnCustom: '有个性化修改时显示红色图标,点击 “重置” 按钮,恢复显示。',
settingIndexColumnShow: '序号列',
settingSelectColumnShow: '复选框',
settingFixedLeft: '固定到左侧',
settingFixedRight: '固定到右侧',
settingFullScreen: '全屏',
index: '序号',
total: '共 {total} 条数据',
selectionBarTips: '已选择 {count} 条记录',
selectionBarClear: '清空',
selectionBarEmpty: '未选中任何记录',
},
time: {
before: '前',
after: '后',
just: '刚刚',
seconds: '秒',
minutes: '分钟',
hours: '小时',
days: '天',
},
tree: {
reload: '刷新数据',
selectAll: '选择全部',
unSelectAll: '取消选择',
expandAll: '展开全部',
unExpandAll: '折叠全部',
checkStrictly: '层级关联',
checkUnStrictly: '层级独立',
},
upload: {
save: '确定',
upload: '上传',
imgUpload: '图片上传',
uploaded: '已上传',
operating: '操作',
del: '删除',
delConfirm: '确认删除?',
download: '下载',
saveWarn: '请等待文件上传后,保存!',
saveError: '没有上传成功的文件,无法保存!',
view: '查看',
preview: '预览',
choose: '选择文件',
accept: '支持{0}格式',
acceptUpload: '只能上传{0}格式文件',
maxSize: '单个文件不超过{0}MB',
maxSizeMultiple: '只能上传不超过{0}MB的文件!',
maxNumber: '最多只能上传{0}个文件',
legend: '图标',
fileName: '文件名',
fileSize: '文件大小',
fileStatue: '状态',
createDate: '上传时间',
startUpload: '开始上传',
uploadSuccess: '上传成功',
uploadError: '上传失败',
uploading: '上传中',
uploadWait: '请等待文件上传结束后操作',
reUploadFailed: '重新上传失败文件',
fileListEmpty: '还没有上传文件。',
},
verify: {
error: '验证失败!',
time: '验证校验成功,耗时{time}秒!',
redoTip: '点击图片可刷新',
dragText: '请按住滑块拖动',
successText: '验证通过',
},
};

View File

@@ -0,0 +1,123 @@
export default {
header: {
// user dropdown
dropdownItemDoc: '在线文档',
dropdownItemLoginOut: '退出系统',
// tooltip
tooltipErrorLog: '错误日志',
tooltipLock: '锁定屏幕',
tooltipNotify: '消息通知',
tooltipEntryFull: '全屏',
tooltipExitFull: '退出全屏',
// lock
lockScreenPassword: '锁屏密码',
lockScreen: '锁定屏幕',
lockScreenBtn: '锁定',
// sidebar
sidebarOnline: '在线',
sidebarLogout: '注销',
home: '首页',
},
footer: {
onlinePreview: '官方网站',
onlineDocument: '在线文档',
},
multipleTab: {
reload: '重新加载',
close: '关闭标签页',
closeLeft: '关闭左侧标签页',
closeRight: '关闭右侧标签页',
closeOther: '关闭其它标签页',
closeAll: '关闭全部标签页',
},
setting: {
// content mode
contentModeFull: '流式',
contentModeFixed: '定宽',
// topMenu align
topMenuAlignLeft: '居左',
topMenuAlignRight: '居中',
topMenuAlignCenter: '居右',
// menu trigger
menuTriggerNone: '不显示',
menuTriggerBottom: '底部',
menuTriggerTop: '顶部',
// menu type
menuTypeSidebar: '左侧菜单模式',
menuTypeMixSidebar: '左侧菜单混合模式',
menuTypeMix: '顶部菜单混合模式',
menuTypeTopMenu: '顶部菜单模式',
on: '开',
off: '关',
minute: '分钟',
operatingTitle: '操作成功',
operatingContent: '复制成功,请到 projectSetting.ts 中修改配置!',
resetSuccess: '重置成功!',
copyBtn: '拷贝',
clearBtn: '清空缓存并刷新页面',
drawerTitle: '主题配置',
darkMode: '夜间模式',
navMode: '布局风格',
interfaceFunction: '界面功能',
interfaceDisplay: '界面显示',
animation: '动画',
splitMenu: '分割菜单',
closeMixSidebarOnChange: '切换页面关闭菜单',
sysTheme: '系统主题',
headerTheme: '顶栏主题',
sidebarTheme: '菜单主题',
menuDrag: '侧边菜单拖拽',
menuSearch: '菜单搜索',
menuAccordion: '侧边菜单手风琴模式',
menuCollapse: '折叠菜单',
collapseMenuDisplayName: '折叠菜单显示名称',
topMenuLayout: '顶部菜单布局',
menuCollapseButton: '菜单折叠按钮',
contentMode: '内容区域宽度',
expandedMenuWidth: '侧边栏宽度',
breadcrumb: '面包屑',
breadcrumbIcon: '面包屑图标',
tabs: '标签页',
tabsHide: '不显示',
tabsStyle: '风格',
tabsQuickBtn: '标签页快捷按钮',
tabsRedoBtn: '标签页刷新按钮',
tabsFoldBtn: '标签页折叠按钮',
sidebar: '左侧菜单',
header: '顶栏',
footer: '页脚',
fullContent: '全屏内容',
grayMode: '灰色模式',
colorWeak: '色弱模式',
progress: '顶部进度条',
switchLoading: '切换loading',
switchAnimation: '切换动画',
animationType: '动画类型',
autoScreenLock: '自动锁屏',
notAutoScreenLock: '不自动锁屏',
fixedHeader: '固定header',
fixedSideBar: '固定Sidebar',
mixSidebarTrigger: '混合菜单触发方式',
triggerHover: '悬停',
triggerClick: '点击',
mixSidebarFixed: '固定展开菜单',
},
};

View File

@@ -0,0 +1,4 @@
export default {
login: '登录',
errorLogList: '错误日志列表',
};

View File

@@ -0,0 +1,6 @@
export default {
dashboard: '控制面板',
workbench: '我的工作',
analysis: '仪表盘',
about: '关于我们',
};

View File

@@ -0,0 +1,185 @@
export default {
charts: {
baiduMap: '百度地图',
aMap: '高德地图',
googleMap: '谷歌地图',
charts: '图表',
map: '地图',
line: '折线图',
pie: '饼图',
},
comp: {
comp: '组件',
basic: '基础组件',
transition: '动画组件',
countTo: '数字动画',
scroll: '滚动组件',
scrollBasic: '基础滚动',
scrollAction: '滚动函数',
virtualScroll: '虚拟滚动',
tree: 'Tree',
treeBasic: '基础树',
editTree: '可搜索/工具栏',
actionTree: '函数操作示例',
modal: '弹窗扩展',
drawer: '抽屉扩展',
desc: '详情组件',
lazy: '懒加载组件',
lazyBasic: '基础示例',
lazyTransition: '动画效果',
verify: '验证组件',
verifyDrag: '拖拽校验',
verifyRotate: '图片还原',
qrcode: '二维码组件',
strength: '密码强度组件',
upload: '上传组件',
loading: 'Loading',
time: '相对时间',
cropperImage: '图片裁剪',
cardList: '卡片列表',
},
editor: {
editor: '编辑器',
jsonEditor: 'Json编辑器',
markdown: 'markdown编辑器',
tinymce: '富文本',
tinymceBasic: '基础使用',
tinymceForm: '嵌入form',
},
excel: {
excel: 'Excel',
customExport: '选择导出格式',
jsonExport: 'JSON数据导出',
arrayExport: 'Array数据导出',
importExcel: '导入',
},
feat: {
feat: '功能',
icon: '图标',
sessionTimeout: '登录过期',
tabs: '标签页操作',
print: '打印',
contextMenu: '右键菜单',
download: '文件下载',
clickOutSide: 'ClickOutSide组件',
imgPreview: '图片预览',
copy: '剪切板',
msg: '消息提示',
watermark: '水印',
ripple: '水波纹',
fullScreen: '全屏',
errorLog: '错误日志',
tab: 'Tab带参',
tab1: 'Tab带参1',
tab2: 'Tab带参2',
menu: 'Menu带参',
menu1: 'Menu带参1',
menu2: 'Menu带参2',
ws: 'websocket测试',
breadcrumb: '面包屑导航',
breadcrumbFlat: '平级模式',
breadcrumbFlatDetail: '平级详情',
breadcrumbChildren: '层级模式',
breadcrumbChildrenDetail: '层级详情',
},
form: {
form: 'Form',
basic: '基础表单',
useForm: 'useForm',
refForm: 'RefForm',
advancedForm: '可收缩表单',
ruleForm: '表单验证',
dynamicForm: '动态表单',
customerForm: '自定义组件',
appendForm: '表单增删示例',
},
iframe: {
frame: '外部页面',
antv: 'antVue文档(内嵌)',
doc: '项目文档(内嵌)',
docExternal: '项目文档(外链)',
},
level: { level: '多级菜单' },
page: {
page: '页面',
form: '表单页',
formBasic: '基础表单',
formStep: '分步表单',
formHigh: '高级表单',
desc: '详情页',
descBasic: '基础详情页',
descHigh: '高级详情页',
result: '结果页',
resultSuccess: '成功页',
resultFail: '失败页',
account: '个人页',
accountCenter: '个人中心',
accountSetting: '个人设置',
exception: '异常页',
netWorkError: '网络错误',
notData: '无数据',
list: '列表页',
listCard: '卡片列表',
listBasic: '标准列表',
listSearch: '搜索列表',
},
permission: {
permission: '权限管理',
front: '基于前端权限',
frontPage: '页面权限',
frontBtn: '按钮权限',
frontTestA: '权限测试页A',
frontTestB: '权限测试页B',
back: '基于后台权限',
backPage: '页面权限',
backBtn: '按钮权限',
},
setup: {
page: '引导页',
},
system: {
moduleName: '系统管理',
account: '账号管理',
account_detail: '账号详情',
password: '修改密码',
dept: '部门管理',
menu: '菜单管理',
role: '角色管理',
},
table: {
table: 'Table',
basic: '基础表格',
treeTable: '树形表格',
fetchTable: '远程加载示例',
fixedColumn: '固定列',
customerCell: '自定义列',
formTable: '开启搜索区域',
useTable: 'UseTable',
refTable: 'RefTable',
multipleHeader: '多级表头',
mergeHeader: '合并单元格',
expandTable: '可展开表格',
fixedHeight: '定高/头部自定义',
footerTable: '表尾行合计',
editCellTable: '可编辑单元格',
editRowTable: '可编辑行',
authColumn: '权限列',
},
};

View File

@@ -0,0 +1,150 @@
export default {
api: {
operationFailed: '操作失败',
errorTip: '系统提示',
errorMessage: '操作失败,系统异常!',
timeoutMessage: '登录超时,请重新登录!',
apiTimeoutMessage: '接口请求超时,请刷新页面重试!',
apiRequestFailed: '接口请求出错,请稍后重试!',
networkException: '网络异常',
networkExceptionMsg: '网络异常,请稍后重试!',
errMsg401: '很抱歉,您没有权限(令牌、用户名、密码错误)!',
errMsg403: '很抱歉,您没有权限访问此页面,若有疑问请联系管理员。',
errMsg404: '网络请求错误,访问地址不存在!',
errMsg405: '网络请求错误,请求方法未允许!',
errMsg408: '网络请求超时!',
errMsg500: '服务器错误,请联系管理员!',
errMsg501: '网络未实现!',
errMsg502: '网络错误!',
errMsg503: '服务不可用,服务器暂时过载或维护!',
errMsg504: '网络超时!',
errMsg505: 'http版本不支持该请求',
},
message: {
error: '失败,错误,未完成',
warning: '不能,不允许,必须,已存在,不需要,不正确',
success: '成功,完成',
},
app: {
logoutTip: '温馨提醒',
logoutMessage: '是否确认退出系统?',
menuLoading: '请稍候,即将进入系统...',
},
errorLog: {
tableTitle: '错误日志列表',
tableColumnType: '类型',
tableColumnDate: '时间',
tableColumnFile: '文件',
tableColumnMsg: '错误信息',
tableColumnStackMsg: 'stack信息',
tableActionDesc: '详情',
modalTitle: '错误详情',
fireVueError: '模拟vue错误',
fireResourceError: '模拟资源加载错误',
fireAjaxError: '模拟ajax错误',
enableMessage: '只在 `projectSetting.ts` 内的useErrorHandle为true时生效.',
},
exception: {
backLogin: '返回登录',
backHome: '返回首页',
subTitle403: '抱歉,您无权访问此页面。',
subTitle404: '抱歉,您访问的页面不存在。',
subTitle500: '抱歉,服务器报告错误。',
noDataTitle: '当前页无数据',
networkErrorTitle: '网络错误',
networkErrorSubTitle: '抱歉,您的网络连接已断开,请检查您的网络!',
},
lock: {
unlock: '点击解锁',
alert: '锁屏密码错误',
backToLogin: '返回登录',
entry: '进入系统',
placeholder: '请输入锁屏密码或者用户密码',
},
login: {
backSignIn: '返回',
signInFormTitle: '登录',
mobileSignInFormTitle: '手机登录',
qrSignInFormTitle: '二维码登录',
signUpFormTitle: '注册',
forgetFormTitle: '重置密码',
signInTitle: 'JeeSite 是当前最好用的快速开发平台',
signInDesc: 'JeeSite 是一个专业的平台,是一个让你使用放心的平台。',
policy: '我同意 JeeSite 隐私政策',
scanSign: `扫码后点击"确认",即可完成登录`,
loginButton: '登录',
registerButton: '注册',
rememberMe: '记住我',
forgetPassword: '忘记密码?',
otherSignIn: '其他登录方式',
// notify
loginSuccessTitle: '登录成功',
loginSuccessDesc: '欢迎回来',
// placeholder
accountPlaceholder: '请输入账号',
userNamePlaceholder: '请输入姓名',
passwordPlaceholder: '请输入密码',
smsPlaceholder: '请输入验证码',
mobilePlaceholder: '请输入手机号码',
emailPlaceholder: '请输入邮箱',
policyPlaceholder: '勾选后才能注册',
diffPwd: '两次输入密码不一致',
corpPlaceholder: '请选择租户',
userPlaceholder: '请选择账号',
account: '账号',
userName: '姓名',
password: '密码',
confirmPassword: '确认密码',
validCode: '验证码',
mobile: '手机号码',
email: '邮箱',
smsCode: '短信验证码',
emailCode: '邮箱验证码',
getPwdQuestion: '获取保密问题',
pwdQuestion: '保密问题',
pwdQuestionAnswer: '请输入答案',
},
account: {
center: '个人中心',
userInfo: '个人信息',
modifyPwd: '修改密码',
modifyPwdTip: '请定期修改密码',
modifyPqa: '修改密保',
modifyPqaTip: '请定期修改密保',
basicTab: '基础设置',
securityTab: '安全设置',
bindingTab: '账号绑定',
userName: '用户昵称',
email: '电子邮箱',
mobile: '手机号码',
phone: '办公电话',
sign: '个性签名',
changeAvatar: '更换头像',
updateBtn: '更新信息',
oldPassword: '当前密码',
newPassword: '新密码',
confirmNewPassword: '确认密码',
newPasswordInputTip: '请输入新密码',
newPasswordNotBlank: '密码不能为空',
newPasswordNotEquals: '两次输入的密码不一致!',
pwdQuestion: '保密问题',
oldPwdQuestion: '旧保密问题',
oldPwdQuestionAnswer: '旧保密答案',
newPwdQuestion: '新保密问题',
newPwdQuestionAnswer: '新保密答案',
},
};

View File

@@ -0,0 +1,13 @@
import { genMessage } from '../helper';
import antdLocale from 'ant-design-vue/es/locale/zh_CN';
const modules = import.meta.glob('./zh-CN/**/*.ts', { eager: true });
export default {
message: {
...genMessage(modules as Recordable<Recordable>, 'zh-CN'),
antdLocale,
},
dateLocale: null,
dateLocaleName: 'zh-cn',
};

View File

@@ -0,0 +1,45 @@
import type { App } from 'vue';
import type { I18nOptions } from 'vue-i18n';
import { createI18n } from 'vue-i18n';
import { setHtmlPageLang, setLoadLocalePool } from './helper';
import { localeSetting } from '@jeesite/core/settings/localeSetting';
import { useLocaleStoreWithOut } from '@jeesite/core/store/modules/locale';
const { fallback, availableLocales } = localeSetting;
export let i18n: ReturnType<typeof createI18n>;
async function createI18nOptions(): Promise<I18nOptions> {
const localeStore = useLocaleStoreWithOut();
const locale = localeStore.getLocale;
const defaultLocal = await import(`./lang/${locale}.ts`);
const message = defaultLocal.default?.message ?? {};
setHtmlPageLang(locale);
setLoadLocalePool((loadLocalePool) => {
loadLocalePool.push(locale);
});
return {
legacy: false,
locale,
fallbackLocale: fallback,
messages: {
[locale]: message,
},
availableLocales: availableLocales,
sync: true, // If you dont want to inherit locale from global scope, you need to set sync of i18n component option to false.
silentTranslationWarn: false, // true - warning off
missingWarn: false,
silentFallbackWarn: false,
fallbackWarn: false,
};
}
// setup i18n instance with glob
export async function setupI18n(app: App) {
const options = await createI18nOptions();
i18n = createI18n(options);
app.use(i18n);
}

View File

@@ -0,0 +1,71 @@
/**
* Multi-language related operations
*/
import type { LocaleType } from '@jeesite/types/config';
import { i18n } from './setupI18n';
import { useLocaleStoreWithOut } from '@jeesite/core/store/modules/locale';
import { unref, computed } from 'vue';
import { loadLocalePool, setHtmlPageLang } from './helper';
import { Locale } from 'ant-design-vue/es/locale';
interface LangModule {
message: Recordable;
dateLocale: Recordable;
dateLocaleName: string;
}
function setI18nLanguage(locale: LocaleType) {
const localeStore = useLocaleStoreWithOut();
if (i18n.mode === 'legacy') {
i18n.global.locale = locale;
} else {
(i18n.global.locale as any).value = locale;
}
localeStore.setLocaleInfo({ locale });
setHtmlPageLang(locale);
}
export function useLocale() {
const localeStore = useLocaleStoreWithOut();
const getLocale = computed(() => localeStore.getLocale);
const getShowLocalePicker = computed(() => localeStore.getShowPicker);
const getAntdLocale = computed((): any => {
const localeMessage = i18n.global.getLocaleMessage<{ antdLocale: Locale }>(unref(getLocale));
return localeMessage?.antdLocale ?? {};
});
// Switching the language will change the locale of useI18n
// And submit to configuration modification
async function changeLocale(locale: LocaleType) {
const globalI18n = i18n.global;
const currentLocale = unref(globalI18n.locale);
if (currentLocale === locale) {
return locale;
}
if (loadLocalePool.includes(locale)) {
setI18nLanguage(locale);
return locale;
}
const langModule = ((await import(`./lang/${locale}.ts`)) as any).default as LangModule;
if (!langModule) return;
const { message } = langModule;
globalI18n.setLocaleMessage(locale, message);
loadLocalePool.push(locale);
setI18nLanguage(locale);
return locale;
}
return {
getLocale,
getShowLocalePicker,
changeLocale,
getAntdLocale,
};
}