(name: string)
| 136 | |
| 137 | // 下载文件 |
| 138 | const downloadFile = async (name: string) => { |
| 139 | try { |
| 140 | const file = await getFileBlob(name); |
| 141 | const url = URL.createObjectURL(file); |
| 142 | const a = document.createElement("a"); |
| 143 | a.href = url; |
| 144 | a.download = name; |
| 145 | document.body.appendChild(a); |
| 146 | a.click(); |
| 147 | document.body.removeChild(a); |
| 148 | URL.revokeObjectURL(url); |
| 149 | } catch (e) { |
| 150 | Message.error(String(e)); |
| 151 | } |
| 152 | }; |
| 153 | |
| 154 | // 删除文件或目录 |
| 155 | const deleteEntry = (name: string, kind: "file" | "directory") => { |
no test coverage detected