schangxiang@126.com
2024-04-23 f47411fb53aeee0c7bd514cbc841f9030349f448
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
using Admin.NET.Core.Util.LowCode.Front.Model;
using Furion.Extras.Admin.NET.Util.LowCode.Front.Interface;
using Furion.Extras.Admin.NET.Util.LowCode.Front.Model;
 
namespace Furion.Extras.Admin.NET.Util.LowCode.Front.Code
{
    public static class AutoCode_FrontModel
    {
        public static List<IFront> AllFront(this Front_Model model)
        {
            List<IFront> list = new List<IFront>();
 
            model.List.ForEach(item =>
            {
                if (item is IFrontLayout)
                {
                    (item as IFrontLayout).ReadFront(front => { list.Add(front); });
                }
                else
                {
                    list.Add(item);
                }
            });
 
            return list;
        }
 
        public static List<ViewDynamic> AllDynamic(this List<IFront> list)
        {
            List<ViewDynamic> data = new List<ViewDynamic>();
 
            list.ForEach(item =>
            {
                if (item.Dynamic != null)
                {
                    data.Add(item.Dynamic);
                }
            });
 
            return data;
        }
    }
}