|
|
@@ -1,68 +1,70 @@
|
|
|
<template>
|
|
|
- <div class="view-account">
|
|
|
- <div class="view-account-header"></div>
|
|
|
- <div class="view-account-container">
|
|
|
- <div class="view-account-top">
|
|
|
- <div class="view-account-top-logo">
|
|
|
- <img src="~@/assets/images/logo.png" alt="" />
|
|
|
+ <div class="go-login">
|
|
|
+ <div class="login-account">
|
|
|
+ <div class="login-account-header"></div>
|
|
|
+ <div class="login-account-container">
|
|
|
+ <div class="login-account-top">
|
|
|
+ <div class="login-account-top-logo">
|
|
|
+ <img src="~@/assets/images/logo.png" alt="" />
|
|
|
+ </div>
|
|
|
+ <div class="login-account-top-desc">
|
|
|
+ GoView
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div class="view-account-top-desc">
|
|
|
- GoView
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="view-account-form">
|
|
|
- <n-form
|
|
|
- ref="formRef"
|
|
|
- label-placement="left"
|
|
|
- size="large"
|
|
|
- :model="formInline"
|
|
|
- :rules="rules"
|
|
|
- >
|
|
|
- <n-form-item path="username">
|
|
|
- <n-input
|
|
|
- v-model:value="formInline.username"
|
|
|
- placeholder="请输入用户名"
|
|
|
- >
|
|
|
- <template #prefix>
|
|
|
- <n-icon size="18" color="#808695">
|
|
|
- <PersonOutline />
|
|
|
- </n-icon>
|
|
|
- </template>
|
|
|
- </n-input>
|
|
|
- </n-form-item>
|
|
|
- <n-form-item path="password">
|
|
|
- <n-input
|
|
|
- v-model:value="formInline.password"
|
|
|
- type="password"
|
|
|
- show-password-toggle
|
|
|
- placeholder="请输入密码"
|
|
|
- >
|
|
|
- <template #prefix>
|
|
|
- <n-icon size="18" color="#808695">
|
|
|
- <LockClosedOutline />
|
|
|
- </n-icon>
|
|
|
- </template>
|
|
|
- </n-input>
|
|
|
- </n-form-item>
|
|
|
- <n-form-item class="default-color">
|
|
|
- <div class="flex justify-between">
|
|
|
- <div class="flex-initial">
|
|
|
- <n-checkbox v-model:checked="autoLogin">自动登录</n-checkbox>
|
|
|
+ <div class="login-account-form">
|
|
|
+ <n-form
|
|
|
+ ref="formRef"
|
|
|
+ label-placement="left"
|
|
|
+ size="large"
|
|
|
+ :model="formInline"
|
|
|
+ :rules="rules"
|
|
|
+ >
|
|
|
+ <n-form-item path="username">
|
|
|
+ <n-input
|
|
|
+ v-model:value="formInline.username"
|
|
|
+ placeholder="请输入用户名"
|
|
|
+ >
|
|
|
+ <template #prefix>
|
|
|
+ <n-icon size="18" color="#808695">
|
|
|
+ <PersonOutline />
|
|
|
+ </n-icon>
|
|
|
+ </template>
|
|
|
+ </n-input>
|
|
|
+ </n-form-item>
|
|
|
+ <n-form-item path="password">
|
|
|
+ <n-input
|
|
|
+ v-model:value="formInline.password"
|
|
|
+ type="password"
|
|
|
+ show-password-toggle
|
|
|
+ placeholder="请输入密码"
|
|
|
+ >
|
|
|
+ <template #prefix>
|
|
|
+ <n-icon size="18" color="#808695">
|
|
|
+ <LockClosedOutline />
|
|
|
+ </n-icon>
|
|
|
+ </template>
|
|
|
+ </n-input>
|
|
|
+ </n-form-item>
|
|
|
+ <n-form-item class="default-color">
|
|
|
+ <div class="flex justify-between">
|
|
|
+ <div class="flex-initial">
|
|
|
+ <n-checkbox v-model:checked="autoLogin">自动登录</n-checkbox>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- </n-form-item>
|
|
|
- <n-form-item>
|
|
|
- <n-button
|
|
|
- type="primary"
|
|
|
- @click="handleSubmit"
|
|
|
- size="large"
|
|
|
- :loading="loading"
|
|
|
- block
|
|
|
- >
|
|
|
- 登录
|
|
|
- </n-button>
|
|
|
- </n-form-item>
|
|
|
- </n-form>
|
|
|
+ </n-form-item>
|
|
|
+ <n-form-item>
|
|
|
+ <n-button
|
|
|
+ type="primary"
|
|
|
+ @click="handleSubmit"
|
|
|
+ size="large"
|
|
|
+ :loading="loading"
|
|
|
+ block
|
|
|
+ >
|
|
|
+ 登录
|
|
|
+ </n-button>
|
|
|
+ </n-form-item>
|
|
|
+ </n-form>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -72,10 +74,7 @@
|
|
|
import { reactive, ref } from 'vue'
|
|
|
import { useRoute, useRouter } from 'vue-router'
|
|
|
import { useMessage } from 'naive-ui'
|
|
|
-import {
|
|
|
- PersonOutline,
|
|
|
- LockClosedOutline,
|
|
|
-} from '@vicons/ionicons5'
|
|
|
+import { PersonOutline, LockClosedOutline } from '@vicons/ionicons5'
|
|
|
|
|
|
interface FormState {
|
|
|
username: string
|
|
|
@@ -117,46 +116,48 @@ const handleSubmit = (e: Event) => {
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
-.view-account {
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- height: 100vh;
|
|
|
- overflow: auto;
|
|
|
- background-image: linear-gradient(to top, #fff1eb 0%, #ace0f9 100%);
|
|
|
-
|
|
|
- &-container {
|
|
|
- flex: 1;
|
|
|
- padding: 32px 0;
|
|
|
- width: 384px;
|
|
|
- margin: 0 auto;
|
|
|
- margin-top: 100px;
|
|
|
- }
|
|
|
+@include go(login) {
|
|
|
+ .login-account {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ height: 100vh;
|
|
|
+ overflow: auto;
|
|
|
+ background-image: linear-gradient(to top, #fff1eb 0%, #ace0f9 100%);
|
|
|
+
|
|
|
+ &-container {
|
|
|
+ flex: 1;
|
|
|
+ padding: 32px 0;
|
|
|
+ width: 384px;
|
|
|
+ margin: 0 auto;
|
|
|
+ margin-top: 100px;
|
|
|
+ }
|
|
|
|
|
|
- &-top {
|
|
|
- padding: 32px 0;
|
|
|
- text-align: center;
|
|
|
+ &-top {
|
|
|
+ padding: 32px 0;
|
|
|
+ text-align: center;
|
|
|
|
|
|
- &-desc {
|
|
|
- font-size: 14px;
|
|
|
- color: #808695;
|
|
|
+ &-desc {
|
|
|
+ font-size: 14px;
|
|
|
+ color: #808695;
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
-
|
|
|
- &-other {
|
|
|
- width: 100%;
|
|
|
- }
|
|
|
|
|
|
- .default-color {
|
|
|
- color: #515a6e;
|
|
|
+ &-other {
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
|
|
|
- .ant-checkbox-wrapper {
|
|
|
+ .default-color {
|
|
|
color: #515a6e;
|
|
|
+
|
|
|
+ .ant-checkbox-wrapper {
|
|
|
+ color: #515a6e;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@media (min-width: 768px) {
|
|
|
- .view-account {
|
|
|
+ .login-account {
|
|
|
background-repeat: no-repeat;
|
|
|
background-position: 50%;
|
|
|
background-size: 100%;
|