fix:打包报错

This commit is contained in:
小张 2025-08-22 17:11:28 +08:00
parent 1a11290c97
commit e18d5f610f
3 changed files with 81 additions and 37 deletions

View File

@ -91,12 +91,10 @@
<span>{{ t('header.management') }}</span> <span>{{ t('header.management') }}</span>
</div> </div>
<!-- 登录/注册按钮 --> <!-- 登录按钮 -->
<div v-if="!userStore.isLoggedIn" class="auth-buttons"> <div v-if="!userStore.isLoggedIn" class="auth-buttons">
<div class="auth-combined-btn"> <div class="auth-combined-btn">
<span class="auth-login" @click="showLoginModal">{{ t('header.login') }}</span> <span class="auth-login" @click="showLoginModal">{{ t('header.login') }}</span>
<span class="auth-divider">|</span>
<span class="auth-register" @click="showRegisterModal">{{ t('header.register') }}</span>
</div> </div>
</div> </div>
@ -285,16 +283,11 @@ const showLoginModal = () => {
loginModalVisible.value = true loginModalVisible.value = true
} }
// //
const showRegisterModal = () => { // const showRegisterModal = () => {
// // registerModalVisible.value = true
// registerNoticeVisible // registerNoticeVisible.value = false
// // }
//
registerModalVisible.value = true
registerNoticeVisible.value = false
}
// //
const handleAuthSuccess = () => { const handleAuthSuccess = () => {
@ -659,9 +652,9 @@ onUnmounted(() => {
background: #0088D1; background: #0088D1;
color: white; color: white;
border-radius: 5px; border-radius: 5px;
padding: 8px 10px; padding: 6px 24px;
font-size: 12px; font-size: 15px;
font-weight: 400; font-weight: 500;
cursor: pointer; cursor: pointer;
transition: all 0.2s; transition: all 0.2s;
} }
@ -670,16 +663,16 @@ onUnmounted(() => {
background: #40a9ff; background: #40a9ff;
} }
.auth-login, .auth-login {
.auth-register { padding: 0;
padding: 0 8px;
cursor: pointer; cursor: pointer;
transition: all 0.2s; transition: all 0.2s;
font-size: inherit;
font-weight: inherit;
} }
.auth-login:hover, .auth-login:hover {
.auth-register:hover { opacity: 0.9;
opacity: 0.8;
} }
.auth-divider { .auth-divider {

View File

@ -128,14 +128,14 @@ const navigateToTeacherDetail = (teacherId: number) => {
router.push(`/teacher/${teacherId}`) router.push(`/teacher/${teacherId}`)
} }
// //
const toggleCourseInfo = (teacherId: number) => { // const toggleCourseInfo = (teacherId: number) => {
if (expandedTeacherId.value === teacherId) { // if (expandedTeacherId.value === teacherId) {
expandedTeacherId.value = null // expandedTeacherId.value = null
} else { // } else {
expandedTeacherId.value = teacherId // expandedTeacherId.value = teacherId
} // }
} // }
// //
const showCourseInfo = (teacherId: number) => { const showCourseInfo = (teacherId: number) => {
@ -143,7 +143,7 @@ const showCourseInfo = (teacherId: number) => {
} }
// //
const hideCourseInfo = (teacherId: number) => { const hideCourseInfo = (_teacherId: number) => {
expandedTeacherId.value = null expandedTeacherId.value = null
} }

View File

@ -45,12 +45,25 @@ import { AlertCircleOutline } from '@vicons/ionicons5'
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background: #f8f9fa; background: #f8f9fa;
padding: 20px;
box-sizing: border-box;
}
.container {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
} }
.not-found-content { .not-found-content {
text-align: center; text-align: center;
max-width: 500px; max-width: 500px;
width: 100%;
padding: 40px; padding: 40px;
background: white;
border-radius: 12px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
} }
.error-image { .error-image {
@ -121,21 +134,59 @@ p {
} }
@media (max-width: 768px) { @media (max-width: 768px) {
.not-found-content { .not-found {
padding: 20px; padding: 15px;
} }
.not-found-content {
padding: 30px 20px;
max-width: 400px;
}
h1 { h1 {
font-size: 4rem; font-size: 4rem;
} }
h2 { h2 {
font-size: 1.5rem; font-size: 1.5rem;
} }
.actions { .actions {
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
gap: 12px;
}
.actions .n-button {
width: 100%;
max-width: 200px;
}
}
@media (max-width: 480px) {
.not-found {
padding: 10px;
}
.not-found-content {
padding: 20px 15px;
max-width: 350px;
}
h1 {
font-size: 3rem;
}
h2 {
font-size: 1.3rem;
}
p {
font-size: 1rem;
}
.suggestions {
padding: 20px;
} }
} }
</style> </style>