如何在映射函数中绑定数组值反应

发布于 2025-01-20 10:35:57 字数 682 浏览 2 评论 0原文

希望你做得很好,我正在尝试在我的地图函数中绑定数组值,但我没有成功实现我的结果

这是第 32 行的控制台结果,我在其中获取数据 输入图片这里的描述

这是我的代码 输入图片此处描述

我的屏幕现在看起来像这样 输入图片此处描述

在此处输入图像描述

如果我在地图函数内 {console.log(item)}

hope you are doing great, I am trying to bind array values in my map function but I am unsuccessful in achieving my result

Here is the console result of line number 32 where I am getting data
enter image description here

here is my code
enter image description here

my screen is looking like this now
enter image description here

enter image description here

if i {console.log(item)} inside the map function

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

仄言 2025-01-27 10:35:57

在这里,您的对象位于一个数组中,因此每当您映射 fdata 数组时,其中就会有另一个数组,因此不要使用 item.name、item. sellPrice,而是使用 item[0].name、itme[0]。售价

Here you are having your object inside an array, so whenever you are mapping the fdata array then inside that there is another array so instead of using, item.name, item.sellingPrice use item[0].name, itme[0].sellingPrice

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文