ai修复背景图片不显示的问题
This commit is contained in:
parent
c8ca6d0bda
commit
0ea53bb30e
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "electron-exam",
|
||||
"version": "0.0.0",
|
||||
"version": "1.0.2",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "electron/main.js",
|
||||
@ -49,7 +49,7 @@
|
||||
},
|
||||
"build": {
|
||||
"appId": "com.example.electron-exam",
|
||||
"productName": "电子考试系统",
|
||||
"productName": "统计技能考试",
|
||||
"directories": {
|
||||
"output": "dist-electron"
|
||||
},
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="welcome-container" style="background-image: url('/src/assets/bg.jpeg'); background-size: cover; background-position: center;">
|
||||
<div class="welcome-container main-background">
|
||||
<el-container>
|
||||
<Header />
|
||||
|
||||
@ -311,10 +311,16 @@ const validateAdminPassword = (password) => {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.main-background {
|
||||
background-image: url('@/assets/bg.jpeg');
|
||||
background-size: 'cover';
|
||||
background-position: 'center';
|
||||
}
|
||||
|
||||
/* 适配移动设备 */
|
||||
@media (max-width: 640px) {
|
||||
.max-w-md {
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -240,14 +240,27 @@ const fetchLastExam = async () => {
|
||||
|
||||
const exitExam = async () => {
|
||||
try {
|
||||
if (!confirm('确定要退出考试吗?')) {
|
||||
return
|
||||
}
|
||||
userStore.state.isLoggedIn = false
|
||||
router.push('/')
|
||||
// 改用Element Plus的确认对话框
|
||||
ElMessageBox.confirm(
|
||||
'确定要退出考试吗?',
|
||||
'退出确认',
|
||||
{
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}
|
||||
).then(() => {
|
||||
// 完全清除store中的数据
|
||||
userStore.clearExaminee();
|
||||
// 重定向到欢迎页
|
||||
router.push('/');
|
||||
}).catch(() => {
|
||||
// 用户取消操作
|
||||
console.log('用户取消退出');
|
||||
});
|
||||
} catch (error) {
|
||||
console.error('退出考试失败:', error)
|
||||
ElMessage.error(`退出考试失败: ${error.message || '未知错误'}`)
|
||||
console.error('退出考试失败:', error);
|
||||
ElMessage.error(`退出考试失败: ${error.message || '未知错误'}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user