我的任务列表加分支标签: 主分支(蓝)/协助分支(紫) — parent_task_id判血缘
This commit is contained in:
@ -20,7 +20,10 @@
|
||||
</view>
|
||||
<view v-for="task in filtered" :key="task.id" class="card" @tap="goDetail(task)">
|
||||
<view class="card-row">
|
||||
<view style="display:flex;align-items:center;gap:6px;min-width:0;">
|
||||
<text :class="['tag-badge', task.parent_task_id ? 'tag-sub' : 'tag-main']">{{ task.parent_task_id ? '协助分支' : '主分支' }}</text>
|
||||
<text class="card-name">{{ task.task_name }}</text>
|
||||
</view>
|
||||
<text :class="['card-status', statusColor(task.status)]">{{ statusLabel(task.status) }}</text>
|
||||
</view>
|
||||
<view class="card-meta">
|
||||
@ -135,7 +138,10 @@ export default {
|
||||
.card { background: #fff; border-radius: 12px; padding: 14px; margin-bottom: 10px;
|
||||
box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
|
||||
.card-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
|
||||
.card-name { font-size: 15px; font-weight: 700; color: #1f2937; }
|
||||
.card-name { font-size: 15px; font-weight: 700; color: #1f2937; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.tag-badge { display: inline-block; padding: 2rpx 12rpx; font-size: 20rpx; border-radius: 6rpx; font-weight: bold; flex-shrink: 0; }
|
||||
.tag-main { background-color: #dbeafe; color: #1e40af; }
|
||||
.tag-sub { background-color: #f3e8ff; color: #6b21a8; }
|
||||
.card-status { font-size: 11px; padding: 2px 10px; border-radius: 20px; font-weight: 600; }
|
||||
.s-yellow { background: #fef3c7; color: #b45309; }
|
||||
.s-blue { background: #dbeafe; color: #1d4ed8; }
|
||||
|
||||
Reference in New Issue
Block a user