mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-10-05 01:20:07 +00:00
style(layouts): 移除多余边框样式并优化布局
refactor(views): 调整AI页面容器样式和输入区域交互效果 feat(dashboard): 替换快速链接按钮为卡片并优化交互
This commit is contained in:
@@ -30,11 +30,14 @@ defineProps({
|
||||
background-color: $sidebar-logo-background;
|
||||
|
||||
.title {
|
||||
flex-shrink: 0;
|
||||
max-width: 100px;
|
||||
margin-left: 10px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
color: $sidebar-logo-text-color;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -790,8 +790,6 @@ onUnmounted(() => {
|
||||
box-shadow: 0 1px 1px var(--el-box-shadow-light);
|
||||
|
||||
.btn {
|
||||
top: 1px;
|
||||
left: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
@@ -149,7 +149,6 @@ watch(
|
||||
width: 100%;
|
||||
height: $navbar-height;
|
||||
background-color: var(--menu-background);
|
||||
border-bottom: 1px solid var(--el-border-color-lighter);
|
||||
|
||||
&-content {
|
||||
display: flex;
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
); // 菜单激活文字颜色 浅色主题-白色侧边栏配色下仅占位,实际颜色由 el-menu-item 组件决定
|
||||
|
||||
--menu-hover: #e6f4ff; // 菜单悬停背景色 浅色主题-白色侧边栏配色下仅占位,实际颜色由 el-menu-item 组件决定
|
||||
--sidebar-logo-background: #f5f5f5; // 侧边栏 Logo 背景色
|
||||
--sidebar-logo-background: #fff; // 侧边栏 Logo 背景色
|
||||
--sidebar-logo-text-color: #333; // 侧边栏 Logo 文字颜色
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ html.sidebar-color-blue {
|
||||
--menu-text: #bfcbd9; // 菜单文字颜色
|
||||
--menu-active-text: var(--el-menu-active-color); // 菜单激活文字颜色
|
||||
--menu-hover: #263445; // 菜单悬停背景色
|
||||
--sidebar-logo-background: #2d3748; // 侧边栏 Logo 背景色
|
||||
--sidebar-logo-background: #304156; // 侧边栏 Logo 背景色
|
||||
--sidebar-logo-text-color: #fff; // 侧边栏 Logo 文字颜色
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ html.dark {
|
||||
--menu-text: #fff;
|
||||
--menu-active-text: var(--el-menu-active-color);
|
||||
--menu-hover: rgb(0 0 0 / 20%);
|
||||
--sidebar-logo-background: rgb(0 0 0 / 20%);
|
||||
--sidebar-logo-background: var(--el-bg-color-overlay);
|
||||
--sidebar-logo-text-color: #fff;
|
||||
|
||||
/** WangEditor Dark */
|
||||
|
||||
@@ -179,36 +179,38 @@
|
||||
</ElButton>
|
||||
</div>
|
||||
</template>
|
||||
<ElRow v-if="quickLinks.length > 0" :gutter="8">
|
||||
<ElCol v-for="(item, index) in quickLinks" :key="index" :span="6" class="group mb-4">
|
||||
<ElButton
|
||||
plain
|
||||
type="default"
|
||||
class="w-full relative"
|
||||
<ElRow v-if="quickLinks.length > 0" :gutter="12">
|
||||
<ElCol v-for="(item, index) in quickLinks" :key="index" :span="6" class="mb-4">
|
||||
<ElCard
|
||||
shadow="hover"
|
||||
class="h-full transition-all duration-300 hover:scale-[1.02] cursor-pointer relative"
|
||||
@click="handleQuickLinkClick(item)"
|
||||
>
|
||||
<div class="flex flex-col items-center justify-center py-1 px-1">
|
||||
<div class="text-2xl mb-1">
|
||||
<el-icon
|
||||
v-if="item.icon && item.icon.startsWith('el-icon')"
|
||||
:color="getRandomColor()"
|
||||
>
|
||||
<component :is="item.icon.replace('el-icon-', '')" />
|
||||
</el-icon>
|
||||
<div
|
||||
v-else-if="item.icon"
|
||||
:class="`i-svg:${item.icon}`"
|
||||
:style="{ color: getRandomColor() }"
|
||||
/>
|
||||
<div v-else :class="`i-svg:menu`" :style="{ color: getRandomColor() }" />
|
||||
</div>
|
||||
<div class="text-center text-sm font-medium">{{ item.title }}</div>
|
||||
</div>
|
||||
<el-icon
|
||||
v-if="item.icon && item.icon.startsWith('el-icon')"
|
||||
:color="getRandomColor()"
|
||||
>
|
||||
<component :is="item.icon.replace('el-icon-', '')" />
|
||||
</el-icon>
|
||||
<div
|
||||
v-else-if="item.icon"
|
||||
:class="`i-svg:${item.icon} mr-2`"
|
||||
:style="{ color: getRandomColor() }"
|
||||
/>
|
||||
<div v-else :class="`i-svg:menu mr-2`" :style="{ color: getRandomColor() }" />
|
||||
|
||||
<span>{{ item.title }}</span>
|
||||
<el-icon
|
||||
color="var(--el-color-danger)"
|
||||
class="absolute top-0 right-0 opacity-0 group-hover:opacity-100"
|
||||
color="var(--el-color-warning)"
|
||||
class="absolute top-2 right-2 opacity-100"
|
||||
@click.stop="handleDeleteLink(item)"
|
||||
>
|
||||
<CircleClose />
|
||||
<StarFilled />
|
||||
</el-icon>
|
||||
</ElButton>
|
||||
</ElCard>
|
||||
</ElCol>
|
||||
</ElRow>
|
||||
<el-empty v-else :image-size="80" description="暂无数据" />
|
||||
@@ -243,7 +245,7 @@ import NoticeAPI, { NoticeTable } from "@/api/module_system/notice";
|
||||
import { ref, onMounted, reactive } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { useRouter } from "vue-router";
|
||||
import { QuestionFilled, Delete, CircleClose } from "@element-plus/icons-vue";
|
||||
import { QuestionFilled, Delete, StarFilled } from "@element-plus/icons-vue";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import { quickStartManager, type QuickLink } from "@/utils/quickStartManager";
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="chatgpt-container">
|
||||
<div class="app-container">
|
||||
<!-- 主聊天区域 -->
|
||||
<div class="main-chat">
|
||||
<!-- 顶部导航栏 -->
|
||||
@@ -513,13 +513,6 @@ onUnmounted(() => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.chatgpt-container {
|
||||
display: flex;
|
||||
height: calc(100vh - 120px);
|
||||
overflow: hidden;
|
||||
background: var(--el-bg-color);
|
||||
}
|
||||
|
||||
// 主聊天区域
|
||||
.main-chat {
|
||||
position: relative;
|
||||
@@ -841,9 +834,8 @@ onUnmounted(() => {
|
||||
}
|
||||
}
|
||||
|
||||
// 输入区域
|
||||
.chat-input {
|
||||
position: fixed;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
@@ -851,9 +843,12 @@ onUnmounted(() => {
|
||||
padding: 16px 24px 24px;
|
||||
background: var(--el-bg-color);
|
||||
border-top: 1px solid var(--el-border-color-light);
|
||||
-webkit-backdrop-filter: blur(10px);
|
||||
backdrop-filter: blur(10px);
|
||||
|
||||
.input-wrapper {
|
||||
max-width: 800px;
|
||||
width: 100%;
|
||||
max-width: 1000px;
|
||||
margin: 0 auto;
|
||||
|
||||
.input-container {
|
||||
@@ -871,9 +866,10 @@ onUnmounted(() => {
|
||||
|
||||
.message-input {
|
||||
:deep(.el-textarea__inner) {
|
||||
padding: 16px 60px 16px 16px;
|
||||
min-height: 52px;
|
||||
padding: 18px 70px 18px 20px;
|
||||
font-size: 15px;
|
||||
line-height: 1.5;
|
||||
line-height: 1.6;
|
||||
resize: none;
|
||||
background: transparent;
|
||||
border: none;
|
||||
@@ -888,12 +884,20 @@ onUnmounted(() => {
|
||||
|
||||
.send-button {
|
||||
position: absolute;
|
||||
right: 12px;
|
||||
bottom: 12px;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
min-height: 32px;
|
||||
right: 10px;
|
||||
bottom: 10px;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
min-height: 40px;
|
||||
padding: 0;
|
||||
border-radius: 50%;
|
||||
box-shadow: 0 2px 8px rgba(64, 158, 255, 0.3);
|
||||
transition: all 0.2s ease;
|
||||
|
||||
&:hover {
|
||||
box-shadow: 0 4px 12px rgba(64, 158, 255, 0.4);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user