feat(export): support name and comment XLSX headers

This commit is contained in:
二丫讲梵 authored and GitHub committed 2026-08-23 01:40:22 +08:00
1 parent 0908a944e8
commit c4630540dd
15 files changed
+171 -63

No files matched your search

@@ -30,4 +30,27 @@ describe("XlsxHeaderDialog", () => {
expect(cancelCount).toBe(1);
app.unmount();
});
it("emits the combined name and comment mode", async () => {
const container = document.createElement("div");
document.body.appendChild(container);
let selectedMode = "";
const app = createApp(XlsxHeaderDialog, {
open: true,
onConfirm: (mode: string) => {
selectedMode = mode;
},
});
app.use(i18n);
app.mount(container);
await nextTick();
document.querySelector<HTMLInputElement>('input[value="name-comment"]')!.click();
await nextTick();
document.querySelector<HTMLButtonElement>("[data-xlsx-header-confirm]")!.click();
await nextTick();
expect(selectedMode).toBe("name-comment");
app.unmount();
});
});