Răsfoiți Sursa

fix: 修复背景图显示异常的问题

zhupei@smartai.com 1 an în urmă
părinte
comite
52d5a19116
2 a modificat fișierele cu 9 adăugiri și 3 ștergeri
  1. 3 1
      src/views/ConversationBoard.vue
  2. 6 2
      src/views/ConversationHistory.vue

+ 3 - 1
src/views/ConversationBoard.vue

@@ -18,10 +18,12 @@ import ChatAsideMenu from './conversation/ChatAsideMenu.vue';
 
 import ConversationBoardContainer from './conversation/ConversationBoardContainer.vue';
 
+import bg_image from '../assets/chat/board-bg.png';
+
 const router = useRouter();
 
 const content_style = {
-  backgroundImage: 'url(../../../assets/chat/board-bg.png)',
+  backgroundImage: `url(${bg_image})`,
   backgroundRepeat: 'no-repeat',
   backgroundSize: 'contain'
 };

+ 6 - 2
src/views/ConversationHistory.vue

@@ -1,10 +1,12 @@
 <template>
   <LayoutExperience>
-    <ContentContainer :containerStyle="content_style">
+    <ContentContainer :containerStyle="content_style" id="fjkdsdajfklgjsklfjskdlf">
       <ChatAsideMenu />
 
       <ConversationHistoryContainer @historyActive="handleHistoryActive" />
     </ContentContainer>
+
+    <a-back-top :target-container="'#fjkdsdajfklgjsklfjskdlf'" :style="{ position: 'absolute' }" />
   </LayoutExperience>
 </template>
 
@@ -21,6 +23,8 @@ import ConversationHistoryContainer from './conversation/ConversationHistoryCont
 
 import { useThemeStore } from '../base/store/use-theme';
 
+import bg_image from '../assets/chat/history-bg.png';
+
 const router = useRouter();
 
 const theme = useThemeStore();
@@ -28,7 +32,7 @@ const theme = useThemeStore();
 const content_style = computed(() => {
   if (theme.value === 'light') {
     return {
-      backgroundImage: 'url(../../../assets/chat/history-bg.png)',
+      backgroundImage: `url(${bg_image})`,
       backgroundRepeat: 'no-repeat',
       backgroundSize: 'cover'
     };