v2.1.16 — 勤学打卡优化样式:默认隐藏×,编辑模式才显示

This commit is contained in:
mac
2026-07-27 09:17:24 +08:00
parent 8188364813
commit e2c97ca1fb
3 changed files with 33 additions and 9 deletions

View File

@@ -373,6 +373,14 @@
container.appendChild(div);
}
window.toggleStudyEdit = function() {
var panel = document.getElementById('panel-daily');
var btn = document.getElementById('study-edit-toggle');
if (!panel || !btn) return;
var editing = panel.classList.toggle('editing-study');
btn.classList.toggle('active', editing);
};
window.addStudyItem = function() {
var name = prompt('请输入新习惯名称:');
if (!name || !name.trim()) return;