新版交互调整

This commit is contained in:
2026-06-24 19:03:41 +08:00
parent 065553f53e
commit 8143a89dab
37 changed files with 4929 additions and 4409 deletions
@@ -1,95 +1,50 @@
@use '../variables' as *;
@use 'sass:color';
// ==================== 个人资料编辑抽屉 ====================
// ==================== 个人资料内联编辑组件 ====================
// 遮罩层
.profile-drawer-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: $overlay-bg;
z-index: 2000;
}
// 抽屉主体 — 固定在右侧,占满屏幕高度
// 重置 font-size + line-height 避免 html font-size:100px 导致行高撑大间距
.profile-drawer {
position: fixed;
top: 0;
right: 0;
width: 6.2rem;
height: var(--app-height, 100vh);
background: $bg-white;
z-index: 2001;
box-shadow: -0.04rem 0 0.2rem rgba(0, 0, 0, 0.1);
display: flex;
flex-direction: column;
// 内联编辑容器 — 直接嵌入页面卡片中
.profile-edit-inline {
font-size: 14px;
line-height: 1.5;
background: #F7F7F7;
border-radius: 0.12rem;
padding: 0.1rem;
box-sizing: border-box;
// 顶部栏
&__header {
display: flex;
align-items: center;
gap: 0.1rem;
padding: 0.16rem 0.2rem;
border-bottom: 1px solid $border-color;
flex-shrink: 0;
}
&__close-btn {
background: none;
border: none;
padding: 0.04rem;
cursor: pointer;
color: $text-dark;
display: flex;
align-items: center;
border-radius: 0.04rem;
transition: all 0.2s;
&:hover {
color: $accent;
background: $theme-color;
}
}
&__close-icon {
width: 0.16rem;
height: 0.16rem;
}
&__title {
font-size: 0.16rem;
font-weight: 700;
color: $text-dark;
margin: 0;
}
// 表单内容区 — 中间可滚动
// 表单内容区
&__body {
flex: 1;
overflow-y: auto;
padding: 0.2rem 0.2rem 3rem;
padding: 0.1rem 0;
}
// 地区选择器下拉面板提升层级,避免被其他元素遮挡
.region-selector__panel {
z-index: 2100;
}
// 基本信息横排字段容器(姓名、电话、微信、邮箱、城市一行排列,允许换行)
&__fields-row {
display: flex;
flex-wrap: wrap;
gap: 0.16rem;
}
// 横排中的单个字段项
&__field-item {
flex: 1;
min-width: 1.6rem;
}
// 作品集链接整行字段
&__field-full {
margin-top: 0.16rem;
}
// 单个字段
&__field {
margin-bottom: 0.18rem;
margin-bottom: 0.02rem;
}
&__label {
font-size: 0.13rem;
display: block;
font-size: 0.12rem;
font-weight: 600;
color: $text-dark;
color: $text-middle;
margin-bottom: 0.06rem;
}
@@ -101,12 +56,12 @@
&__input {
width: 100%;
box-sizing: border-box;
padding: 0.1rem 0.14rem;
padding: 0.08rem 0.12rem;
font-size: 0.13rem;
color: $text-dark;
background: $bg-main;
border: 1px solid transparent;
border-radius: 0.06rem;
background: $bg-white;
border: 1px solid $border-color;
border-radius: 0.04rem;
outline: none;
transition: all 0.2s;
@@ -120,21 +75,22 @@
}
}
// 多行文本输入框(经历描述等)
// 多行文本输入框
&__textarea {
width: 100%;
box-sizing: border-box;
padding: 0.1rem 0.14rem;
padding: 0.08rem 0.12rem;
font-size: 0.13rem;
color: $text-dark;
background: $bg-main;
border: 1px solid transparent;
border-radius: 0.06rem;
background: $bg-white;
border: 1px solid $border-color;
border-radius: 0.04rem;
outline: none;
transition: all 0.2s;
resize: vertical;
font-family: inherit;
line-height: 1.6;
padding-right: 0.3rem;
&::placeholder {
color: $text-light;
@@ -144,33 +100,26 @@
border-color: $accent;
background: $bg-white;
}
// 矮版 textarea — 用于分段描述,右侧留出删除按钮空间
&--short {
padding-right: 0.36rem;
}
}
// ==================== 描述段落编辑 ====================
// 单条描述段落容器 — textarea + 右侧删除按钮
// 描述段落容器
&__desc-item {
position: relative;
margin-bottom: 0.08rem;
}
// 描述段落内的删除按钮(叉号)
// 描述删除按钮
&__desc-remove {
position: absolute;
right: 0.18rem;
top: 0.08rem;
right: 0.08rem;
top: 0.06rem;
background: none;
border: none;
padding: 0.02rem;
padding: 0.02rem 0.04rem;
cursor: pointer;
color: $text-light;
display: flex;
align-items: center;
font-size: 0.14rem;
line-height: 1;
border-radius: 0.03rem;
transition: all 0.2s;
@@ -179,91 +128,7 @@
}
}
&__desc-remove-icon {
width: 0.12rem;
height: 0.12rem;
}
// 小号新增按钮 — 用于"新增一段描述"
&__add-btn--small {
font-size: 0.11rem;
padding: 0.04rem 0.12rem;
margin-top: 0.04rem;
margin-bottom: 0;
}
// 空状态占位
&__empty {
text-align: center;
padding: 0.6rem 0;
}
&__empty-text {
font-size: 0.14rem;
color: $text-light;
}
// ==================== 教育经历模块 ====================
// 单条教育经历卡片
&__edu-card {
padding-bottom: 0.2rem;
margin-bottom: 0.2rem;
border-bottom: 1px solid $border-color;
&:last-of-type {
border-bottom: none;
}
}
// 教育经历标题栏
&__edu-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 0.14rem;
}
// 序号标识
&__edu-index {
display: flex;
align-items: center;
gap: 0.06rem;
font-size: 0.14rem;
font-weight: 600;
color: $text-dark;
}
&__edu-index-icon {
width: 0.1rem;
height: 0.1rem;
color: $accent;
}
// 删除按钮
&__edu-delete {
background: none;
border: none;
padding: 0.04rem;
cursor: pointer;
color: $text-light;
display: flex;
align-items: center;
border-radius: 0.04rem;
transition: all 0.2s;
&:hover {
color: $danger;
background: rgba($danger, 0.06);
}
}
&__edu-delete-icon {
width: 0.15rem;
height: 0.15rem;
}
// 横排字段容器(学院+专业、学历+GPA、入学+毕业时间)
// 横排字段容器
&__row {
display: flex;
gap: 0.12rem;
@@ -275,60 +140,81 @@
min-width: 0;
}
// 下拉选择器包裹(带箭头图标)
&__select-wrap {
position: relative;
// ==================== 经历卡片模块 ====================
&__edu-card {
padding-bottom: 0.16rem;
margin-bottom: 0.16rem;
border-bottom: 1px solid $border-color;
&:last-of-type {
border-bottom: none;
}
}
&__select-wrap &__input {
padding-right: 0.3rem;
&__edu-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 0.12rem;
}
&__select-arrow {
position: absolute;
right: 0.1rem;
top: 50%;
transform: translateY(-50%);
width: 0.12rem;
height: 0.12rem;
&__edu-index {
font-size: 0.13rem;
font-weight: 600;
color: $text-dark;
}
&__edu-delete {
background: none;
border: none;
padding: 0.04rem 0.08rem;
cursor: pointer;
color: $text-light;
pointer-events: none;
font-size: 0.12rem;
border-radius: 0.04rem;
transition: all 0.2s;
&:hover {
color: $danger;
background: rgba($danger, 0.06);
}
}
// 新增教育经历按钮
// 新增按钮
&__add-btn {
text-align: center;
background: none;
border: 1px solid $border-color;
border-radius: 0.2rem;
padding: 0.06rem 0.16rem;
border: 1px dashed $border-color;
border-radius: 0.04rem;
padding: 0.04rem 0.12rem;
font-size: 0.12rem;
color: $text-dark;
color: $text-middle;
cursor: pointer;
transition: all 0.2s;
margin-top: 0.04rem;
margin-top: 0.06rem;
&:hover {
border-color: $accent;
color: $accent;
}
&--full {
width: 100%;
margin-top: 0.12rem;
padding: 0.08rem;
}
}
&__add-icon {
font-size: 0.14rem;
font-weight: 600;
}
// ==================== 日期选择器样式覆盖 ====================
// Element Plus 的 el-date-picker 在 html font-size:100px 下需要用 px 还原
// ==================== 日期选择器 ====================
&__date-picker {
width: 100% !important;
.el-input__wrapper {
background: $bg-main !important;
border: 1px solid transparent !important;
border-radius: 6px !important;
border: 1px solid $border-color !important;
border-radius: 4px !important;
box-shadow: none !important;
padding: 4px 12px !important;
font-size: 13px !important;
@@ -336,7 +222,7 @@
height: auto !important;
&:hover {
border-color: $border-color !important;
border-color: $accent !important;
}
&.is-focus {
@@ -368,26 +254,147 @@
}
}
// ==================== 技能模块 ====================
// 日期范围容器(开始-结束横排)
&__date-range {
display: flex;
align-items: center;
gap: 0.04rem;
}
&__date-sep {
color: $text-light;
font-size: 0.12rem;
}
// ==================== AI润色功能 ====================
// 个人概述标题栏(含AI润色按钮)
&__summary-header {
display: flex;
align-items: center;
gap: 0.12rem;
margin-bottom: 0.08rem;
margin-top: 0.1rem;
}
// AI润色按钮
&__ai-polish-btn {
padding: 0.01rem 0.06rem;
font-size: 0.11rem;
background: $accent;
color: $bg-white;
border: 1px solid $accent;
border-radius: 0.04rem;
cursor: pointer;
transition: all 0.2s;
white-space: nowrap;
>span>span{
color: #FCD34D;
}
&:hover {
background: $accent;
color: $bg-white;
}
&:disabled {
opacity: 0.5;
cursor: not-allowed;
}
}
// AI润色结果区域
&__ai-result {
margin-top: 0.16rem;
}
&__ai-result-label {
font-size: 0.12rem;
font-weight: 600;
color: $accent;
margin-bottom: 0.08rem;
}
&__ai-result-card {
padding: 0.1rem 0.12rem;
background: $theme-color;
border: 1px solid rgba($accent, 0.2);
border-radius: 0.06rem;
}
&__ai-result-text {
font-size: 0.13rem;
color: $text-dark;
line-height: 1.7;
white-space: pre-wrap;
word-break: break-word;
}
// AI结果操作按钮组
&__ai-result-actions {
display: flex;
align-items: center;
gap: 0.12rem;
margin-top: 0.1rem;
}
// 替换为此内容按钮
&__ai-replace-btn {
padding: 0.04rem 0.12rem;
font-size: 0.12rem;
color: #fff;
background: $accent;
border: 1px solid $accent;
border-radius: 0.04rem;
cursor: pointer;
transition: all 0.2s;
&:hover {
background: $accent;
color: $bg-white;
}
}
// 重新生成按钮
&__ai-regenerate-btn {
padding: 0.04rem 0.12rem;
font-size: 0.12rem;
color: $accent;
background: none;
border: 1px solid $accent;
border-radius: 0.04rem;
cursor: pointer;
transition: all 0.2s;
&:hover {
border-color: $accent;
color: $accent;
}
&:disabled {
opacity: 0.5;
cursor: not-allowed;
}
}
// ==================== 技能/证书标签 ====================
// 技能标签列表容器
&__skills-list {
display: flex;
flex-wrap: wrap;
gap: 0.08rem;
margin-bottom: 0.2rem;
margin-bottom: 0.16rem;
min-height: 0.4rem;
}
// 单个技能标签
&__skill-tag {
display: inline-flex;
align-items: center;
gap: 0.06rem;
padding: 0.06rem 0.1rem 0.06rem 0.14rem;
padding: 0.04rem 0.1rem 0.04rem 0.12rem;
background: $bg-main;
border-radius: 0.16rem;
font-size: 0.13rem;
border-radius: 0.14rem;
font-size: 0.12rem;
color: $text-dark;
transition: all 0.2s;
@@ -396,12 +403,10 @@
}
}
// 技能标签文本
&__skill-text {
line-height: 1.4;
}
// 技能标签删除按钮
&__skill-remove {
background: none;
border: none;
@@ -424,23 +429,23 @@
height: 0.12rem;
}
// 底部保存按钮
// ==================== 底部操作按钮 ====================
&__footer {
padding: 0.16rem 0.2rem;
border-top: 1px solid $border-color;
text-align: center;
flex-shrink: 0;
display: flex;
align-items: center;
gap: 0.12rem;
padding-top: 0.04rem;
}
&__save-btn {
width: 2.0rem;
padding: 0.1rem 0;
font-size: 0.14rem;
padding: 0.06rem 0.2rem;
font-size: 0.13rem;
font-weight: 600;
color: $bg-white;
background: $btn-dark;
border: none;
border-radius: 0.24rem;
border-radius: 0.2rem;
cursor: pointer;
transition: all 0.2s;
@@ -448,11 +453,26 @@
background: $btn-dark-hover;
}
}
&__cancel-btn {
padding: 0.06rem 0.2rem;
font-size: 0.13rem;
font-weight: 600;
color: $accent;
background: transparent;
border: 1px solid $accent;
border-radius: 0.2rem;
cursor: pointer;
transition: all 0.2s;
&:hover {
background: $theme-color;
}
}
}
// ==================== 过渡动画 ====================
// ==================== 日期选择器弹出面板样式覆盖 ====================
// 日期选择器弹出面板样式覆盖(teleport 到 body,需在全局作用域)
.profile-drawer-date-popper {
font-size: 14px !important;
line-height: 1.5 !important;
@@ -474,25 +494,3 @@
padding: 8px 0 !important;
}
}
// 遮罩层淡入淡出
.profile-drawer-overlay-enter-active,
.profile-drawer-overlay-leave-active {
transition: opacity 0.3s ease;
}
.profile-drawer-overlay-enter-from,
.profile-drawer-overlay-leave-to {
opacity: 0;
}
// 抽屉滑入滑出
.profile-drawer-slide-enter-active,
.profile-drawer-slide-leave-active {
transition: transform 0.3s ease;
}
.profile-drawer-slide-enter-from,
.profile-drawer-slide-leave-to {
transform: translateX(100%);
}