fix FileManager

This commit is contained in:
jxxghp
2023-08-26 14:50:35 +08:00
parent e3df4000bb
commit f2b51107fa
4 changed files with 38 additions and 18 deletions

View File

@@ -1,19 +1,23 @@
<script lang="ts" setup>
import api from '@/api'
import type { Setting } from '@/api/types'
import FileBrowser from '@/components/FileBrowser.vue'
const initPath = '/Users/jxxghp/Downloads/爱情生活 (2020)/'
const endpoints = {
list: { url: '/filebrowser/list?path={path}', method: 'get' },
mkdir: { url: '/filebrowser/mkdir?path={path}', method: 'get' },
delete: { url: '/filebrowser/delete?path={path}', method: 'get' },
download: { url: '/filebrowser/download?path={path}', method: 'get' },
}
// 读取下载目录
const systemEnv: Setting = inject('systemEnv') ?? {
DOWNLOAD_PATH: '/',
}
</script>
<template>
<div>
<FileBrowser storages="local" :tree="false" :path="initPath" :endpoints="endpoints" :axios="api" />
<FileBrowser storages="local" :tree="false" :path="systemEnv.DOWNLOAD_PATH" :endpoints="endpoints" :axios="api" />
</div>
</template>