Skip to content

Commit

Permalink
fix: recommended_browse_nodes 属性渲染
Browse files Browse the repository at this point in the history
  • Loading branch information
wangjue666 committed Dec 11, 2024
1 parent 82ebf41 commit ac4317a
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 25 deletions.
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -320,16 +320,12 @@ new ListingProduct({
}
],
"recommended_browse_nodes": [
[
{
"value": "123"
}
],
[
},
{
"value": "456"
}
]
],
"bullet_point": [
{
Expand Down
6 changes: 1 addition & 5 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -320,16 +320,12 @@ new ListingProduct({
}
],
"recommended_browse_nodes": [
[
{
"value": "123"
}
],
[
},
{
"value": "456"
}
]
],
"bullet_point": [
{
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "spapi-listing-builder",
"type": "module",
"version": "0.2.4",
"version": "0.2.5",
"packageManager": "[email protected]",
"description": "It is a simple npm package for generating compliant Amazon SP-API listing JSON quickly and efficiently.",
"author": "wangjue666 <[email protected]>",
Expand Down
28 changes: 14 additions & 14 deletions src/listing/product/BaseInfo/RecommendedBrowseNodes/index.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { renderListingArrValue } from '@/help'

export class RecommendedBrowseNodes {
recommendedBrowseNodes: string[]
constructor(recommendedBrowseNodes: string[]) {
this.recommendedBrowseNodes = recommendedBrowseNodes
}

main() {
return this.recommendedBrowseNodes.map((item) => {
return renderListingArrValue(item)
})
}
}
export class RecommendedBrowseNodes {
recommendedBrowseNodes: string[]
constructor(recommendedBrowseNodes: string[]) {
this.recommendedBrowseNodes = recommendedBrowseNodes
}

main() {
return this.recommendedBrowseNodes.map((item) => {
return {
value: item,
}
})
}
}

0 comments on commit ac4317a

Please sign in to comment.