Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
mlaj
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2025-10-14 11:08:22 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
72ab56f952ea43d032c87e3f5831b4110fc5e6b7
72ab56f9
1 parent
6fdd7dc3
feat(ui): 为签到类型添加灰色状态显示
在多个组件中为签到类型的图标和文本添加灰色状态显示,通过is_gray字段控制
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
17 deletions
src/components/ui/CheckInDialog.vue
src/views/HomePage.vue
src/views/courses/CourseDetailPage.vue
src/views/profile/StudyCoursePage.vue
src/views/study/StudyDetailPage.vue
src/components/ui/CheckInDialog.vue
View file @
72ab56f
...
...
@@ -37,10 +37,10 @@
'bg-green-500 text-white': selectedCheckIn?.id === checkInType.id
}"
>
<van-icon v-if="checkInType.task_type === 'checkin'" name="edit" size="1.5rem" />
<van-icon v-if="checkInType.task_type === 'upload'" name="tosend" size="1.5rem" />
<van-icon v-if="checkInType.task_type === 'checkin'" name="edit" size="1.5rem"
:color="checkInType.is_gray ? 'gray' : ''"
/>
<van-icon v-if="checkInType.task_type === 'upload'" name="tosend" size="1.5rem"
:color="checkInType.is_gray ? 'gray' : ''"
/>
</div>
<span
class="text-xs
">{{ checkInType.name }}</span>
<span
:class="['text-xs', checkInType.is_gray ? 'text-gray-500' : '']
">{{ checkInType.name }}</span>
</button>
</div>
...
...
src/views/HomePage.vue
View file @
72ab56f
<!--
* @Date: 2025-03-20 19:55:21
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-10-1
3 11:44:36
* @LastEditTime: 2025-10-1
4 11:07:30
* @FilePath: /mlaj/src/views/HomePage.vue
* @Description: 美乐爱觉教育首页组件
*
...
...
@@ -101,15 +101,15 @@
@click="handleCheckInSelect(checkInType)"
>
<div class="w-12 h-12 rounded-full flex items-center justify-center mb-1 transition-colors
bg-gray-100
text-gray-500
"
bg-gray-100"
:class="{
'bg-green-500 text-white': selectedCheckIn?.id === checkInType.id
}"
>
<van-icon v-if="checkInType.task_type === 'checkin'" name="edit" size="1.5rem" />
<van-icon v-if="checkInType.task_type === 'upload'" name="tosend" size="1.5rem" />
<van-icon v-if="checkInType.task_type === 'checkin'" name="edit" size="1.5rem"
:color="checkInType.is_gray ? 'gray' : ''"
/>
<van-icon v-if="checkInType.task_type === 'upload'" name="tosend" size="1.5rem"
:color="checkInType.is_gray ? 'gray' : ''"
/>
</div>
<span
class="text-xs
">{{ checkInType.name }}</span>
<span
:class="['text-xs', checkInType.is_gray ? 'text-gray-500' : '']
">{{ checkInType.name }}</span>
</button>
</div>
...
...
src/views/courses/CourseDetailPage.vue
View file @
72ab56f
...
...
@@ -302,10 +302,10 @@
'bg-green-500 text-white': selectedCheckIn?.id === checkInType.id
}"
>
<van-icon v-if="checkInType.task_type === 'checkin'" name="edit" size="1.5rem" />
<van-icon v-if="checkInType.task_type === 'upload'" name="tosend" size="1.5rem" />
<van-icon v-if="checkInType.task_type === 'checkin'" name="edit" size="1.5rem"
:color="checkInType.is_gray ? 'gray' : ''"
/>
<van-icon v-if="checkInType.task_type === 'upload'" name="tosend" size="1.5rem"
:color="checkInType.is_gray ? 'gray' : ''"
/>
</div>
<span
class="text-xs">{{ checkInType.titl
e }}</span>
<span
:class="['text-xs', checkInType.is_gray ? 'text-gray-500' : '']">{{ checkInType.nam
e }}</span>
</button>
</div>
...
...
src/views/profile/StudyCoursePage.vue
View file @
72ab56f
...
...
@@ -162,10 +162,10 @@
'bg-green-500 text-white': selectedCheckIn?.id === checkInType.id
}"
>
<van-icon v-if="checkInType.task_type === 'checkin'" name="edit" size="1.5rem" />
<van-icon v-if="checkInType.task_type === 'upload'" name="tosend" size="1.5rem" />
<van-icon v-if="checkInType.task_type === 'checkin'" name="edit" size="1.5rem"
:color="checkInType.is_gray ? 'gray' : ''"
/>
<van-icon v-if="checkInType.task_type === 'upload'" name="tosend" size="1.5rem"
:color="checkInType.is_gray ? 'gray' : ''"
/>
</div>
<span
class="text-xs">{{ checkInType.titl
e }}</span>
<span
:class="['text-xs', checkInType.is_gray ? 'text-gray-500' : '']">{{ checkInType.nam
e }}</span>
</button>
</div>
...
...
src/views/study/StudyDetailPage.vue
View file @
72ab56f
...
...
@@ -387,10 +387,10 @@
'bg-green-500 text-white': selectedCheckIn?.id === checkInType.id
}"
>
<van-icon v-if="checkInType.task_type === 'checkin'" name="edit" size="1.5rem" />
<van-icon v-if="checkInType.task_type === 'upload'" name="tosend" size="1.5rem" />
<van-icon v-if="checkInType.task_type === 'checkin'" name="edit" size="1.5rem"
:color="checkInType.is_gray ? 'gray' : ''"
/>
<van-icon v-if="checkInType.task_type === 'upload'" name="tosend" size="1.5rem"
:color="checkInType.is_gray ? 'gray' : ''"
/>
</div>
<span
class="text-xs">{{ checkInType.titl
e }}</span>
<span
:class="['text-xs', checkInType.is_gray ? 'text-gray-500' : '']">{{ checkInType.nam
e }}</span>
</button>
</div>
...
...
Please
register
or
login
to post a comment