table
tbody
tr
th ID
th Product Name
th Price
th Category
th Action
if data.length
each item in data
tr
td #{item['_id']}
td #{item['product_name']}
td #{item['price']}
td #{item['category']}
td

对于此代码,我收到错误无法读取属性'长度'类型未定义
答案 0 :(得分:0)
只要使用数据,你现在就做同样的事情,测试数据是否为空。