每当我们将数据设置为 dataprovider 时,它会自动设置为其项目渲染器,如果您使用自定义 itemrendere,请执行此操作...
[Bindable] private var _customerName:String;
[Bindable] private var _totalOrder:String;
override public function set data(value:Object):void{
this.data = value;
_customerName = value. property //propertyName containing customer name
_totalOrder = value. property //propertyName containing totalOrder
}
<s:Label id="customerName" text="{_customerName}" />
<s:Label id="totalOrder" text="{_totalOrder}" />
或者
<s:ItemRenderer>
<s:Label id="customerName" text="{data.properyNamecontainCustomerName}" />
<s:Label id="totalOrder" text="={data.properyNamecontaintotalOrder} " />
</s:ItemRenderer>