Pre Merge pull request !60 from mrtse/dev-v5

pull/60/MERGE
mrtse 2025-01-09 08:51:24 +00:00 committed by Gitee
commit 535b29e2fe
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
6 changed files with 17 additions and 14 deletions

View File

@ -7,7 +7,7 @@ VITE_APP_NAMESPACE=yudao-vben-antd
VITE_NITRO_MOCK=false VITE_NITRO_MOCK=false
# 租户开关 # 租户开关
VITE_APP_TENANT_ENABLE=true VITE_GLOB_TENANT_ENABLE=true
# 验证码的开关 # 验证码的开关
VITE_APP_CAPTCHA_ENABLE=true VITE_GLOB_CAPTCHA_ENABLE=false

View File

@ -5,7 +5,7 @@
"codeLogin": "Code Login", "codeLogin": "Code Login",
"qrcodeLogin": "Qr Code Login", "qrcodeLogin": "Qr Code Login",
"forgetPassword": "Forget Password", "forgetPassword": "Forget Password",
"tenantname": "Tenant Name", "tenantName": "Tenant Name",
"username": "Username", "username": "Username",
"password": "Password", "password": "Password",
"usernameTip": "Please enter username", "usernameTip": "Please enter username",

View File

@ -5,7 +5,7 @@
"codeLogin": "验证码登录", "codeLogin": "验证码登录",
"qrcodeLogin": "二维码登录", "qrcodeLogin": "二维码登录",
"forgetPassword": "忘记密码", "forgetPassword": "忘记密码",
"tenantname": "租户", "tenantName": "租户",
"username": "账号", "username": "账号",
"password": "密码", "password": "密码",
"usernameTip": "请输入用户名", "usernameTip": "请输入用户名",

View File

@ -37,13 +37,13 @@ const formSchema = computed((): VbenFormSchema[] => {
{ {
component: 'VbenInput', component: 'VbenInput',
componentProps: { componentProps: {
placeholder: $t('authentication.tenantName'), placeholder: $t('page.auth.tenantName'),
}, },
fieldName: 'tenantName', fieldName: 'tenantName',
label: $t('authentication.tenantName'), label: $t('page.auth.tenantName'),
rules: z rules: z
.string() .string()
.min(1, { message: $t('authentication.tenantNameTip') }) .min(1, { message: $t('page.auth.tenantNameTip') })
.default(import.meta.env.VITE_APP_DEFAULT_TENANT_NAME), .default(import.meta.env.VITE_APP_DEFAULT_TENANT_NAME),
dependencies: { dependencies: {
triggerFields: ['tenantName'], triggerFields: ['tenantName'],
@ -56,7 +56,7 @@ const formSchema = computed((): VbenFormSchema[] => {
{ {
component: 'VbenInput', component: 'VbenInput',
componentProps: { componentProps: {
placeholder: $t('authentication.usernameTip'), placeholder: $t('authentication.username'),
}, },
fieldName: 'username', fieldName: 'username',
label: $t('authentication.username'), label: $t('authentication.username'),

View File

@ -15,12 +15,15 @@ export function useAppConfig(
? window._VBEN_ADMIN_PRO_APP_CONF_ ? window._VBEN_ADMIN_PRO_APP_CONF_
: (env as VbenAdminProAppConfigRaw); : (env as VbenAdminProAppConfigRaw);
const { VITE_APP_CAPTCHA_ENABLE, VITE_APP_TENANT_ENABLE, VITE_GLOB_API_URL } = const {
config; VITE_GLOB_CAPTCHA_ENABLE,
VITE_GLOB_TENANT_ENABLE,
VITE_GLOB_API_URL,
} = config;
return { return {
apiURL: VITE_GLOB_API_URL, apiURL: VITE_GLOB_API_URL,
captchaEnable: VITE_APP_CAPTCHA_ENABLE, captchaEnable: VITE_GLOB_CAPTCHA_ENABLE === 'true',
tenantEnable: VITE_APP_TENANT_ENABLE, tenantEnable: VITE_GLOB_TENANT_ENABLE === 'true',
}; };
} }

View File

@ -9,8 +9,8 @@ declare module 'vue-router' {
export interface VbenAdminProAppConfigRaw { export interface VbenAdminProAppConfigRaw {
VITE_GLOB_API_URL: string; VITE_GLOB_API_URL: string;
VITE_APP_TENANT_ENABLE: boolean; VITE_GLOB_TENANT_ENABLE: string;
VITE_APP_CAPTCHA_ENABLE: boolean; VITE_GLOB_CAPTCHA_ENABLE: string;
} }
export interface ApplicationConfig { export interface ApplicationConfig {