mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-04 21:17:36 +08:00
c3b0b114e6
* feat: add form(not complete yet) * feat: add form(basic) * refactor: change namespace * feat(module: form): add onFinish, onFinishFailed, reset * feat(module: form): add layout demo * feat(module: form): update doc * refactor: basic form Co-authored-by: ElderJames <shunjiey@hotmail.com>
55 lines
1.5 KiB
C#
55 lines
1.5 KiB
C#
using System.Collections.Generic;
|
|
using OneOf;
|
|
|
|
namespace AntDesign
|
|
{
|
|
using StringNumber = OneOf<string, int>;
|
|
|
|
public class ColLayoutParam
|
|
{
|
|
public StringNumber Flex { get; set; }
|
|
|
|
public StringNumber Span { get; set; }
|
|
|
|
public StringNumber Order { get; set; }
|
|
|
|
public StringNumber Offset { get; set; }
|
|
|
|
public StringNumber Push { get; set; }
|
|
|
|
public StringNumber Pull { get; set; }
|
|
|
|
public OneOf<int, EmbeddedProperty> Xs { get; set; }
|
|
|
|
public OneOf<int, EmbeddedProperty> Sm { get; set; }
|
|
|
|
public OneOf<int, EmbeddedProperty> Md { get; set; }
|
|
|
|
public OneOf<int, EmbeddedProperty> Lg { get; set; }
|
|
|
|
public OneOf<int, EmbeddedProperty> Xl { get; set; }
|
|
|
|
public OneOf<int, EmbeddedProperty> Xxl { get; set; }
|
|
|
|
public Dictionary<string, object> ToAttributes()
|
|
{
|
|
Dictionary<string, object> attributes = new Dictionary<string, object>();
|
|
|
|
attributes.Add("Flex", Flex);
|
|
attributes.Add("Span", Span);
|
|
attributes.Add("Order", Order);
|
|
attributes.Add("Offset", Offset);
|
|
attributes.Add("Push", Push);
|
|
attributes.Add("Pull", Pull);
|
|
attributes.Add("Xs", Xs);
|
|
attributes.Add("Sm", Sm);
|
|
attributes.Add("Md", Md);
|
|
attributes.Add("Lg", Lg);
|
|
attributes.Add("Xl", Xl);
|
|
attributes.Add("Xxl", Xxl);
|
|
|
|
return attributes;
|
|
}
|
|
}
|
|
}
|