新增打开目录方法

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()
})