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-12-15 13:46:49 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b2dfd9f5e2aadc46a4cb894ac57e078cc2484637
b2dfd9f5
1 parent
ca1b9749
feat(任务筛选): 添加弹窗显示状态监听并控制返回顶部按钮
添加对任务筛选组件弹窗显示状态的监听,当弹窗显示时隐藏返回顶部按钮,提升用户体验
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
src/components/teacher/TaskFilter.vue
src/views/teacher/studentPage.vue
src/components/teacher/TaskFilter.vue
View file @
b2dfd9f
...
...
@@ -55,11 +55,16 @@ const props = defineProps({
}
})
const emit = defineEmits(['change'])
const emit = defineEmits(['change'
, 'popup-visible-change'
])
// 状态
const showTaskPicker = ref(false)
const showSubtaskPicker = ref(false)
// 监听弹窗显示状态
watch([showTaskPicker, showSubtaskPicker], ([showTask, showSubtask]) => {
emit('popup-visible-change', showTask || showSubtask)
})
const taskList = ref([])
const subtaskList = ref([])
const selectedTaskId = ref('')
...
...
src/views/teacher/studentPage.vue
View file @
b2dfd9f
...
...
@@ -2,7 +2,7 @@
* @Author: hookehuyr hookehuyr@gmail.com
* @Date: 2025-06-19 17:12:19
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-12-15 13:
08:35
* @LastEditTime: 2025-12-15 13:
45:56
* @FilePath: /mlaj/src/views/teacher/studentPage.vue
* @Description: 学生详情页面
-->
...
...
@@ -100,6 +100,7 @@
:key="currentGroupId"
:group-id="currentGroupId"
@change="handleTaskFilterChange"
@popup-visible-change="handlePopupVisibleChange"
/>
</div>
<van-tabs v-model:active="activeTab" color="#4caf50" animated swipeable @change="handleTabChange">
...
...
@@ -321,7 +322,7 @@
</div>
</van-dialog>
<van-back-top right="5vw" bottom="25vh" offset="600" />
<van-back-top
v-if="showBackTop"
right="5vw" bottom="25vh" offset="600" />
</div>
</van-config-provider>
</template>
...
...
@@ -392,6 +393,12 @@ const handleTaskFilterChange = ({ task_id, subtask_id }) => {
getStatList()
}
// 返回顶部按钮显示控制
const showBackTop = ref(true)
const handlePopupVisibleChange = (isVisible) => {
showBackTop.value = !isVisible
}
// 当前选中的标签页
const activeTab = ref('homework')
...
...
Please
register
or
login
to post a comment