using iWare.Wms.Core.Util.LowCode.Front.Model;
using Furion.Extras.iWare.Wms.Util.LowCode.Front.Att;
using Furion.Extras.iWare.Wms.Util.LowCode.Front.Code;
using Furion.Extras.iWare.Wms.Util.LowCode.Front.Interface;
using Newtonsoft.Json.Linq;
namespace Furion.Extras.iWare.Wms.Util.LowCode.Front
{
[FrontType("card")]
public class Front_Card : IFront, IFrontLayout
{
public string Key { get; set; }
public string Label { get; set; }
public string Type { get; set; }
public string Model { get; set; }
///
/// 组件集
///
public List List { get; set; }
public ViewDynamic Dynamic
{ get { return null; } }
public IFront ConvertFront(JObject JData)
{
return new Front_Card()
{
Key = JData["key"].Value(),
Label = JData["label"].Value(),
Type = JData["type"].Value(),
List = AutoCode_Front.ReadFront(JData["list"].Values().ToList())
};
}
public void ReadFront(Action action)
{
this.List.ForEach(item =>
{
if (item is IFrontLayout)
{
(item as IFrontLayout).ReadFront(action);
}
else
{
action(item);
}
});
}
}
}