feat: weburl卡片位置

This commit is contained in:
2026-06-04 16:53:50 +08:00
parent 3128e3cc08
commit 6d4ea42889
2 changed files with 14 additions and 9 deletions

View File

@@ -467,10 +467,6 @@
const parsed = JSON.parse(jsonData.webAddress)
aiMessage.webAddress = parsed
aiMessage.loading = false
if (!aiMessage._urlSlotAdded) {
aiMessage.text += `<slot slot-name="url"></slot>`
aiMessage._urlSlotAdded = true
}
if (String(aiMessage.sessionId) === String(projectStore.state.id)) {
triggerOpenUrls(parsed)
}

View File

@@ -75,13 +75,19 @@
<template v-slot:s-card="{ children: children, ...attrs }">
<Card title="Trend Report" @click="handleClickReport" />
</template>
<template v-slot:s-url="{ children: children }">
<Url :list="content.webAddress" @click="handleClickUrls" />
</template>
<template v-slot:s-sketch="{ children: children }">
<Sketch @click="handleClickSketch" />
</template>
</VueMarkdown>
<div
v-if="content.webAddress?.length > 0"
class="url-card-container"
>
<Url
:list="content.webAddress"
@click="handleClickUrls"
/>
</div>
<div
class="web-address flex align-center"
v-show="content.webAddress?.length > 0"
@@ -512,15 +518,18 @@
user-select: text;
.message-markdown,
> div:not(.web-address) {
> div:not(.web-address):not(.url-card-container) {
display: inline;
}
.message-markdown > p:first-child,
> div:not(.web-address) > p:first-child {
> div:not(.web-address):not(.url-card-container) > p:first-child {
display: inline;
margin-top: 0;
}
.url-card-container {
display: block;
}
ul {
list-style-position: inside;