fix: 登录按钮与输入框使用同一列宽
This commit is contained in:
@@ -152,29 +152,27 @@ async function finishNqi() {
|
|||||||
<h1>{{ purpose === "pool" ? "添加账号" : "DecomEval" }}</h1>
|
<h1>{{ purpose === "pool" ? "添加账号" : "DecomEval" }}</h1>
|
||||||
</div>
|
</div>
|
||||||
<form class="login-form" @submit.prevent="submitLogin">
|
<form class="login-form" @submit.prevent="submitLogin">
|
||||||
<n-alert v-if="route.query.notice === 'already'" type="info" style="margin-bottom: 12px">这个数据库已经安装过,请使用原来的管理员账号登录。</n-alert>
|
<n-alert v-if="route.query.notice === 'already'" type="info">这个数据库已经安装过,请使用原来的管理员账号登录。</n-alert>
|
||||||
<n-alert v-if="errorText" type="error" style="margin-bottom: 12px">{{ errorText }}</n-alert>
|
<n-alert v-if="errorText" type="error">{{ errorText }}</n-alert>
|
||||||
<div class="form-grid">
|
|
||||||
<label>账号</label>
|
<label>账号</label>
|
||||||
<n-input v-model:value="username" @keyup.enter="submitLogin" />
|
<div class="login-field"><n-input v-model:value="username" @keyup.enter="submitLogin" /></div>
|
||||||
<label>密码</label>
|
<label>密码</label>
|
||||||
<n-input v-model:value="password" type="password" @keyup.enter="submitLogin" />
|
<div class="login-field"><n-input v-model:value="password" type="password" @keyup.enter="submitLogin" /></div>
|
||||||
<template v-if="mode === 'nqi' && captchaUrl">
|
<template v-if="mode === 'nqi' && captchaUrl">
|
||||||
<label>验证码</label>
|
<label>验证码</label>
|
||||||
<div>
|
<div class="login-field">
|
||||||
<n-input v-model:value="captcha" @keyup.enter="submitLogin" />
|
<n-input v-model:value="captcha" @keyup.enter="submitLogin" />
|
||||||
<img class="captcha" :src="captchaUrl" alt="验证码" @click="refreshCaptcha" />
|
<img class="captcha" :src="captchaUrl" alt="验证码" @click="refreshCaptcha" />
|
||||||
</div>
|
</div>
|
||||||
<template v-if="smsRequired">
|
<template v-if="smsRequired">
|
||||||
<label>短信验证码</label>
|
<label>短信验证码</label>
|
||||||
<n-input v-model:value="smsCode" @keyup.enter="submitLogin" />
|
<div class="login-field"><n-input v-model:value="smsCode" @keyup.enter="submitLogin" /></div>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
<div class="login-submit">
|
||||||
<div v-if="mode === 'nqi' && captchaUrl" class="login-secondary">
|
<n-button v-if="mode === 'nqi' && captchaUrl" attr-type="button" :loading="busy" @click="sendSms">发送短信验证码</n-button>
|
||||||
<n-button attr-type="button" :loading="busy" @click="sendSms">发送短信验证码</n-button>
|
|
||||||
</div>
|
|
||||||
<n-button class="gate-submit" type="primary" attr-type="submit" :loading="busy">{{ mode === "local" || captchaUrl ? "登录" : "继续" }}</n-button>
|
<n-button class="gate-submit" type="primary" attr-type="submit" :loading="busy">{{ mode === "local" || captchaUrl ? "登录" : "继续" }}</n-button>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+13
-9
@@ -108,21 +108,25 @@ button, input, select { font: inherit; }
|
|||||||
}
|
}
|
||||||
.login-form {
|
.login-form {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 112px minmax(0, 1fr);
|
grid-template-columns: 72px minmax(0, 1fr);
|
||||||
column-gap: 12px;
|
gap: 12px 16px;
|
||||||
row-gap: 8px;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
.login-form .form-grid { display: contents; }
|
.login-form .n-alert { grid-column: 1 / -1; }
|
||||||
.login-form .n-alert,
|
.login-field { min-width: 0; }
|
||||||
.login-form .login-secondary { grid-column: 1 / -1; }
|
.login-field .n-input { width: 100%; }
|
||||||
.login-form .gate-submit.n-button {
|
.login-submit {
|
||||||
grid-column: 2;
|
grid-column: 2;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 12px;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
.login-submit .n-button {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
margin-top: 16px;
|
|
||||||
justify-self: stretch;
|
|
||||||
}
|
}
|
||||||
|
.login-submit .gate-submit.n-button { margin-top: 4px; }
|
||||||
.gate-brand {
|
.gate-brand {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 14px;
|
gap: 14px;
|
||||||
|
|||||||
Reference in New Issue
Block a user