Skip to content

Commit

Permalink
格式化
Browse files Browse the repository at this point in the history
  • Loading branch information
putianyi889 committed Oct 15, 2024
1 parent dabaa80 commit 03c18f6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
10 changes: 5 additions & 5 deletions front_end/src/components/Login.vue
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<template>
<el-button v-if="store.login_status != LoginStatus.IsLogin" @click.stop="login_visible=true" class="fakemenuitem" text
size="small">
<el-button v-if="store.login_status != LoginStatus.IsLogin" @click.stop="login_visible = true" class="fakemenuitem"
text size="small">
{{ $t('menu.login') }}
</el-button>
<el-button v-if="store.login_status != LoginStatus.IsLogin" @click.stop="register_visible=true" style="margin-left: 0px;"
class="fakemenuitem" text size="small">
<el-button v-if="store.login_status != LoginStatus.IsLogin" @click.stop="register_visible = true"
style="margin-left: 0px;" class="fakemenuitem" text size="small">
{{ $t('menu.register') }}
</el-button>
<el-button v-if="store.login_status == LoginStatus.IsLogin" @click.stop="logout();" class="fakemenuitem" text
size="small">
{{ $t('menu.logout') }}
</el-button>
<LoginDialog v-model="login_visible" @login="login" @forget-password="login_visible=false;retrieve_visible=true;" />
<LoginDialog v-model="login_visible" @login="login" @forget-password="login_visible = false; retrieve_visible = true;" />
<RegisterDialog v-model="register_visible" @login="login" />
<RetrieveDialog v-model="retrieve_visible" @login="login" />
</template>
Expand Down
2 changes: 1 addition & 1 deletion front_end/src/components/dialogs/LoginDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const submitForm = async (formEl: FormInstance | undefined) => {
}
}
}).catch(function (error) {
})
})
}
Expand Down
5 changes: 3 additions & 2 deletions front_end/src/components/dialogs/RetrieveDialog.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<template>
<el-dialog v-model="visible" :title="$t('login.retrieveTitle')" width="400px" align-center draggable
:lock-scroll="false" @close='resetForm(ruleFormRef)'>
:lock-scroll="false" @close='resetForm(ruleFormRef)'>
<el-form :model="retrieveForm" ref="ruleFormRef" status-icon>
<!-- 邮箱 -->
<email-form-item v-model="retrieveForm.email" ref="emailFormRef" check-collision="false"></email-form-item>
<!-- 邮箱验证码 -->
<email-code-block v-model="retrieveForm.emailCode" :email="retrieveForm.email" type="register" :email-state="email_state" ref="emailCodeFormRef"/>
<email-code-block v-model="retrieveForm.emailCode" :email="retrieveForm.email" type="register"
:email-state="email_state" ref="emailCodeFormRef" />
<!-- 密码 -->
<password-confirm-block v-model="retrieveForm.password" ref="passwordFormRef" />
<!-- 确认 -->
Expand Down
4 changes: 2 additions & 2 deletions front_end/src/components/formItems/passwordConfirmBlock.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ const confirmPassword = ref('');
const passwordFormRef = ref<typeof ElFormItem>();
const confirmPasswordFormRef = ref<typeof ElFormItem>();
const validateState = computed(()=>{return confirmPasswordFormRef.value!.validateState});
defineExpose({validateState})
const validateState = computed(() => { return confirmPasswordFormRef.value!.validateState });
defineExpose({ validateState })
const passwordHandler = (value: string) => {
if (value.length == 0) validateError(passwordFormRef, t.t('msg.passwordRequired'))
Expand Down

0 comments on commit 03c18f6

Please sign in to comment.