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