|
|
@@ -83,7 +83,8 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- search: ""
|
|
|
+ search: "",
|
|
|
+ timer: null
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -91,9 +92,12 @@ export default {
|
|
|
this.$emit("search", this.search);
|
|
|
},
|
|
|
inputFn(e) {
|
|
|
- setTimeout(() => {
|
|
|
+ if (this.timer) {
|
|
|
+ clearTimeout(this.timer);
|
|
|
+ }
|
|
|
+ this.timer = setTimeout(() => {
|
|
|
this.$emit("input", this.search);
|
|
|
- });
|
|
|
+ }, 1150);
|
|
|
},
|
|
|
inputEmptyFn(e) {
|
|
|
this.search = '';
|