修复更多来源不能正确跳转站点

This commit is contained in:
景大侠
2025-04-24 19:46:11 +08:00
parent dee6503e33
commit 2a5a93bdb5
+7 -3
View File
@@ -70,7 +70,11 @@ async function handleAddDownload(item: Context | null = null) {
} }
// 打开种子详情页面 // 打开种子详情页面
function openTorrentDetail() { function openTorrentDetail(item: Context | null = null) {
if (item && !isNullOrEmptyObject(item) && !isNullOrEmptyObject(item.torrent_info)) {
window.open(item.torrent_info.page_url, '_blank')
return
}
window.open(torrent.value?.page_url, '_blank') window.open(torrent.value?.page_url, '_blank')
} }
@@ -255,7 +259,7 @@ onMounted(() => {
<VChip v-if="torrent?.size" color="primary" size="x-small" variant="elevated" class="rounded-sm mr-2"> <VChip v-if="torrent?.size" color="primary" size="x-small" variant="elevated" class="rounded-sm mr-2">
{{ formatFileSize(torrent.size) }} {{ formatFileSize(torrent.size) }}
</VChip> </VChip>
<VBtn icon size="small" variant="text" color="primary" @click.stop="openTorrentDetail"> <VBtn icon size="small" variant="text" color="primary" @click.stop="openTorrentDetail()">
<VIcon icon="mdi-information-outline"></VIcon> <VIcon icon="mdi-information-outline"></VIcon>
</VBtn> </VBtn>
</div> </div>
@@ -333,7 +337,7 @@ onMounted(() => {
</span> </span>
<span> <span>
<VIcon <VIcon
@click.stop="openTorrentDetail" @click.stop="openTorrentDetail(item)"
size="small" size="small"
color="secondary" color="secondary"
icon="mdi-arrow-top-right" icon="mdi-arrow-top-right"