|
@@ -51,7 +51,7 @@
|
|
|
/>
|
|
|
</FormItem>
|
|
|
|
|
|
- <!-- <ARow class="enter-x">
|
|
|
+ <ARow class="enter-x">
|
|
|
<ACol :span="12">
|
|
|
<FormItem>
|
|
|
<Checkbox v-model:checked="rememberMe" size="small">
|
|
@@ -61,18 +61,23 @@
|
|
|
</ACol>
|
|
|
<ACol :span="12">
|
|
|
<FormItem :style="{ 'text-align': 'right' }">
|
|
|
- <Button type="link" size="small" @click="setLoginState(LoginStateEnum.RESET_PASSWORD)">
|
|
|
- {{ t('sys.login.forgetPassword') }}
|
|
|
+ <Button type="link" size="small" @click="setLoginState(LoginStateEnum.REGISTER)">
|
|
|
+ {{ t('sys.login.registerButton') }}
|
|
|
</Button>
|
|
|
</FormItem>
|
|
|
</ACol>
|
|
|
- </ARow> -->
|
|
|
+ </ARow>
|
|
|
|
|
|
<FormItem class="enter-x">
|
|
|
<Button type="primary" size="large" block @click="handleLogin" :loading="loading">
|
|
|
{{ t('sys.login.loginButton') }}
|
|
|
</Button>
|
|
|
- <!-- <Button size="large" class="mt-4 enter-x" block @click="handleRegister">
|
|
|
+ <!-- <Button
|
|
|
+ size="large"
|
|
|
+ class="mt-4 enter-x"
|
|
|
+ block
|
|
|
+ @click="setLoginState(LoginStateEnum.REGISTER)"
|
|
|
+ >
|
|
|
{{ t('sys.login.registerButton') }}
|
|
|
</Button> -->
|
|
|
</FormItem>
|
|
@@ -109,7 +114,7 @@
|
|
|
<script lang="ts" setup>
|
|
|
import { reactive, ref, unref, computed } from 'vue';
|
|
|
// Divider,Row, Col,Checkbox
|
|
|
- import { Form, Input, Button } from 'ant-design-vue';
|
|
|
+ import { Form, Input, Button, Row, Col, Checkbox } from 'ant-design-vue';
|
|
|
// import {
|
|
|
// GithubFilled,
|
|
|
// WechatFilled,
|
|
@@ -131,8 +136,8 @@
|
|
|
|
|
|
//import { onKeyStroke } from '@vueuse/core';
|
|
|
|
|
|
- // const ACol = Col;
|
|
|
- // const ARow = Row;
|
|
|
+ const ACol = Col;
|
|
|
+ const ARow = Row;
|
|
|
const FormItem = Form.Item;
|
|
|
const InputPassword = Input.Password;
|
|
|
const { t } = useI18n();
|
|
@@ -141,12 +146,12 @@
|
|
|
const { prefixCls } = useDesign('login');
|
|
|
const userStore = useUserStore();
|
|
|
// setLoginState
|
|
|
- const { getLoginState } = useLoginState();
|
|
|
+ const { getLoginState, setLoginState } = useLoginState();
|
|
|
const { getFormRules } = useFormRules();
|
|
|
|
|
|
const formRef = ref();
|
|
|
const loading = ref(false);
|
|
|
- // const rememberMe = ref(false);
|
|
|
+ const rememberMe = ref(false);
|
|
|
const isDragValidate = ref(false);
|
|
|
|
|
|
const formData = reactive({
|