feat: url link
This commit is contained in:
@@ -40,10 +40,21 @@
|
||||
<template v-slot:s-card="{ children: children, ...attrs }">
|
||||
<Card :title="attrs.title" @click.native="handleClickReport" />
|
||||
</template>
|
||||
<template v-slot:url-card="{ children: children }">
|
||||
<Url :list="content.webAddress" @click.native="handleClickUrls" />
|
||||
</template>
|
||||
</VueMarkdown>
|
||||
<!-- <Url @click.native="handleClickUrls" /> -->
|
||||
<div
|
||||
class="web-address flex align-center"
|
||||
v-show="content.webAddress?.length > 0"
|
||||
>
|
||||
<img src="@/assets/images/search.png" class="search-icon" />
|
||||
<span>{{ content.webAddress?.length }} web pages have been retrieved.</span>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-show="!content.thinking"
|
||||
v-show="!content.streaming"
|
||||
class="operate flex"
|
||||
:class="{ 'is-user': content.isUser }"
|
||||
>
|
||||
@@ -96,13 +107,13 @@
|
||||
isLast: Boolean
|
||||
}>()
|
||||
|
||||
watch(
|
||||
() => props.content,
|
||||
(newVal) => {
|
||||
console.log('newVal-----', newVal)
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
// watch(
|
||||
// () => props.content,
|
||||
// (newVal) => {
|
||||
// console.log('newVal-----', newVal)
|
||||
// },
|
||||
// { immediate: true }
|
||||
// )
|
||||
|
||||
const emit = defineEmits(['regenerate'])
|
||||
|
||||
@@ -215,6 +226,7 @@
|
||||
// 点击显示报告
|
||||
}
|
||||
const handleClickUrls = (data) => {
|
||||
MyEvent.emit('openUrls', props.content.webAddress)
|
||||
// 点击显示来源
|
||||
}
|
||||
</script>
|
||||
@@ -260,6 +272,24 @@
|
||||
width: fit-content;
|
||||
max-width: 82%;
|
||||
}
|
||||
.web-address {
|
||||
width: fit-content;
|
||||
min-width: 22.5rem;
|
||||
line-height: 2.6rem;
|
||||
padding: 0 1rem;
|
||||
border-radius: 1.5rem;
|
||||
color: #000000a6;
|
||||
border: 0.1rem solid #0000001a;
|
||||
font-family: 'Regular';
|
||||
font-weight: 400;
|
||||
font-size: 1.2rem;
|
||||
margin-top: 1rem;
|
||||
column-gap: 0.8rem;
|
||||
.search-icon {
|
||||
width: 1.4rem;
|
||||
height: 1.4rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
.operate {
|
||||
margin-top: 1.3rem;
|
||||
|
||||
Reference in New Issue
Block a user