feat: 实时打开webSources
This commit is contained in:
@@ -454,7 +454,8 @@
|
||||
const jsonData = JSON.parse(jsonText)
|
||||
// console.log('jsonData', jsonData)
|
||||
if (jsonData.webAddress) {
|
||||
// aiMessage.webAddress = JSON.parse(jsonData.webAddress)
|
||||
|
||||
aiMessage.webAddress = JSON.parse(jsonData.webAddress)
|
||||
// contentBody += `<slot slot-name="url"></slot>`
|
||||
// aiMessage.loading = false
|
||||
hasUrlEvent = true
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<div
|
||||
ref="containerRef"
|
||||
class="preview-container flex"
|
||||
v-loading="urlLoading"
|
||||
:class="type === 'sketch' ? 'sketch-preview' : 'report-preview'"
|
||||
>
|
||||
<template v-if="type === 'sketch'">
|
||||
@@ -136,7 +137,10 @@
|
||||
// 当 type 为 sketch 时,自动滚动到最底部
|
||||
if (props.type === 'sketch') {
|
||||
nextTick(() => {
|
||||
containerRef.value?.scrollTo({ top: containerRef.value.scrollHeight, behavior: 'smooth' })
|
||||
containerRef.value?.scrollTo({
|
||||
top: containerRef.value.scrollHeight,
|
||||
behavior: 'smooth'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -194,9 +198,13 @@
|
||||
markdownContent.value = content
|
||||
}
|
||||
|
||||
const urlLoading = ref(false)
|
||||
const setUrls = async (list: string[]) => {
|
||||
reportType.value = 'urls'
|
||||
urlList.value = []
|
||||
urlLoading.value = true
|
||||
const res = await fetchUrlTitle(list)
|
||||
urlLoading.value = false
|
||||
urlList.value = res
|
||||
}
|
||||
// watch(
|
||||
|
||||
Reference in New Issue
Block a user