feat: update Excel template management and export handling

This commit is contained in:
meswork
2026-06-03 08:46:56 +08:00
parent 9cfb8d16f0
commit 57f804818e
8 changed files with 1092 additions and 124 deletions

View File

@@ -55,3 +55,23 @@ export async function openJsonFile() {
if (!handles.length) return null
return handles[0].getFile()
}
export async function openExcelFile() {
if (!isOpenPickerSupported()) return null
const handles = await window.showOpenFilePicker({
multiple: false,
types: [
{
description: 'Excel 工作簿',
accept: {
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': ['.xlsx'],
'application/vnd.ms-excel': ['.xls']
}
}
]
})
if (!handles.length) return null
return handles[0].getFile()
}