Skip to content

Commit

Permalink
修复fReset
Browse files Browse the repository at this point in the history
  • Loading branch information
Zing22 committed Dec 12, 2021
1 parent 8964ec3 commit 65b80ac
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions miniprogram/pages/genealogy/genealogy.js
Original file line number Diff line number Diff line change
Expand Up @@ -424,10 +424,13 @@ Page({
// mask滑动事件catch
voidMove: function () {},
// toggle filters
fToggle: function () {
fToggle: function (status) {
// 这里只管显示和隐藏,类似取消键的功能
if (status === undefined) {
status = !this.data.filters_show
}
this.setData({
filters_show: !this.data.filters_show
filters_show: status
});
},
// 点击main filter,切换sub的
Expand Down Expand Up @@ -589,15 +592,15 @@ Page({
}
return res.length ? _.and(res) : {};
},
fComfirm: function () {
fComfirm: function (e, toggleStatus) {
if (!this.data.filters_legal) {
return false;
}

this.lockBtn();

this.reloadCats();
this.fToggle();
this.fToggle(toggleStatus);
},
fReset: function () {
// 重置所有分类
Expand All @@ -620,7 +623,8 @@ Page({
filters: filters,
filters_legal: fLegal
}, () => {
that.fComfirm();
// 确认过滤器并关闭展板
that.fComfirm(null, false);
});
},
// 发起文字搜索
Expand Down

0 comments on commit 65b80ac

Please sign in to comment.