/// <summary> /// 初始化共享配置 /// </summary> protected virtual void InitShareConfig(TagHelperContext context, GridShareConfig config) { config.ShowLabel = context.GetValueFromAttributes <bool>(UiConst.ShowLabel); config.LabelSpan = context.GetValueFromAttributes <string>(UiConst.LabelSpan); config.ControlSpan = context.GetValueFromAttributes <string>(UiConst.ControlSpan); config.FormItemFlex = context.GetValueFromAttributes <bool>(UiConst.FormItemFlex); config.Gutter = context.GetValueFromAttributes <string>(UiConst.Gutter); }
/// <summary> /// 初始化共享配置 /// </summary> protected virtual void InitShareConfig(TagHelperContext context, GridShareConfig config) { if (context.AllAttributes.ContainsName(UiConst.ColumnSpan)) { config.ColumnSpan = context.GetValueFromAttributes <string>(UiConst.ColumnSpan); } if (context.AllAttributes.ContainsName(UiConst.AutoCreateColumn)) { config.AutoCreateColumn = context.GetValueFromAttributes <bool>(UiConst.AutoCreateColumn); } }
/// <summary> /// 设置表格标识 /// </summary> private string GetId(TagHelperContext context) { if (context.AllAttributes.ContainsName(UiConst.Id)) { return(context.GetValueFromAttributes <string>(UiConst.Id)); } return($"m_{Util.Helpers.Id.Guid()}"); }
/// <summary> /// 初始化共享配置 /// </summary> protected virtual void InitShareConfig(TagHelperContext context, GridShareConfig config) { if (context.AllAttributes.ContainsName(UiConst.ShowLabel)) { config.ShowLabel = context.GetValueFromAttributes <bool>(UiConst.ShowLabel); } if (context.AllAttributes.ContainsName(UiConst.LabelSpan)) { config.LabelSpan = context.GetValueFromAttributes <string>(UiConst.LabelSpan); } if (context.AllAttributes.ContainsName(UiConst.ControlSpan)) { config.ControlSpan = context.GetValueFromAttributes <string>(UiConst.ControlSpan); } if (context.AllAttributes.ContainsName(UiConst.ColumnSpan)) { config.ColumnSpan = context.GetValueFromAttributes <string>(UiConst.ColumnSpan); } if (context.AllAttributes.ContainsName(UiConst.FormItemFlex)) { config.FormItemFlex = context.GetValueFromAttributes <bool>(UiConst.FormItemFlex); } if (context.AllAttributes.ContainsName(UiConst.Gutter)) { config.Gutter = context.GetValueFromAttributes <string>(UiConst.Gutter); } if (context.AllAttributes.ContainsName(UiConst.AutoCreateColumn)) { config.AutoCreateColumn = context.GetValueFromAttributes <bool>(UiConst.AutoCreateColumn); } }
/// <summary> /// 初始化共享配置 /// </summary> protected virtual void InitShareConfig(TagHelperContext context, TableShareConfig config) { config.OnClickRow = context.GetValueFromAttributes <string>(UiConst.OnClickRow); }