refactor: apply about-points expansion to both local and cloud export

- rename prepareLocalExportItemsWithAboutPoints to
  prepareExportItemsWithAboutPoints (no longer local-only)
- remove local-only branch in handleExport; cloud export now also
  splits abouts into point1...pointN columns

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
PetrichorFun 2026-05-22 17:57:30 +08:00
parent 147616c697
commit f0a5463d6b
2 changed files with 6 additions and 8 deletions

View File

@ -1,6 +1,6 @@
{
"name": "azon-seeker",
"displayName": "Azon Seeker v0.7.1.11-beta",
"displayName": "Azon Seeker v0.7.1.12-beta",
"version": "0.7.2",
"private": true,
"description": "Starter modify by honestfox101 and PetrichorFun",

View File

@ -210,8 +210,8 @@ const filteredData = computed(() => {
return data;
});
/** 本地导出:将「关于」拆成「要点1…要点n」多列,云端导出仍为单列「关于」 */
function prepareLocalExportItemsWithAboutPoints(
/** 导出时将「关于」拆成「要点1…要点n」多列 */
function prepareExportItemsWithAboutPoints(
headers: Header[],
items: AmazonItem[],
): { headers: Header[]; items: Record<string, unknown>[] } {
@ -251,11 +251,9 @@ const handleExport = async (opt: 'local' | 'cloud') => {
let headers = getItemHeaders();
let items: Record<string, unknown>[] | AmazonItem[] = toRaw(filteredData.value);
if (opt === 'local') {
const prepared = prepareLocalExportItemsWithAboutPoints(headers, items as AmazonItem[]);
const prepared = prepareExportItemsWithAboutPoints(headers, items as AmazonItem[]);
headers = prepared.headers;
items = prepared.items;
}
const fragments = [
{