feat: 样式调整

This commit is contained in:
duanshuwen
2025-12-20 00:02:47 +08:00
parent e6fa999137
commit 062a389c3a
2 changed files with 21 additions and 11 deletions

View File

@@ -44,6 +44,7 @@ const SHARED_WINDOW_OPTIONS = {
class WindowService {
private static _instance: WindowService;
private _logo = createLogo();
private readonly isDev = !!MAIN_WINDOW_VITE_DEV_SERVER_URL
private _winStates: Record<WindowNames | string, WindowState> = {
main: { instance: void 0, isHidden: false, onCreate: [], onClosed: [] },
@@ -103,6 +104,8 @@ class WindowService {
const isHiddenWin = this._isHiddenWin(name);
let window = this._createWinInstance(name, { ...size, ...moreOpts });
if (this.isDev) window.webContents.openDevTools()
!isHiddenWin && this
._setupWinLifecycle(window, name)
._loadWindowTemplate(window, name)

View File

@@ -4,15 +4,14 @@
<drag-region class="w-full" />
</header-bar>
<main class="box-border p-[8px] flex flex-auto items-center justify-center">
<div class="w-[836px] h-full bg-white rounded-2xl p-[32px] flex flex-col">
<main class="box-border p-[8px] flex-auto flex ">
<div class="w-[836px] box-border bg-white rounded-2xl p-[32px] flex flex-col">
<div class="flex items-center">
<img class="w-[48px] h-[48px]" src="@assets/images/login/blue_logo.png" />
<span class="ml-auto text-[14px] text-gray-600">没有账号</span>
<button
class="bg-sky-50 rounded-[8px] text-[14px] text-sky-600 px-[12px] py-[6px] focus-visible:outline-none">注册</button>
class="bg-sky-50 rounded-[8px] text-[14px] text-sky-600 px-[12px] py-[6px] focus-visible:outline-none cursor-pointer">注册</button>
</div>
<div class="flex flex-col items-center justify-center mb-[24px] box-border pt-[108px]">
@@ -25,7 +24,7 @@
@keyup.enter="onSubmit">
<el-form-item prop="username">
<div class="text-[14px] text-gray-600">账号</div>
<el-input v-model.trim="form.username" placeholder="请输入账号" clearable autocomplete="off">
<el-input class="h-[40px]" v-model.trim="form.username" placeholder="请输入账号" clearable autocomplete="off">
<template #prefix>
<RiUser3Fill size="20px" color="#99A0AE" />
</template>
@@ -33,7 +32,7 @@
</el-form-item>
<el-form-item prop="password">
<div class="text-[14px] text-gray-600">密码</div>
<el-input v-model.trim="form.password" placeholder="请输入密码" clearable autocomplete="off">
<el-input class="h-[40px]" v-model.trim="form.password" placeholder="请输入密码" clearable autocomplete="off">
<template #prefix>
<RiKey2Fill size="20px" color="#99A0AE" />
</template>
@@ -42,7 +41,7 @@
<el-form-item prop="code">
<span class="text-[14px] text-gray-600">验证码</span>
<el-input v-model.trim="form.code" placeholder="请输入验证码" clearable autocomplete="off">
<el-input v-model.trim="form.code" placeholder="请输入验证码" autocomplete="off">
<template #suffix>
<img class="w-[80px] h-[38px] cursor-pointer" :src="imgSrc" @click="getVerifyCode" />
</template>
@@ -55,7 +54,7 @@
<input type="checkbox" v-model="showPwd" class="w-[14px] h-[14px] rounded-[4px]" />
<span class="text-[14px] text-gray-600">记住密码</span>
</div>
<span class="text-[14px] text-sky-600">忘记密码</span>
<span class="text-[14px] text-sky-600 cursor-pointer">忘记密码</span>
</div>
<!-- 登录按钮 -->
@@ -68,9 +67,9 @@
<div class="flex items-center justify-center gap-2 mt-[24px]">
<input type="checkbox" v-model="isAgree" class="w-[14px] h-[14px] rounded-[4px]" />
<span class="text-[14px] text-gray-600">我已同意</span>
<span class="text-[14px] text-sky-600">使用协议</span>
<span class="text-[14px] text-sky-600 cursor-pointer">使用协议</span>
<span class="text-[14px] text-gray-600"></span>
<span class="text-[14px] text-sky-600">隐私协议</span>
<span class="text-[14px] text-sky-600 cursor-pointer">隐私协议</span>
</div>
</el-form>
@@ -80,7 +79,7 @@
</div>
</div>
<img class="w-[570px]" src="@assets/images/login/logo.png" />
<img class="w-[540px]" src="@assets/images/login/logo.png" />
</main>
</div>
@@ -151,4 +150,12 @@ const onSubmit = async () => {
background-position: 0 0;
background-repeat: no-repeat;
}
:deep(.el-input__wrapper) {
border-radius: 10px;
}
:deep(.el-form-item__error) {
padding-top: 8px;
}
</style>