新增打开目录方法

This commit is contained in:
zyj
2025-10-27 18:31:53 +08:00
parent 82390887c0
commit 0526cf4aa4
4 changed files with 42 additions and 1 deletions

View File

@@ -5,7 +5,15 @@
</a-breadcrumb>
<div>
<a-card :bordered="false" class="table-list">
<a-table :dataSource="dataSource" :columns="columns" />
<a-table :dataSource="dataSource" :columns="columns" >
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<span>
<a @click="openFileDir(record.name)">查看文件</a>
</span>
</template>
</template>
</a-table>
</a-card>
</div>
</template>
@@ -40,11 +48,16 @@
const dataSource = ref([]);
const siteList = ref([])
// 获取网站列表
const getList = async ()=> {
App.GetDownloadList().then((res)=>{
dataSource.value = JSON.parse(JSON.stringify(res))
})
}
// 打开文件夹
const openFileDir = async (name) => {
App.OpenSiteFileDir(name)
}
onMounted(()=> {
getList()
})

View File

@@ -41,6 +41,15 @@ export function GetResources(rawURL) {
}));
}
/**
* 打开网站文件夹
* @param {string} pathDir
* @returns {$CancellablePromise<boolean>}
*/
export function OpenSiteFileDir(pathDir) {
return $Call.ByID(4158138211, pathDir);
}
// Private type creation functions
const $$createType0 = utils$0.FileDir.createFrom;
const $$createType1 = $Create.Array($$createType0);