Unverified Commit d310d2f4 by Sendya

fix: login enter submit, username user-select:none

parent 10dc997e
...@@ -551,6 +551,11 @@ ...@@ -551,6 +551,11 @@
} }
// 外置的样式控制 // 外置的样式控制
.user-dropdown-menu {
span {
user-select: none;
}
}
.user-dropdown-menu-wrapper.ant-dropdown-menu { .user-dropdown-menu-wrapper.ant-dropdown-menu {
padding: 4px 0; padding: 4px 0;
......
...@@ -73,7 +73,3 @@ ...@@ -73,7 +73,3 @@
} }
} }
</script> </script>
<style scoped>
</style>
\ No newline at end of file
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
class="user-layout-login" class="user-layout-login"
ref="formLogin" ref="formLogin"
:form="form" :form="form"
@submit="handleSubmit"
> >
<a-tabs <a-tabs
:activeKey="customActiveKey" :activeKey="customActiveKey"
...@@ -82,10 +83,10 @@ ...@@ -82,10 +83,10 @@
<a-button <a-button
size="large" size="large"
type="primary" type="primary"
htmlType="submit"
class="login-button" class="login-button"
:loading="state.loginBtn" :loading="state.loginBtn"
:disabled="state.loginBtn" :disabled="state.loginBtn"
@click.stop.prevent="handleSubmit"
>确定</a-button> >确定</a-button>
</a-form-item> </a-form-item>
...@@ -169,7 +170,8 @@ export default { ...@@ -169,7 +170,8 @@ export default {
this.customActiveKey = key this.customActiveKey = key
// this.form.resetFields() // this.form.resetFields()
}, },
handleSubmit() { handleSubmit(e) {
e.preventDefault()
const { const {
form: { validateFields }, form: { validateFields },
state, state,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment