implement UPS
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { Toast } from "tdesign-mobile-vue";
|
||||
import { listServerFiles, resolveRequestErrorMessage } from "@/api/FileAPI";
|
||||
import FileAPI from "@/api/FileAPI";
|
||||
import FileExplorerGrid from "./FileExplorerGrid.vue";
|
||||
import FileExplorerList from "./FileExplorerList.vue";
|
||||
import { useNavBarStore } from "@/store/navBarStore";
|
||||
@@ -212,7 +212,7 @@ async function openItem(item: ExplorerItem): Promise<void> {
|
||||
} catch (error) {
|
||||
Toast({
|
||||
theme: "error",
|
||||
message: resolveRequestErrorMessage(error)
|
||||
message: "操作失败"
|
||||
});
|
||||
} finally {
|
||||
pendingFolderPath.value = "";
|
||||
@@ -259,7 +259,7 @@ async function hydrateCurrentDirectory(pathSegments: string[]): Promise<void> {
|
||||
} catch (error) {
|
||||
Toast({
|
||||
theme: "error",
|
||||
message: resolveRequestErrorMessage(error)
|
||||
message: "操作失败"
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -280,7 +280,7 @@ async function ensureDirectoryLoaded(pathSegments: string[], updatePageLoading:
|
||||
}
|
||||
|
||||
try {
|
||||
const files = await listServerFiles(pathSegments);
|
||||
const files = await FileAPI.list(pathSegments);
|
||||
const items = sortExplorerItems(files.map((item) => mapServerFileToExplorerItem(item)));
|
||||
directoryCache.value = {
|
||||
...directoryCache.value,
|
||||
|
||||
Reference in New Issue
Block a user