带文件拖动上传的新版简历上传功能,独立文件操作组件,简历列表页和个人资料页有调用

This commit is contained in:
2026-05-26 19:20:34 +08:00
parent 4b16341f92
commit 8b6d424b2f
10 changed files with 582 additions and 87 deletions
@@ -58,6 +58,11 @@
&:hover {
background: darken(#F3F4F5, 3%);
}
// 拖拽悬停时背景色变化
&.is-dragover {
background: darken(#F3F4F5, 6%);
}
}
// 上传图标
@@ -0,0 +1,205 @@
@use '../variables' as *;
// ==================== 简历上传弹窗 ====================
.resume-upload-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: $overlay-bg;
z-index: 2200;
display: flex;
align-items: center;
justify-content: center;
}
.resume-upload-dialog {
width: 5.6rem;
background: $bg-white;
border-radius: 0.12rem;
padding: 0.32rem 0.36rem;
box-shadow: 0 0.04rem 0.2rem rgba(0, 0, 0, 0.15);
// 标题行
&__header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 0.08rem;
}
// 标题
&__title {
font-size: 0.2rem;
font-weight: 700;
color: $text-dark;
margin: 0;
}
// 关闭按钮
&__close {
width: 0.28rem;
height: 0.28rem;
border: none;
background: none;
cursor: pointer;
color: $text-middle;
display: flex;
align-items: center;
justify-content: center;
border-radius: 0.04rem;
transition: background 0.2s;
&:hover {
background: $bg-main;
}
}
// 副标题说明
&__desc {
font-size: 0.13rem;
color: $accent;
margin: 0 0 0.2rem 0;
}
// 拖拽上传区域
&__drop-zone {
border: 1px dashed $border-color;
border-radius: 0.1rem;
padding: 0.5rem 0.2rem;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
cursor: pointer;
transition: background 0.2s, border-color 0.2s;
background: $theme-color;
margin-bottom: 0.28rem;
&:hover {
border-color: $accent;
}
// 拖拽悬停状态 — 背景色加深
&.is-dragover {
background: darken(#F6FCFC, 4%);
border-color: $accent;
}
// 已选择文件状态
&.has-file {
padding: 0.3rem 0.2rem;
}
}
// 上传图标(加号圆圈)
&__drop-icon {
width: 0.52rem;
height: 0.52rem;
border-radius: 50%;
background: $bg-white;
display: flex;
align-items: center;
justify-content: center;
color: $accent;
margin-bottom: 0.14rem;
box-shadow: 0 0.02rem 0.06rem rgba(0, 0, 0, 0.06);
}
// 主提示文字
&__drop-text {
font-size: 0.14rem;
font-weight: 600;
color: $text-dark;
margin: 0 0 0.06rem 0;
}
// 格式提示
&__drop-hint {
font-size: 0.12rem;
color: $text-middle;
margin: 0;
}
// 已选文件信息
&__file-info {
display: flex;
align-items: center;
gap: 0.08rem;
}
&__file-icon {
font-size: 0.2rem;
}
&__file-name {
font-size: 0.14rem;
color: $text-dark;
font-weight: 500;
max-width: 3.6rem;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
&__file-remove {
border: none;
background: none;
color: $text-middle;
font-size: 0.14rem;
cursor: pointer;
padding: 0.02rem 0.04rem;
border-radius: 0.03rem;
transition: color 0.2s;
&:hover {
color: $danger;
}
}
// 底部按钮区域
&__footer {
display: flex;
align-items: center;
justify-content: space-between;
}
// 按钮通用
&__btn {
height: 0.42rem;
border-radius: 0.21rem;
font-size: 0.14rem;
font-weight: 500;
cursor: pointer;
transition: opacity 0.2s;
border: none;
// 取消按钮
&--cancel {
width: 1.4rem;
background: $bg-main;
color: $text-dark;
&:hover {
opacity: 0.8;
}
}
// 确认上传按钮(渐变色)
&--confirm {
width: 1.8rem;
background: $gradient-bg;
color: $bg-white;
&:hover:not(:disabled) {
opacity: 0.9;
}
&:disabled {
opacity: 0.4;
cursor: not-allowed;
}
}
}
}
+62
View File
@@ -35,6 +35,7 @@
@use './components/settings-delete-account-dialog.scss';
@use './components/profile-welcome-dialog.scss';
@use './components/settings-invite-dialog.scss';
@use './components/resume-upload-dialog.scss';
// 全局样式(优先级最高)
@use './auto.scss';
@@ -67,6 +68,67 @@
}
}
// ==================== Element Plus MessageBox rem 适配修正 ====================
.el-overlay {
// 确保遮罩层 z-index 足够高
z-index: 2100 !important;
}
.el-message-box {
width: 420px !important;
padding: 20px !important;
border-radius: 8px !important;
font-size: 14px !important;
&__header {
padding: 0 0 12px 0 !important;
}
&__title {
font-size: 16px !important;
line-height: 1.4 !important;
}
&__headerbtn {
top: 20px !important;
right: 20px !important;
width: 16px !important;
height: 16px !important;
font-size: 16px !important;
}
&__content {
padding: 12px 0 !important;
font-size: 14px !important;
}
&__message {
font-size: 14px !important;
line-height: 1.5 !important;
p {
font-size: 14px !important;
line-height: 1.5 !important;
}
}
&__status {
font-size: 20px !important;
}
&__btns {
padding: 8px 0 0 0 !important;
.el-button {
font-size: 14px !important;
padding: 8px 20px !important;
height: 32px !important;
border-radius: 4px !important;
min-width: 60px !important;
}
}
}
// ==================== Element Plus Loading rem 适配修正 + 品牌色覆盖 ====================
.el-loading-mask {
// 全屏 loading 遮罩层 z-index 确保最高