feat: 实时打开webSources

This commit is contained in:
2026-05-27 16:13:45 +08:00
parent 5e89995cfd
commit c7ff047ac8
2 changed files with 11 additions and 2 deletions

View File

@@ -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(