using System; using uMVVM.Sources.Infrastructure; namespace Game.MVVM.Model { public class MallScrollItemViewModel : ViewModelBase { public readonly BindableProperty ItemId = new BindableProperty(); public readonly BindableProperty ItemName = new BindableProperty(); public readonly BindableProperty ItemIcon = new BindableProperty(); public readonly BindableProperty ItemDesc = new BindableProperty(); public readonly BindableProperty ItemCount = new BindableProperty(); public readonly BindableProperty ItemData = new BindableProperty(); public Action OnClickBuy; public void InitData(MallScrollItem item) { this.ItemId.Value = item.id; this.ItemName.Value = item.name; this.ItemIcon.Value = item.icon; this.ItemDesc.Value = item.desc; this.ItemCount.Value = item.count; this.ItemData.Value = item.data; } } }