fix(aihr): align task labels and training duration
This commit is contained in:
@@ -98,6 +98,9 @@
|
||||
<uni-icons class="schedule-icon" type="compose" size="26" color="#2f6bff" />
|
||||
</view>
|
||||
<view class="schedule-copy">
|
||||
<text v-if="primaryAssignmentSourceLabel" class="schedule-source" :class="primaryAssignmentSourceClass">
|
||||
{{ primaryAssignmentSourceLabel }}
|
||||
</text>
|
||||
<text class="schedule-title">{{ primaryScheduleTitle }}</text>
|
||||
<view class="schedule-meta">
|
||||
<text class="meta-item"><uni-icons type="calendar" size="15" color="#8a8d93" /> {{ primaryScheduleTime }}</text>
|
||||
@@ -247,6 +250,21 @@ const primaryScheduleTitle = computed(() => {
|
||||
return '';
|
||||
});
|
||||
|
||||
const assignmentSourceLabel = (source?: string) => {
|
||||
if (source === 'daily') return '每日三题';
|
||||
if (source === 'retry') return '错题再练';
|
||||
if (source === 'camp') return '训练营';
|
||||
return '专项训练';
|
||||
};
|
||||
|
||||
const primaryAssignmentSourceLabel = computed(() =>
|
||||
primaryAssignment.value ? assignmentSourceLabel(primaryAssignment.value.source) : ''
|
||||
);
|
||||
|
||||
const primaryAssignmentSourceClass = computed(() =>
|
||||
primaryAssignment.value?.source || 'manual'
|
||||
);
|
||||
|
||||
const primaryScheduleDesc = computed(() => {
|
||||
const item = primaryAssignment.value;
|
||||
if (item) {
|
||||
@@ -861,6 +879,33 @@ onShow(() => {
|
||||
line-height: 1.25;
|
||||
}
|
||||
|
||||
.schedule-source {
|
||||
display: inline-flex;
|
||||
width: fit-content;
|
||||
padding: 3px 8px;
|
||||
border-radius: 999px;
|
||||
background: #edf3ff;
|
||||
color: #2f6bff;
|
||||
font-size: 12px;
|
||||
font-weight: 800;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.schedule-source.retry {
|
||||
background: #fff1f2;
|
||||
color: #d51b2b;
|
||||
}
|
||||
|
||||
.schedule-source.camp {
|
||||
background: #fff7eb;
|
||||
color: #b86b00;
|
||||
}
|
||||
|
||||
.schedule-source.daily {
|
||||
background: #eef8f2;
|
||||
color: #258652;
|
||||
}
|
||||
|
||||
.schedule-meta {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
Reference in New Issue
Block a user