Refactor MasterDetailMntC.vue for improved readability and consistency

This commit is contained in:
skytek_xinliang
2026-03-30 09:18:55 +08:00
parent 7591ecd062
commit 16b58fbf7a
66 changed files with 2071 additions and 777 deletions
+32 -8
View File
@@ -8,14 +8,27 @@
<div class="text-h5">{{ title }}</div>
<div class="text-caption text-medium-emphasis">{{ codeLabel }}</div>
<v-spacer />
<img alt="robot" class="robot-icon" height="32" src="@/assets/robot-svgrepo-com.svg" width="32" />
<img
alt="robot"
class="robot-icon"
height="32"
src="@/assets/robot-svgrepo-com.svg"
width="32"
/>
</v-card-title>
<v-card-text v-if="description" class="text-body-1 mt-4">
<p class="py-3">
{{ description }}
</p>
<v-alert v-if="backendMessage" class="mt-6" :color="color" density="compact" type="warning" variant="tonal">
<v-alert
v-if="backendMessage"
class="mt-6"
:color="color"
density="compact"
type="warning"
variant="tonal"
>
{{ backendMessage }}
</v-alert>
</v-card-text>
@@ -23,8 +36,16 @@
<v-card-actions class="mt-6">
<v-btn v-if="showBack" variant="text" @click="router.back()">返回上一頁</v-btn>
<v-spacer />
<v-btn v-if="showHome" color="primary" :to="{ name: 'home' }" variant="flat">回到首頁</v-btn>
<v-btn v-if="showLogin" class="ml-2" color="primary" :to="{ name: 'login' }" variant="outlined">
<v-btn v-if="showHome" color="primary" :to="{ name: 'home' }" variant="flat"
>回到首頁</v-btn
>
<v-btn
v-if="showLogin"
class="ml-2"
color="primary"
:to="{ name: 'login' }"
variant="outlined"
>
前往登入
</v-btn>
</v-card-actions>
@@ -56,7 +77,7 @@ const props = withDefaults(defineProps<Props>(), {
color: 'warning',
showHome: true,
showLogin: true,
showBack: true
showBack: true,
})
const route = useRoute()
@@ -76,7 +97,8 @@ const backendMessage = computed(() => {
<style scoped>
@keyframes breathe {
0%, 100% {
0%,
100% {
transform: scale(1);
opacity: 1;
}
@@ -87,7 +109,10 @@ const backendMessage = computed(() => {
}
@keyframes blink {
0%, 45%, 55%, 100% {
0%,
45%,
55%,
100% {
opacity: 1;
}
50% {
@@ -108,4 +133,3 @@ const backendMessage = computed(() => {
animation-delay: 0.1s;
}
</style>