|
@@ -1,5 +1,5 @@
|
|
<template>
|
|
<template>
|
|
- <div class="login">
|
|
|
|
|
|
+ <div class="login" style="background-color: #DDA0DD;">
|
|
<a-form
|
|
<a-form
|
|
:model="formState"
|
|
:model="formState"
|
|
:rules="rules"
|
|
:rules="rules"
|
|
@@ -11,6 +11,9 @@
|
|
<a-form-item label="Password" prop="password">
|
|
<a-form-item label="Password" prop="password">
|
|
<a-input-password v-model:value="formState.password" placeholder="Enter your password" />
|
|
<a-input-password v-model:value="formState.password" placeholder="Enter your password" />
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
|
+ <a-form-item>
|
|
|
|
+ <a-checkbox v-model:checked="formState.rememberMe">Remember me</a-checkbox>
|
|
|
|
+ </a-form-item>
|
|
<a-button type="primary" html-type="submit">Submit</a-button>
|
|
<a-button type="primary" html-type="submit">Submit</a-button>
|
|
</a-form>
|
|
</a-form>
|
|
</div>
|
|
</div>
|
|
@@ -23,7 +26,8 @@ const router = useRouter();
|
|
|
|
|
|
const formState = reactive({
|
|
const formState = reactive({
|
|
username: '',
|
|
username: '',
|
|
- password: ''
|
|
|
|
|
|
+ password: '',
|
|
|
|
+ rememberMe: false // Add rememberMe field
|
|
});
|
|
});
|
|
|
|
|
|
const rules = {
|
|
const rules = {
|
|
@@ -38,5 +42,9 @@ const rules = {
|
|
const handleSubmit = () => {
|
|
const handleSubmit = () => {
|
|
// Handle form submission logic here
|
|
// Handle form submission logic here
|
|
console.log('Form submitted:', formState);
|
|
console.log('Form submitted:', formState);
|
|
|
|
+ // Add remember me logic here
|
|
|
|
+ if (formState.rememberMe) {
|
|
|
|
+ localStorage.setItem('rememberMe', JSON.stringify(formState));
|
|
|
|
+ }
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|