修改下载渲染

This commit is contained in:
zyj
2025-10-24 18:26:28 +08:00
parent 838e2cb037
commit a1a002370b
5 changed files with 56 additions and 13 deletions

View File

@@ -18,6 +18,16 @@
<a-menu-item key="download">整站下载</a-menu-item>
<a-menu-item key="record">仿站记录</a-menu-item>
</a-sub-menu>
<a-sub-menu key="run">
<template #title>
<span>
<IeOutlined />
<span>运行</span>
</span>
</template>
<a-menu-item key="webpage">Nginx网站</a-menu-item>
<a-menu-item key="pack">打包应用</a-menu-item>
</a-sub-menu>
</a-menu>
</a-layout-sider>
</div>
@@ -31,6 +41,7 @@
import {
PieChartOutlined,
UserOutlined,
IeOutlined,
} from '@ant-design/icons-vue';
import { ref } from 'vue';
const collapsed = ref<boolean>(false);

View File

@@ -85,7 +85,7 @@
<!-- 结果统计和筛选 -->
<div class="results-meta">
<div class="meta-info">
用时 {{ searchTime }}
用时 {{ searchTime }} <a-button @click="downloadResource">下载</a-button>
</div>
<div class="filter-options">
<a-radio-group v-model:value="filterType" size="small">
@@ -254,6 +254,11 @@ const resourceData = ref({
const isValidURL = (str) => { try { new URL(str); return true; } catch { return false; }}
// 下载当前页面资源
const downloadResource = async ()=> {
App.DownloadSite(JSON.stringify(searchResults))
}
// 搜索处理函数
const handleSearch = async () => {
if (searchLoading.value == true) {
@@ -318,6 +323,7 @@ const handleSearch = async () => {
})
}
// 输入框焦点事件
const onInputFocus = () => {
isInputFocused.value = true