mirror of
https://github.com/primedigitaltech/azon_seeker.git
synced 2026-10-05 23:33:21 +08:00
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:
parent
147616c697
commit
f0a5463d6b
@ -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",
|
||||
|
||||
@ -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[]);
|
||||
headers = prepared.headers;
|
||||
items = prepared.items;
|
||||
}
|
||||
const prepared = prepareExportItemsWithAboutPoints(headers, items as AmazonItem[]);
|
||||
headers = prepared.headers;
|
||||
items = prepared.items;
|
||||
|
||||
const fragments = [
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user