init: 初始系统模板

This commit is contained in:
TsMask
2023-09-05 14:38:23 +08:00
parent a5bc16ae4f
commit 1075c8ae4f
130 changed files with 22531 additions and 1 deletions

16
src/i18n/index.ts Normal file
View File

@@ -0,0 +1,16 @@
import { createI18n } from 'vue-i18n';
import { localGet } from '@/utils/cache-local-utils';
import { CACHE_LOCAL_I18N } from '@/constants/cache-keys-constants';
import zhCN from './locales/zh-CN';
import enUS from './locales/en-US';
const i18n = createI18n({
legacy: false, // 使用 Composition API 的方式创建 i18n 实例
locale: localGet(CACHE_LOCAL_I18N) || 'zh_CN', // 默认显示语言
messages: {
zh_CN: zhCN,
en_US: enUS,
},
});
export default i18n;

62
src/i18n/locales/en-US.ts Normal file
View File

@@ -0,0 +1,62 @@
export default {
// 语言
i18n: 'English',
hello: 'Hello',
// 通用
common: {
title: 'Mask Antd Vue3',
desc: 'Management system based on ant design vue+vue3',
loading: 'Please wait...',
tipTitle: 'Prompt',
},
// 全局页脚
globalFooter: {
help: 'Help',
privacy: 'Privacy',
term: 'Term',
},
// 校验
valid: {
userNameReg:
'The account cannot start with a number and can contain uppercase and lowercase letters, numbers, and no less than 5 digits.',
userNamePlease: 'Please enter the correct login account',
userNameHit: 'Login account',
passwordReg:
'The password should contain at least uppercase and lowercase letters, numbers, special symbols, and no less than 6 digits.',
passwordPlease: 'Please enter the correct login password',
passwordHit: 'Login password',
passwordConfirmHit: 'Confirm login password',
phoneReg: 'Incorrect phone number',
phonePlease: 'Please enter the correct phone number',
phoneHit: 'Mobile number',
codePlease: 'Please enter the correct verification code',
codeHit: 'Verification code',
codeText: 'Obtain verification code',
codeSmsSend: 'Successfully sent, please pay attention to checking the SMS',
},
// 页面
views: {
login: {
tabPane1: 'Account password login',
tabPane2: 'Login with phone number',
registerBtn: 'Register an account',
loginBtn: 'Login',
loginSuccess: 'Login successful',
loginMethod: 'Other login methods:',
loginMethodWX: 'WeChat Scan Login',
loginMethodQQ: 'QQ Scan Code Login',
},
register: {
registerBtn: 'Register',
loginBtn: 'Log in with an existing account',
passwordErr: 'Please enter the correct confirmation password',
passwordConfirmErr: 'The two passwords entered do not match',
tipContent: 'Congratulations, {username} account registration succeeded!',
tipBtn: 'Go to login',
},
},
};

60
src/i18n/locales/zh-CN.ts Normal file
View File

@@ -0,0 +1,60 @@
export default {
// 语言
i18n: '中文',
hello: '你好',
// 通用
common: {
title: 'Mask Antd Vue3',
desc: '基于 ant-design-vue + vue3 的管理系统',
loading: '请稍等...',
tipTitle: '提示',
},
// 全局页脚
globalFooter: {
help: '帮助',
privacy: '隐私',
term: '条款',
},
// 校验
valid: {
userNameReg: '账号不能以数字开头可包含大写小写字母数字且不少于5位',
userNamePlease: '请输入正确登录账号',
userNameHit: '登录账号',
passwordReg: '密码至少包含大小写字母、数字、特殊符号且不少于6位',
passwordPlease: '请输入正确登录密码',
passwordHit: '登录密码',
passwordConfirmHit: '确认登录密码',
phoneReg: '手机号码不正确',
phonePlease: '请输入正确的手机号码',
phoneHit: '手机号码',
codePlease: '请输入正确的验证码',
codeHit: '验证码',
codeText: '获取验证码',
codeSmsSend: '发送成功,请注意查看短信',
},
// 页面
views: {
login: {
tabPane1: '账号密码登录',
tabPane2: '手机号登录',
registerBtn: '注册账号',
loginBtn: '登录',
loginSuccess: '登录成功',
loginMethod: '其他登录方式:',
loginMethodWX: '微信扫一扫登录',
loginMethodQQ: 'QQ扫码登录',
},
register: {
registerBtn: '注册',
loginBtn: '使用已有账号登录',
passwordErr: '请正确输入确认密码',
passwordConfirmErr: '两次输入的密码不一致',
tipContent: '恭喜您,{username} 账号注册成功!',
tipBtn: '前往登录',
},
},
};