v2.0.2 — 每周打卡三卡片改为Tab切换
This commit is contained in:
@@ -441,6 +441,16 @@
|
||||
btn.classList.toggle('active', editing);
|
||||
};
|
||||
|
||||
/* 切换每周打卡 Tab */
|
||||
window.switchDailyTab = function(btn) {
|
||||
var tab = btn.dataset.tab;
|
||||
document.querySelectorAll('.daily-tab').forEach(function(t){ t.classList.remove('active'); });
|
||||
btn.classList.add('active');
|
||||
document.querySelectorAll('.daily-card').forEach(function(c){ c.classList.remove('active'); });
|
||||
var card = document.querySelector('.daily-card[data-card="' + tab + '"]');
|
||||
if (card) card.classList.add('active');
|
||||
};
|
||||
|
||||
/* ================================================================
|
||||
Load & Auto Save Checkin
|
||||
================================================================ */
|
||||
|
||||
Reference in New Issue
Block a user