feat(V0.2): 列表拖动修复 + 打卡项组内拖动排序
- 任务列表/看板拖动: 激活后用非 passive touchmove preventDefault 拦截浏览器滚动接管, 修复列表长按抬起后 pointercancel 导致无法真正拖动 - 打卡: 列表按周期分组展示(每天/每周/每月/每年), 长按拖动组内排序(上下落点指示), 新增 POST /checkin/habits/reorder 重写 sortOrder; 新建项排到末尾 - 打卡卡片加 touch-action/user-select 防长按误触; 拖动结束 350ms 内抑制点击余波
This commit is contained in:
@@ -663,6 +663,21 @@ body.me-safe-top .app-safe-top { height: 0; }
|
||||
.habit-link { font-size: 12px; color: var(--color-primary); cursor: pointer; }
|
||||
.habit-link.danger { color: var(--color-danger); }
|
||||
|
||||
/* 打卡项分组 + 长按拖动排序 (组内) */
|
||||
.habit-view { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
|
||||
.habit-view input, .habit-view textarea { -webkit-user-select: text; user-select: text; }
|
||||
.habit-group-title {
|
||||
display: flex; align-items: center; gap: 7px; padding: 10px 2px 4px;
|
||||
font-size: 12px; color: var(--color-muted); font-weight: 600;
|
||||
}
|
||||
.habit-group-title::before { content: ""; width: 3px; height: 12px; border-radius: 2px; background: var(--color-primary); }
|
||||
.habit-group-title .cnt { color: #b8bcc4; font-weight: 400; }
|
||||
.habit-card { touch-action: pan-y; }
|
||||
.habit-card.dragging { opacity: 0.55; outline: 2px dashed var(--color-primary); outline-offset: 1px; }
|
||||
.habit-card.dragover { outline: 2px solid var(--color-primary); outline-offset: 1px; }
|
||||
.habit-card.dragover.after { border-bottom: 3px solid var(--color-primary); }
|
||||
.habit-card.dragover.before { border-top: 3px solid var(--color-primary); }
|
||||
|
||||
/* ----- 日历视图 ----- */
|
||||
.calendar-view { padding: 0 12px 20px; }
|
||||
.cal-month-bar { display: flex; align-items: center; gap: 10px; padding: 8px 2px; }
|
||||
|
||||
Reference in New Issue
Block a user