Browse Source

更新附件样式

kagg886 1 month ago
parent
commit
18c47505d6
1 changed files with 15 additions and 7 deletions
  1. 15 7
      src/views/assistant/index.vue

+ 15 - 7
src/views/assistant/index.vue

@@ -1195,7 +1195,7 @@ const formatFileSize = (bytes: number): string => {
 					<!-- 附件栏:紧贴输入框上方,位于容器内部 -->
 					<div class="attachments-inline">
 						<el-scrollbar>
-							<div class="attachments-inline-scroll" v-if="selectedFiles.length > 0">
+							<div class="attachments-inline-scroll">
 								<div
 									v-for="(file, fIdx) in selectedFiles"
 									:key="file.name + '_' + file.size + '_' + (file as any).lastModified"
@@ -1606,7 +1606,7 @@ const formatFileSize = (bytes: number): string => {
 }
 
 .messages-spacer {
-	height: 160px;
+	height: 203px;
 }
 
 .message-wrapper {
@@ -2023,10 +2023,13 @@ const formatFileSize = (bytes: number): string => {
 /* 附件栏(内嵌)样式 */
 .attachments-inline {
 	width: 100%;
-	padding: 8px;
+	padding: 4px;
 	display: flex;
 	align-items: center;
 	gap: 8px;
+	background: var(--el-fill-color-extra-light);
+	border-radius: 8px 8px 0 0;
+	border-bottom: 1px solid var(--el-border-color-lighter);
 }
 
 .attachments-inline-scroll {
@@ -2035,10 +2038,12 @@ const formatFileSize = (bytes: number): string => {
 	display: flex;
 	align-items: center;
 	gap: 8px;
+	background: var(--el-fill-color-extra-light);
 	padding: 6px;
 }
 
 .attachment-card {
+
 	position: relative;
 	display: inline-flex;
 	align-items: center;
@@ -2053,6 +2058,8 @@ const formatFileSize = (bytes: number): string => {
 	text-overflow: ellipsis;
 
 	font-size: 10px !important;
+
+	padding: 4px 8px!important;
 }
 
 .attachment-name {
@@ -2065,14 +2072,15 @@ const formatFileSize = (bytes: number): string => {
 .add-attachment-btn {
 	flex-shrink: 0;
 	font-size: 10px !important;
+	margin: 5px;
 }
 
 .remove-attachment-icon {
 	position: absolute;
-	top: -6px;
-	right: -6px;
-	width: 18px;
-	height: 18px;
+	top: -5px;
+	right: -5px;
+	width: 15px;
+	height: 15px;
 	border-radius: 50%;
 	border: 1px solid var(--el-border-color-light);
 	background: var(--el-bg-color);