更改下载方法名

This commit is contained in:
super
2026-04-06 22:26:44 +08:00
parent d8d5b56c13
commit 1b02160b20
12 changed files with 1411 additions and 716 deletions

View File

@@ -391,8 +391,8 @@ async function saveTemplateFromUrl(url: string, fallbackFilename: string, bridge
return
}
if (api?.save_file_from_url) {
const result = await api.save_file_from_url(url, fallbackFilename)
if (api?.save_file_from_url_new) {
const result = await api.save_file_from_url_new(url, fallbackFilename)
if (result.success) {
ElMessage.success(`已保存:${result.path || fallbackFilename}`)
} else if (result.error && result.error !== '用户取消') {
@@ -480,8 +480,8 @@ async function downloadConvertResult(item: ConvertResultItem) {
}
const filename = item.outputFilename || `${new Date().toISOString().slice(0, 10).replace(/-/g, '')}.txt`
if (api?.save_file_from_url) {
const result = await api.save_file_from_url(item.downloadUrl, filename)
if (api?.save_file_from_url_new) {
const result = await api.save_file_from_url_new(item.downloadUrl, filename)
if (result.success) {
ElMessage.success(`已保存:${result.path || filename}`)
} else if (result.error && result.error !== '用户取消') {