This commit is contained in:
AN
2025-06-22 16:10:08 +08:00
12 changed files with 71 additions and 23 deletions

View File

@ -39,8 +39,8 @@ const activeModule = computed(() => moduleMap[props.module || 'pwd-login']);
</script>
<template>
<div class="relative size-full flex flex-wrap overflow-hidden">
<div class="hidden h-full w-50% bg-primary-100 lg:block dark:bg-primary-800">
<div class="relative min-h-screen w-full flex flex-wrap">
<div class="hidden h-screen w-50% bg-primary-100 lg:block dark:bg-primary-800">
<div class="size-full flex-center">
<img class="w-60% sm:w-80%" :src="loginBackground" />
</div>
@ -49,8 +49,8 @@ const activeModule = computed(() => moduleMap[props.module || 'pwd-login']);
<div class="mx-auto max-w-464px w-full">
<header class="flex-y-center justify-between">
<div class="flex-y-center gap-16px">
<SystemLogo class="text-42px text-primary" />
<h3 class="text-32px text-primary font-500">{{ $t('system.title') }}</h3>
<SystemLogo class="text-30px text-primary sm:text-42px" />
<h3 class="text-24px text-primary font-500 sm:text-32px">{{ $t('system.title') }}</h3>
</div>
<div class="flex-y-center">
<ThemeSchemaSwitch
@ -64,6 +64,7 @@ const activeModule = computed(() => moduleMap[props.module || 'pwd-login']);
:lang="appStore.locale"
:lang-options="appStore.localeOptions"
:show-tooltip="false"
class="text-20px lt-sm:text-18px"
@change-lang="appStore.changeLocale"
/>
</div>

View File

