问题一:
Expected to return a value in arrow function
解决方案:
修改后:
// 使用 storereturn ();{pageTitle}
{ infoList.length > 0 ? ({ infoList.forEach((item, index) => {
):null }- {item.name}
}) }
注:将 map 改为 forEach 以后,页面渲染失败
问题二:
Expected an assignment or function call and instead saw an expression
解决方案:
修改后:
// 使用 storereturn ();{pageTitle}
{ infoList.length > 0 ? ({ infoList.map((item, index) => { return (
):null }- {item.name}
) }) }
.