feat(V0.2): 拖动跟手浮层 —— 半透明副本随指针, 原位虚线占位
Docker Build and Push / build-image (push) Successful in 1m5s

- useRowDrag/useHabitDrag 暴露 ghostRef, 拖动激活与移动时直接改
  transform (绕过 React 重渲染, 保证跟手流畅)
- 打卡浮层带颜色点 + 名称; 任务列表浮层带任务名 + 实时目标列名
- 原位卡片降为低透明度虚线占位, 落点指示不变
This commit is contained in:
jif2.zhang
2026-10-25 01:42:29 +08:00
parent 215263bf2f
commit 83cc218c5e
5 changed files with 54 additions and 5 deletions
+14 -1
View File
@@ -694,11 +694,24 @@ body.me-safe-top .app-safe-top { height: 0; }
.mv-view { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.mv-view input, .mv-view textarea { -webkit-user-select: text; user-select: text; }
.mv-card { touch-action: pan-y; }
.mv-card.dragging { opacity: .55; outline: 2px dashed var(--color-primary); outline-offset: 1px; }
.mv-card.dragging { opacity: .3; outline: 2px dashed var(--color-primary); outline-offset: 1px; }
.mv-card.dragover { outline: 2px solid var(--color-primary); outline-offset: 1px; }
.mv-card.dragover.after { border-bottom: 3px solid var(--color-primary); }
.mv-card.dragover.before { border-top: 3px solid var(--color-primary); }
/* 拖动跟手浮层: 半透明副本随指针, 原位保留占位 */
.drag-ghost {
position: fixed; left: 0; top: 0; z-index: 1000;
display: flex; align-items: center; gap: 6px;
background: rgba(255,255,255,.94); color: var(--color-text);
font-size: 13px; font-weight: 600; white-space: nowrap;
padding: 8px 12px; border-radius: 8px;
box-shadow: 0 10px 24px rgba(15,23,42,.28);
pointer-events: none; will-change: transform;
}
.drag-ghost i { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.drag-ghost b { color: var(--color-primary); font-weight: 600; margin-left: 4px; }
/* ----- 日历视图 ----- */
.calendar-view { padding: 0 12px 20px; }
.cal-month-bar { display: flex; align-items: center; gap: 10px; padding: 8px 2px; }