Commit 8769bfef by Lin

fix: 样式交互对齐优化

1 parent 8a9475de
<template> <template>
<div class="flex items-center h-[42px] mb-4 border-b border-gray-100"> <div class="flex align-center items-center h-[42px] mb-4">
<img src="/images/icon-title.png" alt="title" class="w-[4px] h-[18px] rounded-sm"> <img src="/images/icon-title.png" alt="title" class="w-[4px] h-[18px] rounded-sm">
<p class="text-[14px] font-medium text-[#2F3133] ml-[12px]">{{ title }}</p> <p class="text-[14px] font-medium text-[#2F3133] ml-[12px]">{{ title }}</p>
</div> </div>
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<div class="group relative flex items-start"> <div class="group relative flex items-start">
<!-- 步骤数字 --> <!-- 步骤数字 -->
<span <span
class="flex h-7 w-7 items-center justify-center rounded-full border border-blue-100 bg-blue-50 ring-4 ring-white" class="flex h-7 w-7 items-center justify-center rounded-full bg-blue-50 ring-4 ring-white"
> >
<span class="text-sm font-bold text-blue-600">{{ index + 1 }}</span> <span class="text-sm font-bold text-blue-600">{{ index + 1 }}</span>
</span> </span>
......
...@@ -311,7 +311,7 @@ const handleFileChange = async (file) => { ...@@ -311,7 +311,7 @@ const handleFileChange = async (file) => {
validation: { validation: {
allowedTypes: ['application/pdf', 'application/msword', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'], allowedTypes: ['application/pdf', 'application/msword', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'],
allowedExtensions: ['pdf', 'doc', 'docx'], allowedExtensions: ['pdf', 'doc', 'docx'],
maxSize: 10 * 1024 * 1024, // 10MB maxSize: 10 * 1024 * 1024, // 50MB
errorMessage: '文件格式错误,仅支持 PDF、Word 格式', errorMessage: '文件格式错误,仅支持 PDF、Word 格式',
}, },
onSuccess: (url) => { onSuccess: (url) => {
...@@ -538,11 +538,13 @@ const cancel = () => { ...@@ -538,11 +538,13 @@ const cancel = () => {
<img src="/images/icon-upload.png" alt="upload-file" class="w-[16px] h-[16px] mr-[4px]"> <span>选择文件</span> <img src="/images/icon-upload.png" alt="upload-file" class="w-[16px] h-[16px] mr-[4px]"> <span>选择文件</span>
</div> </div>
</el-upload> </el-upload>
<div class="mt-[5px] text-xs text-[#909399]">支持pdf, word格式,大小在10M以内</div> <div class="mt-[5px] text-[12px] text-[#909399]">支持pdf, word格式,大小在10M以内</div>
<!-- 已上传文件显示 --> <!-- 已上传文件显示 -->
<div v-if="fileInfo.name" class="mt-2 flex items-center gap-2"> <div v-if="fileInfo.name" class="mt-2 flex items-center gap-2">
<el-icon class="text-[#409eff]"><Document /></el-icon> <div class="flex items-center gap-2 w-[376px] bg-[#F5F7FA] px-[10px] rounded-[4px]">
<span class="text-sm text-[#606266]">{{ fileInfo.name }}</span> <el-icon class="text-[#9BA3AD]"><Document /></el-icon>
<span class="text-[12px] w-[376px] text-[#606266]">{{ fileInfo.name }}</span>
</div>
<el-button <el-button
type="danger" type="danger"
link link
...@@ -550,7 +552,7 @@ const cancel = () => { ...@@ -550,7 +552,7 @@ const cancel = () => {
@click="removeFile" @click="removeFile"
class="ml-2" class="ml-2"
> >
<el-icon><Delete /></el-icon> <el-icon class="text-[#9BA3AD]"><Delete /></el-icon>
</el-button> </el-button>
</div> </div>
</div> </div>
...@@ -610,7 +612,7 @@ const cancel = () => { ...@@ -610,7 +612,7 @@ const cancel = () => {
<style scoped lang="scss"> <style scoped lang="scss">
/* 覆盖 Element Plus 一些默认样式以更贴合设计图 */ /* 覆盖 Element Plus 一些默认样式以更贴合设计图 */
:deep(.el-form-item__label) { :deep(.el-form-item__label) {
font-weight: 500; font-weight: normal;
color: #565C66; color: #565C66;
} }
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<CustomHeaderTitle title="智能体概况"/> <CustomHeaderTitle title="智能体概况"/>
<!-- 卡片内容 --> <!-- 卡片内容 -->
<div class="rounded-lg p-6 shadow-[0_4px_12px_0_#525b6629] transition-shadow"> <div class="rounded-[8px] p-6 shadow-[0_4px_12px_0_#525b6629] transition-shadow">
<div class="flex items-center"> <div class="flex items-center">
<img src="/images/icon-agentic-practice.png" class="h-[32px] w-[32px] mr-[12px] rounded-full bg-red-200" /> <img src="/images/icon-agentic-practice.png" class="h-[32px] w-[32px] mr-[12px] rounded-full bg-red-200" />
<div> <div>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<CustomHeaderTitle title="智能体概况"/> <CustomHeaderTitle title="智能体概况"/>
<!-- 文本内容 --> <!-- 文本内容 -->
<div class="rounded-lg p-6 shadow-[0_4px_12px_0_#525b6629] transition-shadow"> <div class="rounded-[8px] p-6 shadow-[0_4px_12px_0_#525b6629] transition-shadow">
<div class="flex items-center"> <div class="flex items-center">
<img src="/images/icon-agentic-quality.png" class="h-[32px] w-[32px] mr-[12px] rounded-full bg-red-200" /> <img src="/images/icon-agentic-quality.png" class="h-[32px] w-[32px] mr-[12px] rounded-full bg-red-200" />
<div> <div>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<!-- 标题头 --> <!-- 标题头 -->
<CustomHeaderTitle title="智能体概况"/> <CustomHeaderTitle title="智能体概况"/>
<!-- 卡片内容 --> <!-- 卡片内容 -->
<div class="rounded-lg p-6 shadow-[0_4px_12px_0_#525b6629] transition-shadow"> <div class="rounded-[8px] p-6 shadow-[0_4px_12px_0_#525b6629] transition-shadow">
<div class="flex items-center"> <div class="flex items-center">
<img src="/images/icon-agentic-replay.png" class="h-[32px] w-[32px] mr-[12px] rounded-full bg-red-200" /> <img src="/images/icon-agentic-replay.png" class="h-[32px] w-[32px] mr-[12px] rounded-full bg-red-200" />
<div> <div>
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
:placeholder="isEditing ? '请输入复盘提示词模板' : ''" :placeholder="isEditing ? '请输入复盘提示词模板' : ''"
:autosize="{ minRows: 2, maxRows: 4 }" :autosize="{ minRows: 2, maxRows: 4 }"
/> />
<p class="text-[12px] text-[#969AA3] font-normal mt-[4px]">提示词将指导AI如何进行对话分析,可根据需求调整分析重点和输出格式</p> <p class="text-[12px] text-[#969AA3] font-normal mt-[8px]">提示词将指导AI如何进行对话分析,可根据需求调整分析重点和输出格式</p>
<div class="btn-group flex items-center gap-[12px] mt-[32px]" v-if="isEditing"> <div class="btn-group flex items-center gap-[12px] mt-[32px]" v-if="isEditing">
<el-button type="primary" @click="updatePromptTemplateList">保存</el-button> <el-button type="primary" @click="updatePromptTemplateList">保存</el-button>
<!-- <el-button @click="toggleEdit">取消</el-button> --> <!-- <el-button @click="toggleEdit">取消</el-button> -->
......
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
<!-- 5. 智能体主动联系 --> <!-- 5. 智能体主动联系 -->
<el-form-item label="学员无应答时,智能体是否主动联系" prop="proactiveContactEnabled"> <el-form-item label="学员无应答时,智能体是否主动联系" prop="proactiveContactEnabled">
<el-radio-group v-model="formData.proactiveContactEnabled"> <el-radio-group v-model="formData.proactiveContactEnabled" class="compact-radio-group">
<el-radio :label="true">是</el-radio> <el-radio :label="true">是</el-radio>
<el-radio :label="false">否</el-radio> <el-radio :label="false">否</el-radio>
</el-radio-group> </el-radio-group>
...@@ -314,4 +314,9 @@ defineExpose({ ...@@ -314,4 +314,9 @@ defineExpose({
:deep(.el-radio__input.is-checked + .el-radio__label) { :deep(.el-radio__input.is-checked + .el-radio__label) {
color: #606266 !important; color: #606266 !important;
} }
/* 缩小 radio-group 中 radio 之间的间距 */
:deep(.compact-radio-group .el-radio) {
margin-right: 24px;
}
</style> </style>
<script setup> <script setup>
import { ref } from 'vue'; import { ref, onMounted, onUnmounted, nextTick, watch } from 'vue';
import { import {
ChatDotRound, ChatDotRound,
...@@ -20,6 +20,87 @@ import AgenticTrain from './components/AgenticTrain.vue'; ...@@ -20,6 +20,87 @@ import AgenticTrain from './components/AgenticTrain.vue';
// 状态 // 状态
const activeMenu = ref(0); const activeMenu = ref(0);
// 容器引用
const scrollContainerRef = ref(null);
// 滚动数据
const scrollData = ref({
scrollTop: 0,
scrollLeft: 0,
scrollHeight: 0,
clientHeight: 0,
scrollWidth: 0,
clientWidth: 0,
});
// 处理滚动事件
const handleScroll = (event) => {
const target = event?.target || event?.currentTarget || scrollContainerRef.value;
if (!target) return;
scrollData.value = {
scrollTop: target.scrollTop,
scrollLeft: target.scrollLeft,
scrollHeight: target.scrollHeight,
clientHeight: target.clientHeight,
scrollWidth: target.scrollWidth,
clientWidth: target.clientWidth,
};
// 调试信息,可以在控制台查看滚动数据
console.log('滚动事件触发:', {
scrollTop: scrollData.value.scrollTop,
scrollHeight: scrollData.value.scrollHeight,
clientHeight: scrollData.value.clientHeight,
});
};
// 初始化滚动监听
const initScrollListener = async () => {
await nextTick();
if (scrollContainerRef.value) {
// 先移除旧的监听器(如果存在)
scrollContainerRef.value.removeEventListener('scroll', handleScroll);
// 添加新的监听器
scrollContainerRef.value.addEventListener('scroll', handleScroll, { passive: true });
console.log('滚动监听器已绑定');
} else {
console.warn('滚动容器引用未找到');
}
};
// 组件挂载后添加事件监听
onMounted(() => {
initScrollListener();
});
// 监听 activeMenu 变化,当切换组件时重新初始化监听
watch(activeMenu, () => {
initScrollListener();
});
// 菜单点击切换时重置滚动条
const handleMenuClick = async (index) => {
activeMenu.value = index;
// 等待组件内容渲染完毕
await nextTick();
// 再通过 requestAnimationFrame 确保 DOM 布局完成后再滚动
requestAnimationFrame(() => {
const el = scrollContainerRef.value;
if (!el) return;
el.scrollTo({ top: 0, left: 0, behavior: 'auto' });
// 更新一次滚动数据,保持同步
handleScroll({ target: el });
});
};
// 组件卸载前移除事件监听
onUnmounted(() => {
if (scrollContainerRef.value) {
scrollContainerRef.value.removeEventListener('scroll', handleScroll);
}
});
// 数据源:侧边栏 // 数据源:侧边栏
const sidebarItems = [ const sidebarItems = [
{ {
...@@ -73,8 +154,8 @@ const sidebarItems = [ ...@@ -73,8 +154,8 @@ const sidebarItems = [
<div <div
v-for="(item, index) in sidebarItems" v-for="(item, index) in sidebarItems"
:key="index" :key="index"
@click="activeMenu = index" @click="handleMenuClick(index)"
class="group flex cursor-pointer items-center rounded-xl p-4 transition-all duration-200" class="group flex cursor-pointer items-center rounded-[8px] p-4 transition-all duration-200"
:class="activeMenu === index ? 'bg-[#eef6ff]' : 'hover:bg-gray-50'" :class="activeMenu === index ? 'bg-[#eef6ff]' : 'hover:bg-gray-50'"
> >
<!-- 图标容器 --> <!-- 图标容器 -->
...@@ -90,12 +171,11 @@ const sidebarItems = [ ...@@ -90,12 +171,11 @@ const sidebarItems = [
<!-- 文本 --> <!-- 文本 -->
<div class="flex flex-col"> <div class="flex flex-col">
<span <span
class="mb-0.5 text-base font-medium" class="mb-0.5 text-base font-medium text-[#2F3133]"
:class="activeMenu === index ? 'text-gray-900' : 'text-gray-700'"
> >
{{ item.title }} {{ item.title }}
</span> </span>
<span class="text-[12px] font-light text-gray-400">{{ <span class="text-[12px] text-[#969AA3]">{{
item.desc item.desc
}}</span> }}</span>
</div> </div>
...@@ -104,7 +184,12 @@ const sidebarItems = [ ...@@ -104,7 +184,12 @@ const sidebarItems = [
</aside> </aside>
<!-- 右侧主要内容区 --> <!-- 右侧主要内容区 -->
<section class="h-full flex-1 overflow-y-auto scroll-smooth bg-white pr-[24px] pb-[94px]"> <section
ref="scrollContainerRef"
class="flex-1 overflow-y-auto scroll-smooth bg-white pr-[24px] pb-[94px]"
:style="{ height: 'calc(100vh - 60px)' }"
@scroll="handleScroll"
>
<AgenticQuality v-if="activeMenu === 0" /> <AgenticQuality v-if="activeMenu === 0" />
<AgenticPractice v-if="activeMenu === 1" /> <AgenticPractice v-if="activeMenu === 1" />
<AgenticReplay v-if="activeMenu === 2" /> <AgenticReplay v-if="activeMenu === 2" />
......
...@@ -38,8 +38,8 @@ ...@@ -38,8 +38,8 @@
:on-remove="handleFileRemove" :on-remove="handleFileRemove"
> >
<div class="flex flex-col items-center justify-center h-full w-full"> <div class="flex flex-col items-center justify-center h-full w-full">
<el-icon class="el-icon--upload !text-4xl !text-gray-400 mb-2"><UploadFilled /></el-icon> <el-icon class="el-icon--upload !text-4xl !text-gray-400"><UploadFilled /></el-icon>
<div class="el-upload__text text-gray-400"> <div class="el-upload__text text-gray-400 mt-[-8px]">
点击上传 / 拖拽文件到处 点击上传 / 拖拽文件到处
</div> </div>
</div> </div>
...@@ -161,7 +161,7 @@ ...@@ -161,7 +161,7 @@
<div <div
v-for="node in selectedNodes" v-for="node in selectedNodes"
:key="node.id" :key="node.id"
class="flex justify-between items-center px-3 py-2 rounded group transition" class="flex justify-between items-center px-3 py-1 rounded group transition"
> >
<div class="flex items-center gap-2"> <div class="flex items-center gap-2">
<span class="text-[14px] text-[#2F3133] font-normal">{{ getNodeDisplayText(node) }}</span> <span class="text-[14px] text-[#2F3133] font-normal">{{ getNodeDisplayText(node) }}</span>
......
...@@ -290,24 +290,27 @@ const getCardStyle = (type) => { ...@@ -290,24 +290,27 @@ const getCardStyle = (type) => {
const styles = { const styles = {
1: { // 文档 1: { // 文档
cardBg: 'bg-[#f0f9f8]', // 极浅绿背景 cardBg: 'bg-[#f0f9f8]', // 极浅绿背景
cardBgStyle: 'background: linear-gradient(56.9deg, #e6faf7 0%, #f5fffe 28.999999999999996%, #f5fffe 60%, #eefcfb 100%)', // 渐变背景
iconBg: 'bg-[#d5eee6]', // 图标浅绿底 iconBg: 'bg-[#d5eee6]', // 图标浅绿底
iconColor: 'text-[#4bb79d]', // 图标深绿 iconColor: 'text-[#4bb79d]', // 图标深绿
tagColor: 'text-[#4bb79d]', // 标签文字色 tagColor: 'text-[#4bb79d]', // 标签文字色
}, },
2: { // 图片 2: { // 图片
cardBg: 'bg-[#f2f4fc]', // 极浅蓝背景 cardBg: 'bg-[#f2f4fc]', // 极浅蓝背景
cardBgStyle: 'background: linear-gradient(56.9deg, #ebf2ff 0%, #f5f8ff 28.999999999999996%, #f5f8ff 61%, #f0f4ff 100%)', // 渐变背景
iconBg: 'bg-[#dcecff]', iconBg: 'bg-[#dcecff]',
iconColor: 'text-[#6eb0f7]', iconColor: 'text-[#6eb0f7]',
tagColor: 'text-[#6eb0f7]', tagColor: 'text-[#6eb0f7]',
}, },
3: { // 视频 3: { // 视频
cardBg: 'bg-[#f0f8ff]', // 极浅紫背景 cardBg: 'bg-[#f0f8ff]', // 极浅紫背景
cardBgStyle: 'background: linear-gradient(56.9deg, #ebf8ff 0%, #f5fbff 28.999999999999996%, #f5fbff 60%, #f0faff 100%)', // 渐变背景
iconBg: 'bg-[#dbe4fd]', iconBg: 'bg-[#dbe4fd]',
iconColor: 'text-[#738cdd]', iconColor: 'text-[#738cdd]',
tagColor: 'text-[#738cdd]', tagColor: 'text-[#738cdd]',
}, },
4: { // 其他 4: { // 其他
cardBg: 'bg-[#f5f5f5]', // 极浅灰背景 cardBgStyle: 'background: linear-gradient(56.9deg, #e6faf7 0%, #f5fffe 28.999999999999996%, #f5fffe 60%, #eefcfb 100%)', // 渐变背景
iconBg: 'bg-[#e0e0e0]', iconBg: 'bg-[#e0e0e0]',
iconColor: 'text-[#757575]', iconColor: 'text-[#757575]',
tagColor: 'text-[#757575]', tagColor: 'text-[#757575]',
...@@ -653,7 +656,7 @@ onMounted(() => { ...@@ -653,7 +656,7 @@ onMounted(() => {
<h1 class="mb-5 text-lg font-semibold text-gray-800">知识管理</h1> <h1 class="mb-5 text-lg font-semibold text-gray-800">知识管理</h1>
<div class="flex gap-8"> <div class="flex gap-8">
<div <div
class="cursor-pointer border-b-2 border-[#E1E3E6] pb-3 text-[14px] font-medium text-[#1956FE]" class="cursor-pointer border-b-2 border-[#1956FE] pb-3 text-[14px] font-medium text-[#1956FE]"
> >
素材库 素材库
</div> </div>
...@@ -668,7 +671,7 @@ onMounted(() => { ...@@ -668,7 +671,7 @@ onMounted(() => {
<div class="flex flex-1 overflow-hidden bg-white p-6"> <div class="flex flex-1 overflow-hidden bg-white p-6">
<!-- 左侧侧边栏 --> <!-- 左侧侧边栏 -->
<aside <aside
class="mr-6 flex h-[calc(100%-40px)] w-[278px] flex-shrink-0 flex-col rounded-[12px] border border-[#E1E3E6] p-[16px]" class="flex h-[calc(100%-40px)] w-[278px] flex-shrink-0 flex-col rounded-[12px] border border-[#E1E3E6] p-[16px]"
> >
<div class="flex items-center justify-between mb-3 flex-shrink-0"> <div class="flex items-center justify-between mb-3 flex-shrink-0">
<p class="text-[14px] font-normal text-[#2F3133]"> <p class="text-[14px] font-normal text-[#2F3133]">
...@@ -763,7 +766,7 @@ onMounted(() => { ...@@ -763,7 +766,7 @@ onMounted(() => {
<!-- 右侧内容区 --> <!-- 右侧内容区 -->
<main class="flex flex-1 flex-col overflow-hidden"> <main class="flex flex-1 flex-col overflow-hidden">
<!-- 筛选栏 --> <!-- 筛选栏 -->
<div class="mb-5 flex flex-shrink-0 items-center justify-between"> <div class="mx-6 mb-5 flex flex-shrink-0 items-center justify-between">
<div class="flex items-center gap-3"> <div class="flex items-center gap-3">
<div class="flex items-center gap-3"> <div class="flex items-center gap-3">
<span class="whitespace-nowrap text-[14px] text-gray-600" <span class="whitespace-nowrap text-[14px] text-gray-600"
...@@ -818,12 +821,13 @@ onMounted(() => { ...@@ -818,12 +821,13 @@ onMounted(() => {
<div class="flex justify-end items-center mb-4 bg-white"> <div class="flex justify-end items-center mb-4 bg-white">
<el-button type="primary" :icon="Upload" @click="handleEditMaterial({})">上传素材</el-button> <el-button type="primary" :icon="Upload" @click="handleEditMaterial({})">上传素材</el-button>
</div> </div>
<div class="mb-6 grid grid-cols-3 gap-6 py-[24px]"> <div class="mx-6 mb-6 grid grid-cols-3 gap-6 py-[24px] materials-grid">
<div <div
v-for="item in materials" v-for="item in materials"
:key="item.id" :key="item.id"
class="relative flex min-w-[278px] h-[148px] flex-col rounded-[10px] px-5 mb-[24px] transition-shadow duration-300 hover:shadow-[0_8px_24px_#525b663d]" class="relative flex min-w-[278px] h-[148px] flex-col rounded-[10px] px-5 mb-[24px] transition-shadow duration-300 hover:shadow-[0_8px_24px_#525b663d]"
:class="getCardStyle(item.knowledgeType).cardBg" :class="getCardStyle(item.knowledgeType).cardBgStyle ? '' : getCardStyle(item.knowledgeType).cardBg"
:style="getCardStyle(item.knowledgeType).cardBgStyle"
> >
<!-- 卡片图标区域 --> <!-- 卡片图标区域 -->
<div class="mb-4 absolute top-[-16px] left-[24px]"> <div class="mb-4 absolute top-[-16px] left-[24px]">
...@@ -833,6 +837,7 @@ onMounted(() => { ...@@ -833,6 +837,7 @@ onMounted(() => {
getCardStyle(item.knowledgeType).iconBg, getCardStyle(item.knowledgeType).iconBg,
getCardStyle(item.knowledgeType).iconColor, getCardStyle(item.knowledgeType).iconColor,
]" ]"
style=" box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);"
> >
<img src="/images/icon-know-doc.png" v-if="item.knowledgeType == 1 || item.knowledgeType === 'doc'" alt="" srcset=""> <img src="/images/icon-know-doc.png" v-if="item.knowledgeType == 1 || item.knowledgeType === 'doc'" alt="" srcset="">
<img v-else-if="item.knowledgeType == 3 || item.knowledgeType === 'video'" src="/images/icon-know-video.png" alt="" srcset=""> <img v-else-if="item.knowledgeType == 3 || item.knowledgeType === 'video'" src="/images/icon-know-video.png" alt="" srcset="">
...@@ -910,7 +915,7 @@ onMounted(() => { ...@@ -910,7 +915,7 @@ onMounted(() => {
<!-- 分页 --> <!-- 分页 -->
<div class="flex flex-shrink-0 items-center justify-between pt-5 pb-10 bg-white border-t border-gray-100"> <div class="mx-6 flex flex-shrink-0 items-center justify-between pt-5 pb-10 bg-white border-t border-gray-100">
<div class="text-[14px] text-[#777C85]">共 {{ pagination.total }} 项数据</div> <div class="text-[14px] text-[#777C85]">共 {{ pagination.total }} 项数据</div>
<div class="flex items-center gap-2"> <div class="flex items-center gap-2">
<el-select <el-select
...@@ -1027,4 +1032,11 @@ onMounted(() => { ...@@ -1027,4 +1032,11 @@ onMounted(() => {
:deep(.el-select-dropdown__item.selected) { :deep(.el-select-dropdown__item.selected) {
color: #1956FE !important; color: #1956FE !important;
} }
/* 素材卡片网格布局:屏幕宽度大于1742px时显示4列 */
@media (min-width: 1742px) {
.materials-grid {
grid-template-columns: repeat(4, minmax(0, 1fr));
}
}
</style> </style>
...@@ -419,7 +419,7 @@ watch( ...@@ -419,7 +419,7 @@ watch(
gap: 8px; gap: 8px;
align-items: center; align-items: center;
width: 228px; width: 228px;
height: 56px; height: 55px;
padding-left: 24px; padding-left: 24px;
font-size: 20px; font-size: 20px;
font-weight: 600; font-weight: 600;
...@@ -450,6 +450,7 @@ watch( ...@@ -450,6 +450,7 @@ watch(
height: 56px; height: 56px;
padding: 0 24px; padding: 0 24px;
background: #fff; background: #fff;
border-bottom: 1px solid #F2F4F7;
} }
/* 主体区域 */ /* 主体区域 */
......
...@@ -560,12 +560,14 @@ const handleChildClick = (child: MenuItem) => { ...@@ -560,12 +560,14 @@ const handleChildClick = (child: MenuItem) => {
.popover-menu-item:hover { .popover-menu-item:hover {
color: #1956fe; color: #1956fe;
background-color: #f0f4ff; background-color: #f0f4ff;
border-radius: 4px;
} }
.popover-menu-item.active { .popover-menu-item.active {
color: #1956fe; color: #1956fe;
background-color: #e8f0ff; background-color: #e8f0ff;
font-weight: 500; font-weight: 500;
border-radius: 4px;
} }
.popover-menu-title { .popover-menu-title {
......
...@@ -84,7 +84,7 @@ const handleLogin = async () => { ...@@ -84,7 +84,7 @@ const handleLogin = async () => {
// 验证表单 // 验证表单
if (!isFormValid.value) { if (!isFormValid.value) {
if (!loginForm.username.trim()) { if (!loginForm.username.trim()) {
usernameError.value = '请输入用户名'; usernameError.value = '请输入账户';
} }
if (!loginForm.password.trim()) { if (!loginForm.password.trim()) {
passwordError.value = '请输入密码'; passwordError.value = '请输入密码';
...@@ -115,7 +115,7 @@ const handleLogin = async () => { ...@@ -115,7 +115,7 @@ const handleLogin = async () => {
if (code == 0) { if (code == 0) {
// 登录成功,处理记住密码逻辑 // 登录成功,处理记住密码逻辑
if (loginForm.rememberMe) { if (loginForm.rememberMe) {
// 保存用户名和密码(使用 base64 简单编码) // 保存账户和密码(使用 base64 简单编码)
localStorage.setItem('rememberedUsername', loginForm.username); localStorage.setItem('rememberedUsername', loginForm.username);
localStorage.setItem('rememberedPassword', btoa(loginForm.password)); localStorage.setItem('rememberedPassword', btoa(loginForm.password));
localStorage.setItem('rememberMe', 'true'); localStorage.setItem('rememberMe', 'true');
...@@ -193,7 +193,7 @@ const handleRememberMeChange = () => { ...@@ -193,7 +193,7 @@ const handleRememberMeChange = () => {
if (!loginForm.rememberMe) { if (!loginForm.rememberMe) {
// 取消勾选时,清除保存的密码信息 // 取消勾选时,清除保存的密码信息
const savedUsername = localStorage.getItem('rememberedUsername'); const savedUsername = localStorage.getItem('rememberedUsername');
// 如果当前用户名与保存的用户名一致,清空密码字段 // 如果当前账户与保存的用户名一致,清空密码字段
if (savedUsername === loginForm.username) { if (savedUsername === loginForm.username) {
loginForm.password = ''; loginForm.password = '';
} }
...@@ -560,8 +560,6 @@ onMounted(() => { ...@@ -560,8 +560,6 @@ onMounted(() => {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 4px; gap: 4px;
margin-bottom: 4px;
.input-icon { .input-icon {
width: 18px; width: 18px;
height: 18px; height: 18px;
...@@ -798,7 +796,7 @@ onMounted(() => { ...@@ -798,7 +796,7 @@ onMounted(() => {
width: 100% !important; width: 100% !important;
height: $input-height !important; height: $input-height !important;
padding: 0 !important; padding: 0 !important;
margin-top: 28px; margin-top: 20px;
font-size: $font-size-lg !important; font-size: $font-size-lg !important;
font-weight: 600 !important; font-weight: 600 !important;
color: #fff !important; color: #fff !important;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!