Skip to content

Commit 3f0e0a2

Browse files
committed
修复清空过滤职位条件时重复发送请求的问题
1 parent 57fa1a4 commit 3f0e0a2

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

src/components/header.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ export default {
108108
align-items: center;
109109
padding: 10px 100px;
110110
position: relative;
111-
z-index: 100000;
111+
z-index: 1000;
112112
&.fixedToTop {
113113
position: fixed;
114114

src/views/Jobs.vue

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,7 @@ export default {
9494
9595
const dataRequest = this.fetchList();
9696
97-
this.loadingIns = this.$loading({
98-
// position: { top: 60 },
99-
background: "#fff"
100-
});
97+
this.loadingIns = this.$loading();
10198
Promise.all([jobConfigRequest, dataRequest]).then(() => {
10299
this.loadingIns.close();
103100
});
@@ -141,8 +138,12 @@ export default {
141138
},
142139
methods: {
143140
clearFilter() {
144-
this.job_category_id_list = [];
145-
this.location_code_list = [];
141+
if (this.job_category_id_list.length) {
142+
this.job_category_id_list = [];
143+
}
144+
if (this.location_code_list.length) {
145+
this.location_code_list = [];
146+
}
146147
},
147148
fetchList() {
148149
this.loading = true;

0 commit comments

Comments
 (0)