feat: 季度/月度标签再次点击取消选中
- setPlanQuarter/setPlanMonth增加toggle逻辑 - setFinQuarter/setFinMonth增加toggle逻辑 - 再次点击已选中的季度/月份回到overview总视图 - 版本号 v1.2.0.19
This commit is contained in:
@@ -334,8 +334,16 @@ window.setFinView = (view) => {
|
||||
state.finView = view;
|
||||
renderFinance();
|
||||
};
|
||||
window.setFinQuarter = (q) => { state.finQuarter = q; state.finView = 'quarterly'; renderFinance(); };
|
||||
window.setFinMonth = (month) => { state.finMonth = month; state.finView = 'monthly'; renderFinance(); };
|
||||
window.setFinQuarter = (q) => {
|
||||
if (state.finView === 'quarterly' && state.finQuarter === q) { state.finView = 'overview'; }
|
||||
else { state.finQuarter = q; state.finView = 'quarterly'; }
|
||||
renderFinance();
|
||||
};
|
||||
window.setFinMonth = (month) => {
|
||||
if (state.finView === 'monthly' && state.finMonth === month) { state.finView = 'overview'; }
|
||||
else { state.finMonth = month; state.finView = 'monthly'; }
|
||||
renderFinance();
|
||||
};
|
||||
window.setFinYear = (year) => { state.finYear = parseInt(year); renderFinance(); };
|
||||
window.switchFinFilter = (filter) => {
|
||||
state.finFilter = filter;
|
||||
@@ -353,8 +361,16 @@ window.setPlanView = (view) => {
|
||||
state.planView = view;
|
||||
renderPlan();
|
||||
};
|
||||
window.setPlanQuarter = (q) => { state.planQuarter = q; state.planView = 'quarterly'; renderPlan(); };
|
||||
window.setPlanMonth = (month) => { state.planMonth = month; state.planView = 'monthly'; renderPlan(); };
|
||||
window.setPlanQuarter = (q) => {
|
||||
if (state.planView === 'quarterly' && state.planQuarter === q) { state.planView = 'overview'; }
|
||||
else { state.planQuarter = q; state.planView = 'quarterly'; }
|
||||
renderPlan();
|
||||
};
|
||||
window.setPlanMonth = (month) => {
|
||||
if (state.planView === 'monthly' && state.planMonth === month) { state.planView = 'overview'; }
|
||||
else { state.planMonth = month; state.planView = 'monthly'; }
|
||||
renderPlan();
|
||||
};
|
||||
window.setPlanYear = (year) => { state.planYear = parseInt(year); renderPlan(); };
|
||||
window.setPlanStatusFilter = (filter) => { state.planStatusFilter = filter; renderPlan(); };
|
||||
window.switchPlanFilter = (filter) => {
|
||||
|
||||
Reference in New Issue
Block a user