feat: 样式调整
This commit is contained in:
@@ -44,6 +44,7 @@ const SHARED_WINDOW_OPTIONS = {
|
|||||||
class WindowService {
|
class WindowService {
|
||||||
private static _instance: WindowService;
|
private static _instance: WindowService;
|
||||||
private _logo = createLogo();
|
private _logo = createLogo();
|
||||||
|
private readonly isDev = !!MAIN_WINDOW_VITE_DEV_SERVER_URL
|
||||||
|
|
||||||
private _winStates: Record<WindowNames | string, WindowState> = {
|
private _winStates: Record<WindowNames | string, WindowState> = {
|
||||||
main: { instance: void 0, isHidden: false, onCreate: [], onClosed: [] },
|
main: { instance: void 0, isHidden: false, onCreate: [], onClosed: [] },
|
||||||
@@ -103,6 +104,8 @@ class WindowService {
|
|||||||
const isHiddenWin = this._isHiddenWin(name);
|
const isHiddenWin = this._isHiddenWin(name);
|
||||||
let window = this._createWinInstance(name, { ...size, ...moreOpts });
|
let window = this._createWinInstance(name, { ...size, ...moreOpts });
|
||||||
|
|
||||||
|
if (this.isDev) window.webContents.openDevTools()
|
||||||
|
|
||||||
!isHiddenWin && this
|
!isHiddenWin && this
|
||||||
._setupWinLifecycle(window, name)
|
._setupWinLifecycle(window, name)
|
||||||
._loadWindowTemplate(window, name)
|
._loadWindowTemplate(window, name)
|
||||||
|
|||||||
@@ -4,15 +4,14 @@
|
|||||||
<drag-region class="w-full" />
|
<drag-region class="w-full" />
|
||||||
</header-bar>
|
</header-bar>
|
||||||
|
|
||||||
<main class="box-border p-[8px] flex flex-auto items-center justify-center">
|
<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="w-[836px] h-full bg-white rounded-2xl p-[32px] flex flex-col">
|
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<img class="w-[48px] h-[48px]" src="@assets/images/login/blue_logo.png" />
|
<img class="w-[48px] h-[48px]" src="@assets/images/login/blue_logo.png" />
|
||||||
|
|
||||||
<span class="ml-auto text-[14px] text-gray-600">没有账号?</span>
|
<span class="ml-auto text-[14px] text-gray-600">没有账号?</span>
|
||||||
<button
|
<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>
|
||||||
|
|
||||||
<div class="flex flex-col items-center justify-center mb-[24px] box-border pt-[108px]">
|
<div class="flex flex-col items-center justify-center mb-[24px] box-border pt-[108px]">
|
||||||
@@ -25,7 +24,7 @@
|
|||||||
@keyup.enter="onSubmit">
|
@keyup.enter="onSubmit">
|
||||||
<el-form-item prop="username">
|
<el-form-item prop="username">
|
||||||
<div class="text-[14px] text-gray-600">账号</div>
|
<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>
|
<template #prefix>
|
||||||
<RiUser3Fill size="20px" color="#99A0AE" />
|
<RiUser3Fill size="20px" color="#99A0AE" />
|
||||||
</template>
|
</template>
|
||||||
@@ -33,7 +32,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="password">
|
<el-form-item prop="password">
|
||||||
<div class="text-[14px] text-gray-600">密码</div>
|
<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>
|
<template #prefix>
|
||||||
<RiKey2Fill size="20px" color="#99A0AE" />
|
<RiKey2Fill size="20px" color="#99A0AE" />
|
||||||
</template>
|
</template>
|
||||||
@@ -42,7 +41,7 @@
|
|||||||
|
|
||||||
<el-form-item prop="code">
|
<el-form-item prop="code">
|
||||||
<span class="text-[14px] text-gray-600">验证码</span>
|
<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>
|
<template #suffix>
|
||||||
<img class="w-[80px] h-[38px] cursor-pointer" :src="imgSrc" @click="getVerifyCode" />
|
<img class="w-[80px] h-[38px] cursor-pointer" :src="imgSrc" @click="getVerifyCode" />
|
||||||
</template>
|
</template>
|
||||||
@@ -55,7 +54,7 @@
|
|||||||
<input type="checkbox" v-model="showPwd" class="w-[14px] h-[14px] rounded-[4px]" />
|
<input type="checkbox" v-model="showPwd" class="w-[14px] h-[14px] rounded-[4px]" />
|
||||||
<span class="text-[14px] text-gray-600">记住密码</span>
|
<span class="text-[14px] text-gray-600">记住密码</span>
|
||||||
</div>
|
</div>
|
||||||
<span class="text-[14px] text-sky-600">忘记密码?</span>
|
<span class="text-[14px] text-sky-600 cursor-pointer">忘记密码?</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 登录按钮 -->
|
<!-- 登录按钮 -->
|
||||||
@@ -68,9 +67,9 @@
|
|||||||
<div class="flex items-center justify-center gap-2 mt-[24px]">
|
<div class="flex items-center justify-center gap-2 mt-[24px]">
|
||||||
<input type="checkbox" v-model="isAgree" class="w-[14px] h-[14px] rounded-[4px]" />
|
<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-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-gray-600">和</span>
|
||||||
<span class="text-[14px] text-sky-600">《隐私协议》</span>
|
<span class="text-[14px] text-sky-600 cursor-pointer">《隐私协议》</span>
|
||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
@@ -80,7 +79,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<img class="w-[570px]" src="@assets/images/login/logo.png" />
|
<img class="w-[540px]" src="@assets/images/login/logo.png" />
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -151,4 +150,12 @@ const onSubmit = async () => {
|
|||||||
background-position: 0 0;
|
background-position: 0 0;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:deep(.el-input__wrapper) {
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.el-form-item__error) {
|
||||||
|
padding-top: 8px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user