bugfix: 首页不显示+号&sketch卡片尺寸

This commit is contained in:
2026-03-24 14:25:37 +08:00
parent d97892815c
commit b064bca80e
4 changed files with 22 additions and 17 deletions

View File

@@ -536,7 +536,9 @@
ancestorsList.push(...list) ancestorsList.push(...list)
} }
const setChatInfo = (info) => { const setChatInfo = (info) => {
console.log('11111111111',info);
const initialData = agentStore.getInitialProjectData const initialData = agentStore.getInitialProjectData
if (isGenerating.value || initialData) return if (isGenerating.value || initialData) return
@@ -581,9 +583,9 @@
const sessionLastIndexMap = new Map<string, number>() const sessionLastIndexMap = new Map<string, number>()
ancestorsList.forEach((item, index) => { ancestorsList.forEach((item, index) => {
console.log('item', item) console.log('item', item)
if (item.image_url) { // if (item.image_url) {
sessionLastIndexMap.set(item.sessionId, index) sessionLastIndexMap.set(item.sessionId, index)
} // }
}) })
sessionLastIndexMap.forEach((lastIndex) => { sessionLastIndexMap.forEach((lastIndex) => {
ancestorsList[lastIndex].text += '<slot slot-name="sketch"></slot>' ancestorsList[lastIndex].text += '<slot slot-name="sketch"></slot>'

View File

@@ -15,11 +15,6 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
// const props = defineProps<{
// title: string
// isUrl?: boolean
// }>()
const props = withDefaults( const props = withDefaults(
defineProps<{ defineProps<{
title?: string title?: string
@@ -46,17 +41,20 @@
background-size: 100% 100%; background-size: 100% 100%;
padding: 2.9rem; padding: 2.9rem;
overflow: hidden; overflow: hidden;
position: relative;
&.is-url { &.is-url {
background: url('@/assets/images/link-card.png') no-repeat; background: url('@/assets/images/link-card.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
} }
&.is-sketch { &.is-sketch {
background: url('@/assets/images/sketch-card.png') no-repeat; background: url('@/assets/images/sketch-card.png') no-repeat;
background-size: 100% 100%; background-size: contain;
padding: 2rem 3rem;
.report-card-header {
margin-bottom: 0;
}
} }
// &:first-of-type{
// margin-top: 0;
// }
&-header { &-header {
font-family: 'Medium'; font-family: 'Medium';
font-size: 1.6rem; font-size: 1.6rem;

View File

@@ -1,10 +1,15 @@
<template> <template>
<ReportCard is-sketch title="Sketches Results" content="JPG file"/> <ReportCard is-sketch title="Sketches Results" content="JPG file" />
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import ReportCard from './ReportCard.vue' import ReportCard from './ReportCard.vue'
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
</style> :deep(.report-card) {
width: 52.5rem;
height: 8rem;
box-sizing: border-box;
}
</style>

View File

@@ -35,7 +35,7 @@
</div> </div>
<div class="operate flex align-center space-between"> <div class="operate flex align-center space-between">
<div class="left flex align-center"> <div class="left flex align-center">
<div class="agent-operate flex flex-center"> <div class="agent-operate flex flex-center" v-if="isAgentMode">
<el-popover <el-popover
placement="top" placement="top"
trigger="click" trigger="click"