Skip to content

Commit 245094c

Browse files
committed
fix: [Bug] username repeat get request
[Bug] username repeat get request. use debounced function.
1 parent 5f9846b commit 245094c

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/components/Sign/up/index.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
<script>
7373
import SignInput from "@/components/Sign/input/index.vue";
7474
import SignRadio from "@/components/Sign/radio/index.vue";
75+
import { _debounce } from "@/plugins/utils";
7576
// @ is an alias to /src
7677
7778
export default {
@@ -120,7 +121,6 @@ export default {
120121
} else if (!this.boundFormat) {
121122
this.checkText = "邮箱格式错误";
122123
} else this.checkText = "";
123-
console.log(this.usernameFormat, this.isNameRepeat);
124124
},
125125
},
126126
},
@@ -147,7 +147,7 @@ export default {
147147
},
148148
mounted() {},
149149
methods: {
150-
handleIAccount: function (s) {
150+
handleIAccount: _debounce(function (s) {
151151
this.$conf.getHost().then((h) => {
152152
this.$conf
153153
.checkUsername({
@@ -165,7 +165,7 @@ export default {
165165
});
166166
});
167167
});
168-
},
168+
}, 400),
169169
handleIPassword: function (s) {
170170
this.signUp.password = s;
171171
},

tailwind.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,8 @@ module.exports = {
219219
60: '60deg',
220220
90: '90deg',
221221
180: '180deg',
222+
223+
45: '45deg',
222224
},
223225
invert: {
224226
0: '0',

0 commit comments

Comments
 (0)