(dir: string)
| 945 | }; |
| 946 | |
| 947 | const handleChangeDir = async (dir: string) => { |
| 948 | if (!dir) return; |
| 949 | |
| 950 | const oldPath = currentPath.value; |
| 951 | const oldBreadcrumbs = [...breadcrumbs]; |
| 952 | const oldDisk = currentDisk.value; |
| 953 | |
| 954 | spinning.value = true; |
| 955 | try { |
| 956 | updateBreadcrumbs(dir); |
| 957 | |
| 958 | operationForm.value.name = ""; |
| 959 | operationForm.value.current = 1; |
| 960 | |
| 961 | await getFileList(true); |
| 962 | |
| 963 | const thisTab = currentTabs.value.find((e) => e.key === activeTab.value); |
| 964 | if (thisTab) { |
| 965 | thisTab.path = dir; |
| 966 | thisTab.name = getLastNameFromPath(dir); |
| 967 | } |
| 968 | } catch (error: any) { |
| 969 | console.error("Path jump failed:", error); |
| 970 | |
| 971 | breadcrumbs.length = 0; |
| 972 | oldBreadcrumbs.forEach((item) => breadcrumbs.push(item)); |
| 973 | currentDisk.value = oldDisk; |
| 974 | |
| 975 | await getFileList(false, oldPath).catch((err) => |
| 976 | console.error("Failed to revert to old path after jump failure:", err) |
| 977 | ); |
| 978 | |
| 979 | const errorMsg = `${t("TXT_CODE_96281410")} ${ |
| 980 | error.response?.data?.message || error.message || "" |
| 981 | }`; |
| 982 | return reportErrorMsg(errorMsg); |
| 983 | } finally { |
| 984 | spinning.value = false; |
| 985 | } |
| 986 | }; |
| 987 | |
| 988 | const handleTableChange = (e: { current: number; pageSize: number }) => { |
| 989 | selectedRowKeys.value = []; |
nothing calls this directly
no test coverage detected