mirror of
https://github.com/primedigitaltech/azon_seeker.git
synced 2026-10-05 07:13:06 +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",
|
"name": "azon-seeker",
|
||||||
"displayName": "Azon Seeker v0.7.1.11-beta",
|
"displayName": "Azon Seeker v0.7.1.12-beta",
|
||||||
"version": "0.7.2",
|
"version": "0.7.2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "Starter modify by honestfox101 and PetrichorFun",
|
"description": "Starter modify by honestfox101 and PetrichorFun",
|
||||||
|
|||||||
@ -210,8 +210,8 @@ const filteredData = computed(() => {
|
|||||||
return data;
|
return data;
|
||||||
});
|
});
|
||||||
|
|
||||||
/** 本地导出:将「关于」拆成「要点1…要点n」多列,云端导出仍为单列「关于」 */
|
/** 导出时将「关于」拆成「要点1…要点n」多列 */
|
||||||
function prepareLocalExportItemsWithAboutPoints(
|
function prepareExportItemsWithAboutPoints(
|
||||||
headers: Header[],
|
headers: Header[],
|
||||||
items: AmazonItem[],
|
items: AmazonItem[],
|
||||||
): { headers: Header[]; items: Record<string, unknown>[] } {
|
): { headers: Header[]; items: Record<string, unknown>[] } {
|
||||||
@ -251,11 +251,9 @@ const handleExport = async (opt: 'local' | 'cloud') => {
|
|||||||
let headers = getItemHeaders();
|
let headers = getItemHeaders();
|
||||||
let items: Record<string, unknown>[] | AmazonItem[] = toRaw(filteredData.value);
|
let items: Record<string, unknown>[] | AmazonItem[] = toRaw(filteredData.value);
|
||||||
|
|
||||||
if (opt === 'local') {
|
const prepared = prepareExportItemsWithAboutPoints(headers, items as AmazonItem[]);
|
||||||
const prepared = prepareLocalExportItemsWithAboutPoints(headers, items as AmazonItem[]);
|
headers = prepared.headers;
|
||||||
headers = prepared.headers;
|
items = prepared.items;
|
||||||
items = prepared.items;
|
|
||||||
}
|
|
||||||
|
|
||||||
const fragments = [
|
const fragments = [
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user