@ -122,7 +122,7 @@ async function handleSocialLogin(type: Api.System.SocialSource) {
<template>
<div>
<div class="mb-12px text-30px text-black font-500 dark:text-white">登录到您的账户</div>
<div class="mb-12px text-24px text-black font-500 sm:text-30px dark:text-white">登录到您的账户</div>
<div class="pb-24px text-18px text-#858585">欢迎回来请输入您的账户信息</div>
<NForm
ref="formRef"

View File

@ -104,7 +104,7 @@ handleFetchCaptchaCode();
<template>
<div>
<div class="mb-12px text-30px text-black font-500 dark:text-white">注册新账户</div>
<div class="mb-12px text-24px text-black font-500 sm:text-30px dark:text-white">注册新账户</div>
<div class="pb-24px text-18px text-#858585">欢迎注册请输入您的账户信息</div>
<NForm
ref="formRef"

View File

@ -46,7 +46,9 @@ async function handleSubmit() {
<template>
<div>
<div class="mb-12px text-30px text-black font-500 dark:text-white">{{ $t('page.login.resetPwd.title') }}</div>
<div class="mb-12px text-24px text-black font-500 sm:text-30px dark:text-white">
{{ $t('page.login.resetPwd.title') }}
</div>
<div class="pb-24px text-18px text-#858585">请输入您的手机号我们将发送验证码到您的手机</div>
<NForm ref="formRef" :model="model" :rules="rules" size="large" :show-label="false" @keyup.enter="handleSubmit">
<NFormItem path="phone">

View File

@ -116,7 +116,7 @@ const primaryColor = `--primary-color: ${r} ${g} ${b}`;
<!-- From Uiverse.io by SchawnnahJ -->
<div class="loader"></div>
</div>
<h2 class="text-30px text-primary-400 font-500">{{ $t('system.title') }}</h2>
<h2 class="text-30px text-primary-400 font-500">{{ msg }}</h2>
</div>
</template>

View File

@ -46,14 +46,14 @@ function createDefaultProfileModel(): ProfileModel {
function createDefaultPasswordModel(): PasswordModel {
return {
password: '',
oldPassword: '',
confirmPassword: '',
newPassword: ''
};
}
type ProfileRuleKey = Extract<keyof ProfileModel, 'nickName' | 'email' | 'phonenumber' | 'sex'>;
type PasswordRuleKey = Extract<keyof PasswordModel, 'password' | 'confirmPassword' | 'newPassword'>;
type PasswordRuleKey = Extract<keyof PasswordModel, 'oldPassword' | 'newPassword' | 'confirmPassword'>;
const profileRules: Record<ProfileRuleKey, App.Global.FormRule> = {
nickName: createRequiredRule('昵称不能为空'),
@ -63,7 +63,7 @@ const profileRules: Record<ProfileRuleKey, App.Global.FormRule> = {
};
const passwordRules: Record<PasswordRuleKey, App.Global.FormRule> = {
password: createRequiredRule('密码不能为空'),
oldPassword: createRequiredRule('密码不能为空'),
confirmPassword: createRequiredRule('确认密码不能为空'),
newPassword: createRequiredRule('新密码不能为空')
};
@ -90,7 +90,8 @@ async function updatePassword() {
return;
}
startBtnLoading();
const { error } = await fetchUpdateUserPassword(passwordModel);
const { oldPassword, newPassword } = passwordModel;
const { error } = await fetchUpdateUserPassword({ oldPassword, newPassword });
if (!error) {
window.$message?.success('密码修改成功');
// 清空表单
@ -183,9 +184,9 @@ async function updatePassword() {
label-width="100px"
class="mt-16px max-w-520px"
>
<NFormItem label="旧密码" path="password">
<NFormItem label="旧密码" path="oldPassword">
<NInput
v-model:value="passwordModel.password"
v-model:value="passwordModel.oldPassword"
type="password"
placeholder="请输入旧密码"
show-password-on="click"

View File

@ -344,22 +344,58 @@ const columns: NaiveUI.TableColumn<Api.Tool.GenTableColumn>[] = [
placeholder="请选择生成模板"
/>
</NFormItemGi>
<NFormItemGi span="24 s:12" label="生成包路径" path="packageName">
<NFormItemGi span="24 s:12" path="packageName">
<template #label>
<div class="flex-center">
<FormTip content="生成在哪个java包下例如 com.ruoyi.system" />
<span class="pl-3px">生成包路径</span>
</div>
</template>
<NInput v-model:value="genTableInfo.info.packageName" />
</NFormItemGi>
<NFormItemGi span="24 s:12" label="生成模块名" path="moduleName">
<NFormItemGi span="24 s:12" path="moduleName">
<template #label>
<div class="flex-center">
<FormTip content="可理解为子系统名,例如 system" />
<span class="pl-3px">生成模块名</span>
</div>
</template>
<NInput v-model:value="genTableInfo.info.moduleName" />
</NFormItemGi>
<NFormItemGi span="24 s:12" label="生成业务名" path="businessName">
<template #label>
<div class="flex-center">
<FormTip content="可理解为功能英文名,例如 user" />
<span class="pl-3px">生成业务名</span>
</div>
</template>
<NInput v-model:value="genTableInfo.info.businessName" />
</NFormItemGi>
<NFormItemGi span="24 s:12" label="生成功能名" path="functionName">
<template #label>
<div class="flex-center">
<FormTip content="用作类描述,例如 用户" />
<span class="pl-3px">生成功能名</span>
</div>
</template>
<NInput v-model:value="genTableInfo.info.functionName" />
</NFormItemGi>
<NFormItemGi span="24 s:12" label="上级菜单" path="parentMenuId">
<template #label>
<div class="flex-center">
<FormTip content="分配到指定菜单下,例如 系统管理" />
<span class="pl-3px">上级菜单</span>
</div>
</template>
<MenuTreeSelect v-model:value="genTableInfo.info.parentMenuId" :data-name="rowData?.dataName" />
</NFormItemGi>
<NFormItemGi span="24 s:12" label="生成代码方式" path="genType">
<template #label>
<div class="flex-center">
<FormTip content="默认为zip压缩包下载也可以自定义生成路径" />
<span class="pl-3px">生成代码方式</span>
</div>
</template>
<NRadioGroup v-model:value="genTableInfo.info.genType">
<NSpace :span="16">
<NRadio