mirror of
https://github.com/ZeroCatDev/Classworks.git
synced 2025-12-07 13:03:59 +00:00
feat: 优化移动端视图,添加空科目显示为可点击的芯片组件
This commit is contained in:
parent
8d9b9a3f32
commit
ca3d7c9dbf
@ -128,7 +128,23 @@
|
||||
|
||||
<!-- 单独显示空科目 -->
|
||||
<div class="empty-subjects mt-4">
|
||||
<template v-if="emptySubjectDisplay === 'button'">
|
||||
<!-- 移动端优化视图 -->
|
||||
<div v-if="isMobile" class="d-flex flex-wrap justify-center">
|
||||
<v-chip
|
||||
v-for="subject in unusedSubjects"
|
||||
:key="subject.name"
|
||||
:disabled="isEditingDisabled"
|
||||
class="ma-1"
|
||||
color="primary"
|
||||
variant="tonal"
|
||||
@click="$emit('open-dialog', subject.name)"
|
||||
>
|
||||
<v-icon start size="small">mdi-plus</v-icon>
|
||||
{{ subject.name }}
|
||||
</v-chip>
|
||||
</div>
|
||||
|
||||
<template v-else-if="emptySubjectDisplay === 'button'">
|
||||
<v-btn-group divided variant="tonal">
|
||||
<v-btn
|
||||
v-for="subject in unusedSubjects"
|
||||
@ -194,6 +210,11 @@ export default {
|
||||
},
|
||||
},
|
||||
emits: ["open-dialog", "open-attendance"],
|
||||
computed: {
|
||||
isMobile() {
|
||||
return this.$vuetify.display.mobile;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
splitPoint(content) {
|
||||
return content.split("\n").filter((text) => text.trim());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user