FirstUI/FirstUI-uvue

grid循环报错

Closed this issue · 2 comments

页面:





{{item.title}}


类:
class Menu {
id : string = '';
title : string = '';
component : string = '';
icon : string = '';
children : Array = [];
constructor() { }
}
data:
data() {
return {
level1Menus: [] as Array

,
names: ['1', 'a', 'rr'] as Array
}
}
运行时报错:
image
用list控件没问题:
image

看不见图片,麻烦贴一下页面使用代码

没有指定array具体类型,不能之接用.,不能直接使用item.id,空数组无法推断具体类型,需要指定