待跟进和下面五个状态按钮是互斥关系
This commit is contained in:
parent
cbea1576a8
commit
55b415b6de
|
|
@ -323,10 +323,20 @@ const isFilterSelected = (filterKey) => selectedFilters.value.includes(filterKey
|
|||
const toggleFilter = (filterKey) => {
|
||||
if (!filterKey) return;
|
||||
const exists = selectedFilters.value.includes(filterKey);
|
||||
|
||||
if (exists) {
|
||||
selectedFilters.value = selectedFilters.value.filter(item => item !== filterKey);
|
||||
return;
|
||||
}
|
||||
|
||||
const isTodayFilter = filterKey === TODAY_FOLLOW_FILTER;
|
||||
if (isTodayFilter) {
|
||||
selectedFilters.value = [TODAY_FOLLOW_FILTER];
|
||||
} else {
|
||||
selectedFilters.value = [...selectedFilters.value, filterKey];
|
||||
selectedFilters.value = [
|
||||
...selectedFilters.value.filter(item => item !== TODAY_FOLLOW_FILTER),
|
||||
filterKey
|
||||
];
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user