处理列表监听问题

master
许宏杰 10 months ago
parent 36d301f548
commit 54e216e387

@ -107,21 +107,43 @@ export default {
}, },
components: { introduceTitle, ColorCell }, components: { introduceTitle, ColorCell },
watch: { watch: {
queryParamsXiaoqu: { "queryParamsXiaoqu.color"(newValue, oldValue) {
handler(newValue, oldValue) { this.handleChange();
console.log(newValue); },
this.reset(); "queryParamsXiaoqu.isd"(newValue, oldValue) {
this.queryParams = { ...this.queryParams, ...newValue }; this.handleChange();
this.disabled = false; },
this.load(); "queryParamsXiaoqu.isj"(newValue, oldValue) {
this.handleChange();
},
"queryParamsXiaoqu.isk"(newValue, oldValue) {
this.handleChange();
},
"queryParamsXiaoqu.isx"(newValue, oldValue) {
this.handleChange();
}, },
deep: true, // Deeply watch all nested properties "queryParamsXiaoqu.parentid"(newValue, oldValue) {
immediate: true, this.handleChange();
}, },
"queryParamsXiaoqu.type"(newValue, oldValue) {
this.handleChange();
},
},
created() {
this.handleChange();
}, },
methods: { methods: {
handleChange(newValue) {
this.reset();
delete this.queryParamsXiaoqu.buildingid;
delete this.queryParamsXiaoqu.deptId;
this.queryParams = { ...this.queryParams, ...this.queryParamsXiaoqu };
this.disabled = false;
this.load();
},
reset() { reset() {
(this.disabled = true), (this.total = 0); this.disabled = true;
this.total = 0;
this.list = []; this.list = [];
this.queryParams = { this.queryParams = {
pageNum: 1, pageNum: 1,

Loading…
Cancel
Save