Browse Source

fix: 修改登录多重submit

deploy-dev
xuziqiang 4 months ago
parent
commit
dc0f2a164b
  1. 12
      lib/saas/view/system/login.vue

12
lib/saas/view/system/login.vue

@ -131,6 +131,8 @@
}); });
validator(null, value?.code) validator(null, value?.code)
.then(() => { .then(() => {
console.log('登录');
// //
rememberFunc(data); rememberFunc(data);
loading.value = true; loading.value = true;
@ -257,13 +259,13 @@
created() { created() {
const _this = this; const _this = this;
window.sessionStorage.clear(); window.sessionStorage.clear();
document.onkeydown = function (e) { // document.onkeydown = function (e) {
const key = window.event === undefined ? e.keyCode : window.event.keyCode; // const key = window.event === undefined ? e.keyCode : window.event.keyCode;
key === 13 ? _this.submit() : ''; // key === 13 ? _this.submit() : '';
}; // };
}, },
beforeUnmount() { beforeUnmount() {
document.onkeydown = function (e) {}; // document.onkeydown = function (e) {};
}, },
mounted() { mounted() {

Loading…
Cancel
Save