修改下载渲染
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -11,10 +11,11 @@ import { Call as $Call, CancellablePromise as $CancellablePromise, Create as $Cr
|
||||
import * as services$0 from "./services/models.js";
|
||||
|
||||
/**
|
||||
* @returns {$CancellablePromise<void>}
|
||||
* @param {string} obj
|
||||
* @returns {$CancellablePromise<boolean>}
|
||||
*/
|
||||
export function DownloadSite() {
|
||||
return $Call.ByID(2539977978);
|
||||
export function DownloadSite(obj) {
|
||||
return $Call.ByID(2539977978, obj);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user